mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-25 01:05:27 +03:00
Move mw loop() code into separate methods. Cleanup related code.
If a given feature or mode is off the next task is not processed in the current loop but will be processed during the next loop iteration for simplification, this allowed the cleanup of return values in other code.
This commit is contained in:
parent
8d0509dbfb
commit
91bfdf05ca
7 changed files with 256 additions and 210 deletions
|
@ -26,19 +26,14 @@ typedef struct barometerConfig_s {
|
|||
float baro_cf_alt; // apply CF to use ACC for height estimation
|
||||
} barometerConfig_t;
|
||||
|
||||
typedef enum {
|
||||
BAROMETER_ACTION_NOT_READY = 0,
|
||||
BAROMETER_ACTION_OBTAINED_SAMPLES,
|
||||
BAROMETER_ACTION_PERFORMED_CALCULATION
|
||||
} barometerAction_e;
|
||||
|
||||
extern int32_t BaroAlt;
|
||||
|
||||
#ifdef BARO
|
||||
void useBarometerConfig(barometerConfig_t *barometerConfigToUse);
|
||||
bool isBaroCalibrationComplete(void);
|
||||
void baroSetCalibrationCycles(uint16_t calibrationCyclesRequired);
|
||||
barometerAction_e baroUpdate(uint32_t currentTime);
|
||||
void baroUpdate(uint32_t currentTime);
|
||||
bool isBaroReady(void);
|
||||
int32_t baroCalculateAltitude(void);
|
||||
void performBaroCalibrationCycle(void);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue