mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-03-12 00:13:58 +01:00
fix: send battery voltage as separate
This commit is contained in:
parent
5337cb2d46
commit
a33875a608
|
|
@ -270,9 +270,6 @@ function updateImage() {
|
|||
}
|
||||
|
||||
function toggleFields() {
|
||||
const sendBatteryVoltageCheckbox = document.querySelector(
|
||||
'input[name="other.sendBatteryVoltage"]'
|
||||
);
|
||||
const externalVoltageMeasurementCheckbox = document.querySelector(
|
||||
'input[name="other.externalVoltageMeasurement"]'
|
||||
);
|
||||
|
|
@ -280,15 +277,10 @@ function toggleFields() {
|
|||
'input[name="other.externalVoltagePin"]'
|
||||
);
|
||||
|
||||
externalVoltageMeasurementCheckbox.disabled =
|
||||
!sendBatteryVoltageCheckbox.checked;
|
||||
externalVoltagePinInput.disabled =
|
||||
!externalVoltageMeasurementCheckbox.checked;
|
||||
}
|
||||
|
||||
const sendBatteryVoltageCheckbox = document.querySelector(
|
||||
'input[name="other.sendBatteryVoltage"]'
|
||||
);
|
||||
const externalVoltageMeasurementCheckbox = document.querySelector(
|
||||
'input[name="other.externalVoltageMeasurement"]'
|
||||
);
|
||||
|
|
@ -296,16 +288,6 @@ const externalVoltagePinInput = document.querySelector(
|
|||
'input[name="other.externalVoltagePin"]'
|
||||
);
|
||||
|
||||
sendBatteryVoltageCheckbox.addEventListener("change", function () {
|
||||
externalVoltageMeasurementCheckbox.disabled = !this.checked;
|
||||
|
||||
if (!this.checked) {
|
||||
externalVoltageMeasurementCheckbox.checked = false;
|
||||
}
|
||||
|
||||
externalVoltagePinInput.disabled = !externalVoltageMeasurementCheckbox.checked;
|
||||
});
|
||||
|
||||
externalVoltageMeasurementCheckbox.addEventListener("change", function () {
|
||||
externalVoltagePinInput.disabled = !this.checked;
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue