mirror of
https://github.com/nasa/openmct.git
synced 2025-02-20 17:33:23 +00:00
parent
156ba832f2
commit
d913798d5b
@ -182,6 +182,16 @@ define([
|
||||
"capacity"
|
||||
],
|
||||
"pattern": "^-?\\d+(\\.\\d*)?$"
|
||||
},
|
||||
{
|
||||
"name": "Battery Starting SOC",
|
||||
"control": "textfield",
|
||||
"required": false,
|
||||
"conversion": "number",
|
||||
"property": [
|
||||
"startingSOC"
|
||||
],
|
||||
"pattern": "^-?\\d+(\\.\\d*)?$"
|
||||
}
|
||||
],
|
||||
"model": {
|
||||
|
@ -60,7 +60,7 @@ define(
|
||||
result.power,
|
||||
0,
|
||||
domainObject.getModel().capacity, // Watts
|
||||
domainObject.getModel().capacity,
|
||||
domainObject.getModel().startingSOC,
|
||||
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 () {
|
||||
var mockCallback = jasmine.createSpy('callback');
|
||||
testModel.capacity = 1000;
|
||||
testModel.startingSOC = 1000;
|
||||
testModel.type = "timeline";
|
||||
mockDomainObject.useCapability.andReturn(asPromise([
|
||||
{ key: "power", start: 0, end: 15 }
|
||||
|
Loading…
x
Reference in New Issue
Block a user