mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-18 03:16:12 +02:00
Patch no_eeprom_pl
This commit is contained in:
parent
f53933b473
commit
7c7a7d25b8
8 changed files with 25 additions and 92 deletions
|
@ -125,7 +125,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 ivHtml(obj, id) {
|
||||
|
@ -163,20 +163,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