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 4f4953c..92a1405 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 5c86af0..9d73252 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 a7b8e87..1837fda 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 ce3d262..912f769 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);