// This module implements saving and restoring the configurable parameters // to/from the data eeprom memory. #pragma once #include #include #include "ahrs_task.h" #include "rf_task.h" void parameters_save(); bool parameters_load(); void parameters_print(BaseSequentialStream *chp, bool machine_readable); bool parameter_set(const char *name, int32_t value); bool parameter_get(const char *name, int32_t *value); // This is an X-macro list of the parameters to save. // All variables should be 32-bit integers. // X(variable) #define PARAMETERS \ X(AHRS_MAG_BIAS_X) \ X(AHRS_MAG_BIAS_Y) \ X(AHRS_MAG_BIAS_Z) \ X(AHRS_MAG_SCALE_X) \ X(AHRS_MAG_SCALE_Y) \ X(AHRS_MAG_SCALE_Z) \ X(AHRS_ACC_BIAS_X) \ X(AHRS_ACC_BIAS_Y) \ X(AHRS_ACC_BIAS_Z) \ X(AHRS_ACC_SCALE_X) \ X(AHRS_ACC_SCALE_Y) \ X(AHRS_ACC_SCALE_Z) \ X(AHRS_Q_VALUE) \ X(RF_TILT_MIN) \ X(RF_TILT_MAX) \ X(AHRS_MAG_R) \ X(AHRS_ACC_R) // Increment this to force reset of all parameters. // Do that if you reorder the existing items, adding new items to end is ok. #define PARAMETERS_VERSION 1