Skip to content

Commit 133fb86

Browse files
Copilotdorkmo
andcommitted
Simplify GPS and accelerometer config by removing unnecessary conditionals
Co-authored-by: dorkmo <[email protected]>
1 parent 9c0cd14 commit 133fb86

File tree

1 file changed

+3
-17
lines changed

1 file changed

+3
-17
lines changed

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

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1212,32 +1212,18 @@ static void configureNotecardHubMode() {
12121212
}
12131213

12141214
// Disable GPS location tracking for power savings
1215-
// GPS is one of the most power-hungry components on the Notecard
1215+
// GPS is one of the most power-hungry components on the Notecard and is not used by this application
12161216
req = notecard.newRequest("card.location.mode");
12171217
if (req) {
1218-
if (gConfig.solarPowered) {
1219-
// Solar mode: Disable periodic GPS tracking to save power
1220-
JAddStringToObject(req, "mode", "off");
1221-
} else {
1222-
// Grid-tied mode: Can enable GPS if needed for future features
1223-
// For now, keep it off as location tracking is not used by this application
1224-
JAddStringToObject(req, "mode", "off");
1225-
}
1218+
JAddStringToObject(req, "mode", "off");
12261219
notecard.sendRequest(req);
12271220
}
12281221

12291222
// Disable accelerometer motion tracking for power savings
12301223
// The accelerometer is not used by this tank monitoring application
12311224
req = notecard.newRequest("card.motion.mode");
12321225
if (req) {
1233-
if (gConfig.solarPowered) {
1234-
// Solar mode: Disable motion tracking to save power
1235-
JAddStringToObject(req, "mode", "off");
1236-
} else {
1237-
// Grid-tied mode: Can enable motion if needed for future features
1238-
// For now, keep it off as motion tracking is not used by this application
1239-
JAddStringToObject(req, "mode", "off");
1240-
}
1226+
JAddStringToObject(req, "mode", "off");
12411227
notecard.sendRequest(req);
12421228
}
12431229
}

0 commit comments

Comments
 (0)