Skip to content

Commit 151f523

Browse files
committed
make us skip gnss command only on version10
1 parent e730cb3 commit 151f523

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

ubxtool.cc

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -738,12 +738,11 @@ int main(int argc, char** argv)
738738
usleep(50000);
739739

740740

741-
if (doDEBUG) { cerr<<humanTimeNow()<<" Sending GNSS query"<<endl; }
742-
if(version10)
743-
; //
744-
else {
741+
if(!version10) {
742+
if (doDEBUG) { cerr<<humanTimeNow()<<" Sending GNSS query"<<endl; }
743+
745744
msg = buildUbxMessage(0x06, 0x3e, {});
746-
745+
747746
um1=sendAndWaitForUBX(fd, 1, msg, 0x06, 0x3e); // query GNSS
748747
auto payload = um1.getPayload();
749748
if (doDEBUG) {
@@ -752,14 +751,14 @@ int main(int argc, char** argv)
752751
cerr<<humanTimeNow()<<" GNSSID "<<(int)payload[4+8*n]<<" enabled "<<(int)payload[8+8*n]<<" minTrk "<< (int)payload[5+8*n] <<" maxTrk "<<(int)payload[6+8*n]<<" " << (int)payload[8+8*n]<<" " << (int)payload[9+8*n] << " " <<" " << (int)payload[10+8*n]<<" " << (int)payload[11+8*n]<<endl;
753752
}
754753
}
755-
}
756-
757-
try {
758-
if(waitForUBXAckNack(fd, 2, 0x06, 0x3e)) {
759-
if (doDEBUG) { cerr<<humanTimeNow()<<" Got ACK for our poll of GNSS settings"<<endl; }
754+
755+
try {
756+
if(waitForUBXAckNack(fd, 2, 0x06, 0x3e)) {
757+
if (doDEBUG) { cerr<<humanTimeNow()<<" Got ACK for our poll of GNSS settings"<<endl; }
758+
}
759+
}catch(...) {
760+
cerr<<"Got timeout waiting for ack of poll, no problem"<<endl;
760761
}
761-
}catch(...) {
762-
cerr<<"Got timeout waiting for ack of poll, no problem"<<endl;
763762
}
764763

765764
if(!version9 && !version10) {

0 commit comments

Comments
 (0)