Open SUPScientist opened 3 years ago
Testing against 59c05d8 with 3G fin (no antenna)
Steps:
W/D sensor does not work during STATE_UPLOAD
W/D sensor is not responsive enough.
Recommended patch:
diff --git a/src/dataUpload.cpp b/src/dataUpload.cpp
index a79e84b..f1f0a43 100644
--- a/src/dataUpload.cpp
+++ b/src/dataUpload.cpp
@@ -58,7 +58,7 @@ STATES_e DataUpload::run(void)
startConnectTime = millis();
while(1)
{
- if(pSystemDesc->pWaterSensor->getCurrentStatus())
+ if(pSystemDesc->pWaterSensor->getCurrentReading())
{
return STATE_SESSION_INIT;
}
@@ -100,7 +100,7 @@ STATES_e DataUpload::run(void)
}
// connected, but maybe we went into the water
- if(pSystemDesc->pWaterSensor->getLastStatus() == WATER_SENSOR_HIGH_STATE)
+ if(pSystemDesc->pWaterSensor->getLastReading() == WATER_SENSOR_HIGH_STATE)
{
SF_OSAL_printf("In the water!\n");
return STATE_SESSION_INIT;
Blocking on results of #25
While current firmware is attempting to connect to a cellular network, submersion in water (tripping of wet/dry sensor) does not immediately trigger a new session. It would be a valuable addition to have submersion in water always trigger init/log surf session states (i.e., interrupt an upload attempt). The upload attempt can occur later.
Use case: fin is in log surf session state. Board is turned over or fin is otherwise kept dry for enough time to transition to upload state. Surfer re-enters water prior to fin establishing cellular connection and therefore stays in upload state even though user might expect that it is once again logging data.