mirror of
https://github.com/nasa/openmct.git
synced 2025-05-08 11:38:35 +00:00
parent
156ba832f2
commit
d913798d5b
@ -182,6 +182,16 @@ define([
|
|||||||
"capacity"
|
"capacity"
|
||||||
],
|
],
|
||||||
"pattern": "^-?\\d+(\\.\\d*)?$"
|
"pattern": "^-?\\d+(\\.\\d*)?$"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Battery Starting SOC",
|
||||||
|
"control": "textfield",
|
||||||
|
"required": false,
|
||||||
|
"conversion": "number",
|
||||||
|
"property": [
|
||||||
|
"startingSOC"
|
||||||
|
],
|
||||||
|
"pattern": "^-?\\d+(\\.\\d*)?$"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"model": {
|
"model": {
|
||||||
|
@ -60,7 +60,7 @@ define(
|
|||||||
result.power,
|
result.power,
|
||||||
0,
|
0,
|
||||||
domainObject.getModel().capacity, // Watts
|
domainObject.getModel().capacity, // Watts
|
||||||
domainObject.getModel().capacity,
|
domainObject.getModel().startingSOC,
|
||||||
1 / 3600000 // millis-to-hour (since units are watt-hours)
|
1 / 3600000 // millis-to-hour (since units are watt-hours)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -101,6 +101,7 @@ define(
|
|||||||
it("provides a battery graph for timelines with capacity", function () {
|
it("provides a battery graph for timelines with capacity", function () {
|
||||||
var mockCallback = jasmine.createSpy('callback');
|
var mockCallback = jasmine.createSpy('callback');
|
||||||
testModel.capacity = 1000;
|
testModel.capacity = 1000;
|
||||||
|
testModel.startingSOC = 1000;
|
||||||
testModel.type = "timeline";
|
testModel.type = "timeline";
|
||||||
mockDomainObject.useCapability.andReturn(asPromise([
|
mockDomainObject.useCapability.andReturn(asPromise([
|
||||||
{ key: "power", start: 0, end: 15 }
|
{ key: "power", start: 0, end: 15 }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user