git.droids-corp.org
/
protos
/
imu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix gps message when position is not correct
[protos/imu.git]
/
i2c_protocol.c
diff --git
a/i2c_protocol.c
b/i2c_protocol.c
index
274e9f6
..
cdb7399
100644
(file)
--- a/
i2c_protocol.c
+++ b/
i2c_protocol.c
@@
-61,7
+61,7
@@
static void i2c_test(uint16_t val)
static uint16_t prev=0;
if ( (val-prev) != 1 ) {
static uint16_t prev=0;
if ( (val-prev) != 1 ) {
- WARNING(E_USER_I2C_PROTO, "Dup
p
licated msg %d", val);
+ WARNING(E_USER_I2C_PROTO, "Duplicated msg %d", val);
}
prev = val;
ext.nb_test_cmd ++;
}
prev = val;
ext.nb_test_cmd ++;
@@
-82,6
+82,7
@@
static void i2c_send_status(void)
gps_get_pos(&gps_pos);
IRQ_UNLOCK(irq_flags);
gps_get_pos(&gps_pos);
IRQ_UNLOCK(irq_flags);
+ ans.flags = 0;
if (gps_pos_valid(&gps_pos)) {
ans.flags |= IMUBOARD_STATUS_GPS_OK;
ans.latitude = gps_pos.latitude;
if (gps_pos_valid(&gps_pos)) {
ans.flags |= IMUBOARD_STATUS_GPS_OK;
ans.latitude = gps_pos.latitude;