From: Olivier Matz Date: Thu, 24 Jul 2014 16:37:04 +0000 (+0200) Subject: rename i2c imuboard status flags defines X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=50ec40b39cf5f17779df3f0e990d5a51be252512;p=fpv.git rename i2c imuboard status flags defines --- diff --git a/common/i2c_commands.h b/common/i2c_commands.h index 4f4953c..92a1405 100644 --- a/common/i2c_commands.h +++ b/common/i2c_commands.h @@ -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, diff --git a/imuboard/i2c_protocol.c b/imuboard/i2c_protocol.c index 5c86af0..9d73252 100644 --- a/imuboard/i2c_protocol.c +++ b/imuboard/i2c_protocol.c @@ -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; diff --git a/mainboard/commands.c b/mainboard/commands.c index a7b8e87..1837fda 100644 --- a/mainboard/commands.c +++ b/mainboard/commands.c @@ -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); diff --git a/mainboard/i2c_protocol.c b/mainboard/i2c_protocol.c index ce3d262..912f769 100644 --- a/mainboard/i2c_protocol.c +++ b/mainboard/i2c_protocol.c @@ -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);