mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-18 22:05:17 +03:00
Added support for full range uint16_t parameters in CLI.
This commit is contained in:
parent
d833a51317
commit
f5a979c737
3 changed files with 360 additions and 311 deletions
|
@ -179,6 +179,11 @@ typedef struct cliMinMaxConfig_s {
|
|||
const int16_t max;
|
||||
} cliMinMaxConfig_t;
|
||||
|
||||
typedef struct cliMinMaxUnsignedConfig_s {
|
||||
const uint16_t min;
|
||||
const uint16_t max;
|
||||
} cliMinMaxUnsignedConfig_t;
|
||||
|
||||
typedef struct cliLookupTableConfig_s {
|
||||
const lookupTableIndex_e tableIndex;
|
||||
} cliLookupTableConfig_t;
|
||||
|
@ -188,11 +193,12 @@ typedef struct cliArrayLengthConfig_s {
|
|||
} cliArrayLengthConfig_t;
|
||||
|
||||
typedef union {
|
||||
cliLookupTableConfig_t lookup; // used for MODE_LOOKUP excl. VAR_UINT32
|
||||
cliMinMaxConfig_t minmax; // used for MODE_DIRECT
|
||||
cliArrayLengthConfig_t array; // used for MODE_ARRAY
|
||||
uint8_t bitpos; // used for MODE_BITSET
|
||||
uint32_t u32_max; // used for MODE_DIRECT with VAR_UINT32
|
||||
cliLookupTableConfig_t lookup; // used for MODE_LOOKUP excl. VAR_UINT32
|
||||
cliMinMaxConfig_t minmax; // used for MODE_DIRECT with signed parameters
|
||||
cliMinMaxUnsignedConfig_t minmaxUnsigned; // used for MODE_DIRECT with unsigned parameters
|
||||
cliArrayLengthConfig_t array; // used for MODE_ARRAY
|
||||
uint8_t bitpos; // used for MODE_BITSET
|
||||
uint32_t u32Max; // used for MODE_DIRECT with VAR_UINT32
|
||||
} cliValueConfig_t;
|
||||
|
||||
typedef struct clivalue_s {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue