mirror of
https://github.com/lumapu/ahoy.git
synced 2025-07-04 10:07:15 +02:00
Merge branch 'development03' of https://github.com/lumapu/ahoy into development03
This commit is contained in:
commit
6bf6e357ca
9 changed files with 72 additions and 131 deletions
|
@ -129,7 +129,7 @@
|
|||
|
||||
document.getElementsByName("btnAdd")[0].addEventListener("click", function() {
|
||||
if(highestId < (maxInv-1))
|
||||
ivHtml(JSON.parse('{"name":"","serial":"","channels":4,"ch_max_power":[0,0,0,0],"ch_name":["","","",""],"power_limit":1500,"power_limit_option":65535}'), highestId + 1);
|
||||
ivHtml(JSON.parse('{"name":"","serial":"","channels":4,"ch_max_power":[0,0,0,0],"ch_name":["","","",""]}'), highestId + 1);
|
||||
});
|
||||
|
||||
function apiCb(obj) {
|
||||
|
@ -189,20 +189,11 @@
|
|||
}
|
||||
});
|
||||
|
||||
for(var i of [["Name", "name", "Name*", 32], ["ActivePowerLimit", "power_limit", "Active Power Limit", 5]]) {
|
||||
for(var i of [["Name", "name", "Name*", 32]]) { // so richtig?
|
||||
iv.appendChild(lbl(id + i[0], i[2]));
|
||||
iv.appendChild(inp(id + i[0], obj[i[1]], i[3]));
|
||||
}
|
||||
|
||||
iv.appendChild(lbl(id + "PowerLimitControl", "Active Power Limit Control Type"));
|
||||
iv.appendChild(sel(id + "PowerLimitControl", [
|
||||
[65535, "no power limit"],
|
||||
[0, "absolute in Watt non persistent"],
|
||||
[1, "absolute in Watt persistent"],
|
||||
[256, "relativ in percent non persistent"],
|
||||
[257, "relativ in percent persistent"]
|
||||
], obj.power_limit_option));
|
||||
|
||||
for(var j of [["ModPwr", "ch_max_power", "Max Module Power (Wp)", 4], ["ModName", "ch_name", "Module Name", 16]]) {
|
||||
var cl = (re.test(obj["serial"])) ? null : ["hide"];
|
||||
iv.appendChild(lbl(null, j[2], cl, "lbl" + id + j[0]));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue