diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2013-07-09 22:56:02 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2013-07-09 22:56:02 +0200 |
commit | c3d07030dd1882c626ed027cfc5870f42b1cd33e (patch) | |
tree | 16780e734215eb1f13719e59dc37cb70926a9023 | |
parent | 6cbbb9b99fbeddc2da00f67bb209d33971a30041 (diff) | |
download | px4-firmware-c3d07030dd1882c626ed027cfc5870f42b1cd33e.tar.gz px4-firmware-c3d07030dd1882c626ed027cfc5870f42b1cd33e.tar.bz2 px4-firmware-c3d07030dd1882c626ed027cfc5870f42b1cd33e.zip |
Minor additions to fix, pushing
-rw-r--r-- | src/drivers/gps/ubx.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/drivers/gps/ubx.cpp b/src/drivers/gps/ubx.cpp index 3e790499b..ad219cd25 100644 --- a/src/drivers/gps/ubx.cpp +++ b/src/drivers/gps/ubx.cpp @@ -231,7 +231,7 @@ UBX::receive(unsigned timeout) ssize_t count = 0; - bool message_found = false; + bool position_updated = false; while (true) { @@ -260,15 +260,15 @@ UBX::receive(unsigned timeout) if (parse_char(buf[i])) { /* return to configure during configuration or to the gps driver during normal work * if a packet has arrived */ - handle_message(); - message_found = true; + if (handle_message()) + position_updated = true; } } } } /* return success after receiving a packet */ - if (message_found) + if (position_updated) return 1; /* abort after timeout if no packet parsed successfully */ @@ -420,8 +420,8 @@ UBX::parse_char(uint8_t b) // and we want to tell the module to stop sending this message // disable unknown message - warnx("disabled class %d, msg %d", (int)_message_class, (int)b); - configure_message_rate(_message_class, b, 0); + //warnx("disabled class %d, msg %d", (int)_message_class, (int)b); + //configure_message_rate(_message_class, b, 0); } break; case UBX_DECODE_GOT_MESSAGEID: |