1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-20 10:54:14 +01:00

OP-1769 Ground support review comments

This commit is contained in:
abeck70 2015-03-11 13:49:21 +11:00
parent 0aba013b96
commit dd2733d73f
2 changed files with 4 additions and 7 deletions

View File

@ -116,8 +116,6 @@ typedef struct {
int8_t matrix[5];
} __attribute__((packed)) Mixer_t;
#define DIAG_MIXERSTATUS
/**
* @brief Module initialization
* @return 0
@ -266,9 +264,7 @@ static void actuatorTask(__attribute__((unused)) void *parameters)
}
bool armed = flightStatus.Armed == FLIGHTSTATUS_ARMED_ARMED;
// ground needs to cature for reverse which is negative throttle
bool activeThrottle = (throttleDesired < 0.00f || throttleDesired > 0.00f);
bool activeThrottle = (throttleDesired < -0.001f || throttleDesired > 0.001f); // for ground and reversible motors
bool positiveThrottle = (throttleDesired > 0.00f);
// safety settings

View File

@ -38,6 +38,7 @@
// Private constants
#define ARMED_THRESHOLD 0.50f
#define GROUND_LOW_THROTTLE 0.01f
// Private types
typedef enum {
@ -83,8 +84,8 @@ void armHandler(bool newinit, FrameType_t frameType)
bool lowThrottle = cmd.Throttle < 0;
if (frameType == FRAME_TYPE_GROUND) {
// Deadbanding appled in receiver.c at 2%
lowThrottle = fabsf(cmd.Throttle) < 0.01f;
// Deadbanding applied in receiver.c typically at 2% but we don't assume its enabled.
lowThrottle = fabsf(cmd.Throttle) < GROUND_LOW_THROTTLE;
}
bool armSwitch = false;