mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 01:12:11 +00:00
mpu6000: remove factory test for fmu-v2
This commit is contained in:
@@ -218,6 +218,7 @@ function(px4_add_board)
|
|||||||
|
|
||||||
if(CONSTRAINED_FLASH)
|
if(CONSTRAINED_FLASH)
|
||||||
set(px4_constrained_flash_build "1" CACHE INTERNAL "constrained flash build" FORCE)
|
set(px4_constrained_flash_build "1" CACHE INTERNAL "constrained flash build" FORCE)
|
||||||
|
add_definitions(-DCONSTRAINED_FLASH)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(TESTING)
|
if(TESTING)
|
||||||
|
|||||||
@@ -383,6 +383,7 @@ MPU6000::_set_icm_acc_dlpf_filter(uint16_t frequency_hz)
|
|||||||
write_checked_reg(ICMREG_ACCEL_CONFIG2, filter);
|
write_checked_reg(ICMREG_ACCEL_CONFIG2, filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef CONSTRAINED_FLASH
|
||||||
/*
|
/*
|
||||||
perform a self-test comparison to factory trim values. This takes
|
perform a self-test comparison to factory trim values. This takes
|
||||||
about 200ms and will return OK if the current values are within 14%
|
about 200ms and will return OK if the current values are within 14%
|
||||||
@@ -526,6 +527,7 @@ MPU6000::factory_self_test()
|
|||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
deliberately trigger an error in the sensor to trigger recovery
|
deliberately trigger an error in the sensor to trigger recovery
|
||||||
|
|||||||
@@ -317,12 +317,14 @@ public:
|
|||||||
|
|
||||||
void print_registers();
|
void print_registers();
|
||||||
|
|
||||||
|
#ifndef CONSTRAINED_FLASH
|
||||||
/**
|
/**
|
||||||
* Test behaviour against factory offsets
|
* Test behaviour against factory offsets
|
||||||
*
|
*
|
||||||
* @return 0 on success, 1 on failure
|
* @return 0 on success, 1 on failure
|
||||||
*/
|
*/
|
||||||
int factory_self_test();
|
int factory_self_test();
|
||||||
|
#endif
|
||||||
|
|
||||||
// deliberately cause a sensor error
|
// deliberately cause a sensor error
|
||||||
void test_error();
|
void test_error();
|
||||||
|
|||||||
@@ -104,7 +104,9 @@ void reset(enum MPU6000_BUS busid);
|
|||||||
void info(enum MPU6000_BUS busid);
|
void info(enum MPU6000_BUS busid);
|
||||||
void regdump(enum MPU6000_BUS busid);
|
void regdump(enum MPU6000_BUS busid);
|
||||||
void testerror(enum MPU6000_BUS busid);
|
void testerror(enum MPU6000_BUS busid);
|
||||||
|
#ifndef CONSTRAINED_FLASH
|
||||||
void factorytest(enum MPU6000_BUS busid);
|
void factorytest(enum MPU6000_BUS busid);
|
||||||
|
#endif
|
||||||
void usage();
|
void usage();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -293,6 +295,7 @@ testerror(enum MPU6000_BUS busid)
|
|||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef CONSTRAINED_FLASH
|
||||||
/**
|
/**
|
||||||
* Dump the register information
|
* Dump the register information
|
||||||
*/
|
*/
|
||||||
@@ -310,11 +313,16 @@ factorytest(enum MPU6000_BUS busid)
|
|||||||
|
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
usage()
|
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("options:");
|
||||||
warnx(" -X external I2C bus");
|
warnx(" -X external I2C bus");
|
||||||
warnx(" -I internal I2C bus");
|
warnx(" -I internal I2C bus");
|
||||||
@@ -421,10 +429,14 @@ mpu6000_main(int argc, char *argv[])
|
|||||||
mpu6000::regdump(busid);
|
mpu6000::regdump(busid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef CONSTRAINED_FLASH
|
||||||
|
|
||||||
if (!strcmp(verb, "factorytest")) {
|
if (!strcmp(verb, "factorytest")) {
|
||||||
mpu6000::factorytest(busid);
|
mpu6000::factorytest(busid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!strcmp(verb, "testerror")) {
|
if (!strcmp(verb, "testerror")) {
|
||||||
mpu6000::testerror(busid);
|
mpu6000::testerror(busid);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user