Browse Source

AP_InertialSensor: compile warnings: format not a string literal, argument types not checked

PSTR() goofs things up when using hal.console->printf_P()
master
Tom Pittenger 10 years ago committed by Andrew Tridgell
parent
commit
0e076d6dc8
  1. 2
      libraries/AP_InertialSensor/AP_InertialSensor_MPU6000.cpp

2
libraries/AP_InertialSensor/AP_InertialSensor_MPU6000.cpp

@ -450,7 +450,7 @@ void AP_InertialSensor_MPU6000::_register_write_check(uint8_t reg, uint8_t val)
_register_write(reg, val); _register_write(reg, val);
readed = _register_read(reg); readed = _register_read(reg);
if (readed != val){ if (readed != val){
hal.console->printf_P(PSTR("Values doesn't match; written: %02x; read: %02x "), val, readed); hal.console->printf_P("Values doesn't match; written: %02x; read: %02x ", val, readed);
} }
#if MPU6000_DEBUG #if MPU6000_DEBUG
hal.console->printf_P(PSTR("Values written: %02x; readed: %02x "), val, readed); hal.console->printf_P(PSTR("Values written: %02x; readed: %02x "), val, readed);

Loading…
Cancel
Save