forked from Archive/PX4-Autopilot
mpu6000: remove factory test for fmu-v2
This commit is contained in:
parent
22c4bb498c
commit
f9ddbd7e2a
|
@ -218,6 +218,7 @@ function(px4_add_board)
|
|||
|
||||
if(CONSTRAINED_FLASH)
|
||||
set(px4_constrained_flash_build "1" CACHE INTERNAL "constrained flash build" FORCE)
|
||||
add_definitions(-DCONSTRAINED_FLASH)
|
||||
endif()
|
||||
|
||||
if(TESTING)
|
||||
|
|
|
@ -383,6 +383,7 @@ MPU6000::_set_icm_acc_dlpf_filter(uint16_t frequency_hz)
|
|||
write_checked_reg(ICMREG_ACCEL_CONFIG2, filter);
|
||||
}
|
||||
|
||||
#ifndef CONSTRAINED_FLASH
|
||||
/*
|
||||
perform a self-test comparison to factory trim values. This takes
|
||||
about 200ms and will return OK if the current values are within 14%
|
||||
|
@ -526,6 +527,7 @@ MPU6000::factory_self_test()
|
|||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
deliberately trigger an error in the sensor to trigger recovery
|
||||
|
|
|
@ -317,12 +317,14 @@ public:
|
|||
|
||||
void print_registers();
|
||||
|
||||
#ifndef CONSTRAINED_FLASH
|
||||
/**
|
||||
* Test behaviour against factory offsets
|
||||
*
|
||||
* @return 0 on success, 1 on failure
|
||||
*/
|
||||
int factory_self_test();
|
||||
#endif
|
||||
|
||||
// deliberately cause a sensor error
|
||||
void test_error();
|
||||
|
|
|
@ -104,7 +104,9 @@ void reset(enum MPU6000_BUS busid);
|
|||
void info(enum MPU6000_BUS busid);
|
||||
void regdump(enum MPU6000_BUS busid);
|
||||
void testerror(enum MPU6000_BUS busid);
|
||||
#ifndef CONSTRAINED_FLASH
|
||||
void factorytest(enum MPU6000_BUS busid);
|
||||
#endif
|
||||
void usage();
|
||||
|
||||
/**
|
||||
|
@ -293,6 +295,7 @@ testerror(enum MPU6000_BUS busid)
|
|||
exit(0);
|
||||
}
|
||||
|
||||
#ifndef CONSTRAINED_FLASH
|
||||
/**
|
||||
* Dump the register information
|
||||
*/
|
||||
|
@ -310,11 +313,16 @@ factorytest(enum MPU6000_BUS busid)
|
|||
|
||||
exit(0);
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
usage()
|
||||
{
|
||||
warnx("missing command: try 'start', 'info', 'stop',\n'reset', 'regdump', 'factorytest', 'testerror'");
|
||||
warnx("missing command: try 'start', 'info', 'stop',\n'reset', 'regdump', 'testerror'"
|
||||
#ifndef CONSTRAINED_FLASH
|
||||
", 'factorytest'"
|
||||
#endif
|
||||
);
|
||||
warnx("options:");
|
||||
warnx(" -X external I2C bus");
|
||||
warnx(" -I internal I2C bus");
|
||||
|
@ -421,10 +429,14 @@ mpu6000_main(int argc, char *argv[])
|
|||
mpu6000::regdump(busid);
|
||||
}
|
||||
|
||||
#ifndef CONSTRAINED_FLASH
|
||||
|
||||
if (!strcmp(verb, "factorytest")) {
|
||||
mpu6000::factorytest(busid);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
if (!strcmp(verb, "testerror")) {
|
||||
mpu6000::testerror(busid);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue