mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-17 05:15:25 +03:00
Improve failure LED status flashing. Now users can identify and report
hardware failures by counting the number of long flashes. Fix up sensor read API so that code that uses sensors can detect malfunctions. If a failure mode occurs in a debug mode the code reboots the system rather than rebooting to the bootloader.
This commit is contained in:
parent
6c231e189b
commit
c6f5b98a79
24 changed files with 196 additions and 92 deletions
|
@ -125,11 +125,13 @@ const mpu6050Config_t *selectMPU6050Config(void)
|
|||
|
||||
#ifdef USE_FAKE_GYRO
|
||||
static void fakeGyroInit(void) {}
|
||||
static void fakeGyroRead(int16_t *gyroADC) {
|
||||
static bool fakeGyroRead(int16_t *gyroADC) {
|
||||
memset(gyroADC, 0, sizeof(int16_t[XYZ_AXIS_COUNT]));
|
||||
return true;
|
||||
}
|
||||
static void fakeGyroReadTemp(int16_t *tempData) {
|
||||
static bool fakeGyroReadTemp(int16_t *tempData) {
|
||||
UNUSED(tempData);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool fakeGyroDetect(gyro_t *gyro, uint16_t lpf)
|
||||
|
@ -144,8 +146,9 @@ bool fakeGyroDetect(gyro_t *gyro, uint16_t lpf)
|
|||
|
||||
#ifdef USE_FAKE_ACC
|
||||
static void fakeAccInit(void) {}
|
||||
static void fakeAccRead(int16_t *accData) {
|
||||
static bool fakeAccRead(int16_t *accData) {
|
||||
memset(accData, 0, sizeof(int16_t[XYZ_AXIS_COUNT]));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool fakeAccDetect(acc_t *acc)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue