We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3586ddf + c8dfb76 commit a1f6968Copy full SHA for a1f6968
src/sp140/sp140.ino
@@ -835,6 +835,13 @@ void disarmSystem() {
835
resetSmoothing();
836
resumeLEDTask();
837
runDisarmAlert();
838
+
839
+ // Calculate elapsed armed time in seconds before updating hour meter
840
+ if (armedAtMillis > 0) {
841
+ unsigned long currentMillis = millis();
842
+ armedSecs = (currentMillis - armedAtMillis) / 1000;
843
+ }
844
845
updateArmedTime();
846
writeDeviceData();
847
@@ -1056,6 +1063,7 @@ bool armSystem() {
1056
1063
setESCThrottle(ESC_DISARMED_PWM); // initialize the signal to low
1057
1064
1058
1065
armedAtMillis = millis();
1066
+ armedSecs = 0; // Reset armed seconds for new session
1059
1067
setGroundAltitude(deviceData);
1060
1068
1061
1069
vTaskSuspend(blinkLEDTaskHandle);
0 commit comments