Skip to content

Commit 28bd976

Browse files
committed
Do not lie about stored config.
Only give positive feedback if we received an ACK from GPS module.
1 parent 2be1935 commit 28bd976

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/gps.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,12 @@ void Gps::configureGpsModule() {
164164
0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00,
165165
0x00, 0x00, 0x00, 0x00, 0x17
166166
};
167-
sendAndWaitForAck(UBX_MSG::CFG_CFG, UBX_CFG_CFG_SAVE, sizeof(UBX_CFG_CFG_SAVE));
167+
if (sendAndWaitForAck(UBX_MSG::CFG_CFG, UBX_CFG_CFG_SAVE, sizeof(UBX_CFG_CFG_SAVE))) {
168+
addStatisticsMessage("OBS: Did update GPS settings.");
169+
} else {
170+
addStatisticsMessage("OBS: Failed to save updated GPS settings.");
171+
}
168172
handle(20);
169-
addStatisticsMessage("OBS: Did update GPS settings.");
170173
log_i("Config GPS done!");
171174
}
172175

0 commit comments

Comments
 (0)