AP_InertialSensor: MPU6000: remove _register_write_check()

That function isn't used in the code base and there should be a better way to
debug writes on registers.
This commit is contained in:
Gustavo Jose de Sousa 2016-06-13 16:06:45 -03:00 committed by Lucas De Marchi
parent d35cf60ce1
commit 309fe4a88c
2 changed files with 0 additions and 17 deletions

View File

@ -562,22 +562,6 @@ void AP_InertialSensor_MPU6000::_register_write(uint8_t reg, uint8_t val)
_dev->write_register(reg, val);
}
/*
useful when debugging SPI bus errors
*/
void AP_InertialSensor_MPU6000::_register_write_check(uint8_t reg, uint8_t val)
{
uint8_t readed;
_register_write(reg, val);
readed = _register_read(reg);
if (readed != val){
hal.console->printf("Values doesn't match; written: %02x; read: %02x ", val, readed);
}
#if MPU6000_DEBUG
hal.console->printf("Values written: %02x; readed: %02x ", val, readed);
#endif
}
/*
set the DLPF filter frequency. Assumes caller has taken semaphore
*/

View File

@ -92,7 +92,6 @@ private:
bool _block_read(uint8_t reg, uint8_t *buf, uint32_t size);
uint8_t _register_read(uint8_t reg);
void _register_write(uint8_t reg, uint8_t val );
void _register_write_check(uint8_t reg, uint8_t val);
void _accumulate(uint8_t *samples, uint8_t n_samples);