1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 08:15:30 +03:00

Merge pull request #9315 from hydra/bf-log-disarm-reason

Log disarm reason.
This commit is contained in:
Michael Keller 2020-01-17 19:30:37 +13:00 committed by GitHub
commit 69a3a4ac08
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 60 additions and 23 deletions

View file

@ -676,7 +676,7 @@ TEST(ArmingPreventionTest, GPSRescueWithoutFixPreventsArm)
rcData[AUX1] = 1000;
// when
disarm();
disarm(DISARM_REASON_SYSTEM);
updateActivatedModes();
updateArmingStatus();
@ -720,7 +720,7 @@ TEST(ArmingPreventionTest, GPSRescueWithoutFixPreventsArm)
rcData[AUX1] = 1000;
// when
disarm();
disarm(DISARM_REASON_SYSTEM);
updateActivatedModes();
updateArmingStatus();
@ -790,7 +790,7 @@ TEST(ArmingPreventionTest, GPSRescueSwitchPreventsArm)
rcData[AUX1] = 1000;
// when
disarm();
disarm(DISARM_REASON_SYSTEM);
updateActivatedModes();
updateArmingStatus();
@ -834,7 +834,7 @@ TEST(ArmingPreventionTest, GPSRescueSwitchPreventsArm)
rcData[AUX1] = 1000;
// when
disarm();
disarm(DISARM_REASON_SYSTEM);
updateActivatedModes();
updateArmingStatus();
@ -951,7 +951,7 @@ TEST(ArmingPreventionTest, Paralyze)
rcData[AUX1] = 1000;
// when
disarm();
disarm(DISARM_REASON_SYSTEM);
updateActivatedModes();
updateArmingStatus();
@ -1098,4 +1098,5 @@ extern "C" {
void compassStartCalibration(void) {}
bool compassIsCalibrationComplete(void) { return true; }
bool isUpright(void) { return mockIsUpright; }
void blackboxLogEvent(FlightLogEvent, union flightLogEventData_u *) {};
}

View file

@ -35,6 +35,7 @@ extern "C" {
#include "fc/runtime_config.h"
#include "fc/rc_modes.h"
#include "fc/rc_controls.h"
#include "fc/core.h"
#include "flight/failsafe.h"
@ -571,7 +572,7 @@ bool featureIsEnabled(uint32_t mask) {
return (mask & testFeatureMask);
}
void disarm(void) {
void disarm(flightLogDisarmReason_e) {
callCounts[COUNTER_MW_DISARM]++;
}

View file

@ -79,7 +79,7 @@ extern "C" {
float getRcDeflection(int axis) { return simulatedRcDeflection[axis]; }
void beeperConfirmationBeeps(uint8_t) { }
bool isLaunchControlActive(void) {return unitLaunchControlActive; }
void disarm(void) { }
void disarm(flightLogDisarmReason_e) { }
float applyFFLimit(int axis, float value, float Kp, float currentPidSetpoint) {
UNUSED(axis);
UNUSED(Kp);

View file

@ -620,7 +620,7 @@ void handleInflightCalibrationStickPosition(void) {}
bool featureIsEnabled(uint32_t) { return false;}
bool sensors(uint32_t) { return false;}
void tryArm(void) {}
void disarm(void) {}
void disarm(flightLogDisarmReason_e) {}
void dashboardDisablePageCycling() {}
void dashboardEnablePageCycling() {}

View file

@ -183,4 +183,5 @@ extern "C" {
void compassStartCalibration(void) {}
bool compassIsCalibrationComplete(void) { return true; }
bool isUpright(void) { return true; }
void blackboxLogEvent(FlightLogEvent, union flightLogEventData_u *) {};
}