mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-08-06 08:53:30 +02:00
fix: send battery voltage as separate
This commit is contained in:
@@ -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;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user