Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions ubxtool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -778,8 +778,17 @@ int main(int argc, char** argv)
}
}
if(doSurveyReset) {
uint8_t cmd = 0x3d; // vers res survey ign
auto msg = buildUbxMessage(0x06, cmd,
uint8_t cmd;
std::basic_string<uint8_t> msg;
if(version9) {
cmd = 0x8a;
msg = buildUbxMessage(0x06, cmd, {0x00, 0x01, 0x00, 0x00,
0x01,0x00,0x03,0x20, 0, // survey in mode
});
}
else {
cmd = 0x3d; // vers res survey ign
msg = buildUbxMessage(0x06, cmd,
{ 0,0,0,0, // survey-in, res, flag1, flag2
0,0,0,0, // x
0,0,0,0, // y
Expand All @@ -788,6 +797,7 @@ int main(int argc, char** argv)
0,0,0,0,
0,0,0,0
});
}
cerr<<humanTimeNow()<<" Sending survey-reset commmand"<<endl;

if(sendAndWaitForUBXAckNack(fd, 2, msg, 0x06, cmd)) {
Expand Down