structure power as object

This commit is contained in:
Wolfgang 2024-05-24 19:41:19 +02:00
parent 401b52b768
commit 603bd72bbb
2 changed files with 17 additions and 30 deletions

View file

@ -1,52 +1,45 @@
- start: 135.7 - start: 135.7
end: 137.8 end: 137.8
power_a: 1 W ERP power: {a: 1 W ERP}
- start: 472 - start: 472
end: 479 end: 479
power_a: 1 W ERP power: {a: 1 W ERP}
- start: 1810 - start: 1810
end: 1850 end: 1850
power_a: 750 W PEP power: {a: 750 W PEP, e: 100 W PEP}
power_e: 100 W PEP
- start: 1850 - start: 1850
end: 1890 end: 1890
power_a: 75 W PEP power: {a: 75 W PEP, e: 75 W PEP}
power_e: 75 W PEP
- start: 1890 - start: 1890
end: 2000 end: 2000
power_a: 10 W PEP power: {a: 10 W PEP, e: 10 W PEP}
power_e: 10 W PEP
- start: 3500 - start: 3500
end: 3800 end: 3800
power_a: 750 W PEP power: {a: 750 W PEP, e: 100 W PEP}
power_e: 100 W PEP
- start: 5351.5 - start: 5351.5
end: 5366.5 end: 5366.5
power_a: 15 W EIRP power: {a: 15 W EIRP}
- start: 7000 - start: 7000
end: 7100 end: 7100
power_a: 750 W PEP power: {a: 750 W PEP}
- start: 7100 - start: 7100
end: 7200 end: 7200
power_a: 750 W PEP power: {a: 750 W PEP}
- start: 10100 - start: 10100
end: 10150 end: 10150
power_a: 150 W PEP power: {a: 150 W PEP}
- start: 14000 - start: 14000
end: 14350 end: 14350
power_a: 750 W PEP power: {a: 750 W PEP}
- start: 18068 - start: 18068
end: 18168 end: 18168
power_a: 750 W PEP power: {a: 750 W PEP}
- start: 21000 - start: 21000
end: 21450 end: 21450
power_a: 750 W PEP power: {a: 750 W PEP, e: 100 W PEP}
power_e: 100 W PEP
- start: 24890 - start: 24890
end: 24990 end: 24990
power_a: 750 W PEP power: {a: 750 W PEP}
- start: 28000 - start: 28000
end: 29700 end: 29700
power_a: 750 W PEP power: {a: 750 W PEP, e: 100 W PEP, n: 10 W ERP}
power_e: 100 W PEP
power_n: 10 W ERP

View file

@ -77,14 +77,8 @@ div#togglebuttons>button {
} }
function add_power(add, p) { function add_power(add, p) {
if (typeof add.power_a !== "undefined") { for (const [key, value] of Object.entries(add.power)) {
p["power_a"] = add.power_a; p["power_" + key] = value;
}
if (typeof add.power_e !== "undefined") {
p["power_e"] = add.power_e;
}
if (typeof add.power_n !== "undefined") {
p["power_n"] = add.power_n;
} }
} }