Skip to content

Commit 635114d

Browse files
Copilotdorkmo
andcommitted
Fix review feedback: clarify activated description and always save digitalSwitchMode
Co-authored-by: dorkmo <[email protected]>
1 parent e20141d commit 635114d

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

TankAlarm-112025-Client-BluesOpta/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ Float switches can be configured as either normally-open (NO) or normally-closed
9696
- **NO (Normally-Open)**: Switch is open by default, closes when fluid reaches the switch position
9797
- **NC (Normally-Closed)**: Switch is closed by default, opens when fluid reaches the switch position
9898
- **Digital Trigger**: When to trigger the alarm
99-
- "activated": Alarm when switch is activated (fluid present for NO, fluid absent for NC)
100-
- "not_activated": Alarm when switch is not activated
99+
- "activated": Alarm when switch is activated (fluid present)
100+
- "not_activated": Alarm when switch is not activated (fluid absent)
101101

102102
**Wiring Note**: For both NO and NC float switches, connect the switch between the digital input pin and GND. The Arduino uses an internal pull-up resistor, and the software interprets the signal based on your configured switch mode. The wiring is the same for both modes - only the software interpretation changes.
103103

TankAlarm-112025-Client-BluesOpta/TankAlarm-112025-Client-BluesOpta.ino

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -836,10 +836,8 @@ static bool saveConfigToFlash(const ClientConfig &cfg) {
836836
if (cfg.tanks[i].digitalTrigger[0] != '\0') {
837837
t["digitalTrigger"] = cfg.tanks[i].digitalTrigger;
838838
}
839-
// Save digital switch mode (NO/NC) for digital sensors
840-
if (cfg.tanks[i].sensorType == SENSOR_DIGITAL) {
841-
t["digitalSwitchMode"] = cfg.tanks[i].digitalSwitchMode;
842-
}
839+
// Save digital switch mode (NO/NC)
840+
t["digitalSwitchMode"] = cfg.tanks[i].digitalSwitchMode;
843841
}
844842

845843
#if defined(ARDUINO_OPTA) || defined(ARDUINO_ARCH_MBED)

0 commit comments

Comments
 (0)