Skip to content

Commit ae10650

Browse files
committed
Fix conditional alp download; increase wait to ensure compliance inc ase of slow reset.
1 parent 1c1956b commit ae10650

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/OpenBikeSensorFirmware.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,9 +399,10 @@ void setup() {
399399
esp_bt_mem_release(ESP_BT_MODE_BTDM)); // no bluetooth at all here.
400400

401401
delay(200);
402-
startServer(&cfg);
402+
obsDisplay->showTextOnGrid(2, obsDisplay->newLine(), "Start GPS...");
403403
gps.begin();
404404
gps.setStatisticsIntervalInSeconds(2); // ??
405+
startServer(&cfg);
405406
while (true) {
406407
yield();
407408
serverLoop();

src/configServer.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,8 @@ static void wifiConnectedActions() {
729729
if (WiFiClass::status() == WL_CONNECTED) {
730730
TimeUtils::setClockByNtpAndWait(WiFi.gatewayIP().toString().c_str());
731731
}
732-
if (SD.begin() && WiFiClass::status() == WL_CONNECTED && gps.is_neo6()) {
732+
if (SD.begin() && WiFiClass::status() == WL_CONNECTED
733+
&& (!gps.moduleIsAlive() || gps.is_neo6())) {
733734
AlpData::update(obsDisplay);
734735
}
735736

src/gps.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ void Gps::coldStartGps() {
361361
// Newer firmware (like M10 and likely also M8) will not ack this
362362
// message so we do not wait for the ACK
363363
sendUbx(UBX_MSG::CFG_RST, UBX_CFG_RST, 4);
364-
waitForData(1000);
364+
waitForData(3000);
365365
handle();
366366
log_i("Cold Start GPS! Done");
367367
}

0 commit comments

Comments
 (0)