]> git.droids-corp.org - fpv.git/commitdiff
rename i2c imuboard status flags defines
authorOlivier Matz <zer0@droids-corp.org>
Thu, 24 Jul 2014 16:37:04 +0000 (18:37 +0200)
committerOlivier Matz <zer0@droids-corp.org>
Thu, 24 Jul 2014 16:37:04 +0000 (18:37 +0200)
common/i2c_commands.h
imuboard/i2c_protocol.c
mainboard/commands.c
mainboard/i2c_protocol.c

index 4f4953c3d32c3f04127953d17c2d165e1e22339a..92a1405e20b7fd6b522b858303a68d5c90c9d158 100644 (file)
@@ -58,8 +58,8 @@ struct i2c_req_imuboard_status {
 struct i2c_ans_imuboard_status {
        struct i2c_cmd_hdr hdr;
 
-#define IMUBOARD_STATUS_GPS_OK 0x01
-#define IMUBOARD_STATUS_IMU_OK 0x02
+#define I2C_IMUBOARD_STATUS_GPS_OK 0x01
+#define I2C_IMUBOARD_STATUS_IMU_OK 0x02
        uint8_t flags;
 
        int32_t latitude;  /* between -90e7 and 90e7, in 1/1e-7 degrees,
index 5c86af049a09f4d04024e232e76220b3a617adeb..9d73252bd8044387a06e22fac005d6a7f4227ffe 100644 (file)
@@ -84,7 +84,7 @@ static void i2c_send_status(void)
 
        ans.flags = 0;
        if (gps_pos_valid(&gps_pos)) {
-               ans.flags |= IMUBOARD_STATUS_GPS_OK;
+               ans.flags |= I2C_IMUBOARD_STATUS_GPS_OK;
                ans.latitude = gps_pos.latitude;
                ans.longitude = gps_pos.longitude;
                ans.altitude = gps_pos.altitude;
index a7b8e8722de980706f5814329e8d58db64f3d81a..1837fda3dcedd2f8efc4783ba3f83c56c9b00e1c 100644 (file)
@@ -2265,7 +2265,7 @@ static void cmd_dump_i2c_parsed(void *parsed_result, void *data)
                memcpy(&imu, &imuboard_status, sizeof(imu));
                IRQ_UNLOCK(irq_flags);
 
-               if (imu.flags & IMUBOARD_STATUS_GPS_OK) {
+               if (imu.flags & I2C_IMUBOARD_STATUS_GPS_OK) {
                        printf_P(PSTR("GPS lat=%"PRIi32" long=%"PRIi32
                                        " alt=%"PRIi32"\n"),
                                imu.latitude, imu.longitude, imu.altitude);
index ce3d2623cb2ed61dda1b62801980c0d84291a894..912f7697f44973926be89010a5289c6284dd91df 100644 (file)
@@ -253,7 +253,7 @@ void i2c_recvevent(uint8_t * buf, int8_t size)
                memcpy(&imuboard_status, ans, sizeof(imuboard_status));
 
                if (gps_ok == 0 &&
-                       (imuboard_status.flags & IMUBOARD_STATUS_GPS_OK)) {
+                       (imuboard_status.flags & I2C_IMUBOARD_STATUS_GPS_OK)) {
                        gps_ok = 1;
                        beep(0, 1, 1);
                        beep(0, 1, 1);