altos: Allow TeleMega to be built without MPU6000
authorKeith Packard <keithp@keithp.com>
Mon, 17 Nov 2014 00:38:12 +0000 (16:38 -0800)
committerKeith Packard <keithp@keithp.com>
Mon, 17 Nov 2014 00:40:26 +0000 (16:40 -0800)
Robert Braibish's board has a dead MPU6000; this fix lets the TeleMega
firmware build without that driver so the rest of the board could be verified.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/kernel/ao_telemetry.c

index 868b3260a52ae9f7fd4362a4a49264dfdcff007d..e2197f7a24cb1f9ad735ed49ea0d3c7c99cfb3c3 100644 (file)
@@ -133,7 +133,9 @@ ao_send_mega_sensor(void)
        telemetry.generic.tick = packet->tick;
        telemetry.generic.type = AO_TELEMETRY_MEGA_SENSOR;
 
        telemetry.generic.tick = packet->tick;
        telemetry.generic.type = AO_TELEMETRY_MEGA_SENSOR;
 
+#if HAS_MPU6000
        telemetry.mega_sensor.orient = ao_sample_orient;
        telemetry.mega_sensor.orient = ao_sample_orient;
+#endif
        telemetry.mega_sensor.accel = ao_data_accel(packet);
        telemetry.mega_sensor.pres = ao_data_pres(packet);
        telemetry.mega_sensor.temp = ao_data_temp(packet);
        telemetry.mega_sensor.accel = ao_data_accel(packet);
        telemetry.mega_sensor.pres = ao_data_pres(packet);
        telemetry.mega_sensor.temp = ao_data_temp(packet);