|
enum | lookupTableIndex_e {
TABLE_OFF_ON = 0,
TABLE_UNIT,
TABLE_ALIGNMENT,
TABLE_GPS_PROVIDER,
TABLE_GPS_SBAS_MODE,
TABLE_BLACKBOX_DEVICE,
TABLE_CURRENT_SENSOR,
TABLE_GIMBAL_MODE,
TABLE_PID_CONTROLLER,
TABLE_SERIAL_RX,
TABLE_GYRO_FILTER,
TABLE_GYRO_LPF
} |
|
enum | cliValueFlag_e {
VAR_UINT8 = (0 << VALUE_TYPE_OFFSET),
VAR_INT8 = (1 << VALUE_TYPE_OFFSET),
VAR_UINT16 = (2 << VALUE_TYPE_OFFSET),
VAR_INT16 = (3 << VALUE_TYPE_OFFSET),
VAR_UINT32 = (4 << VALUE_TYPE_OFFSET),
VAR_FLOAT = (5 << VALUE_TYPE_OFFSET),
MASTER_VALUE = (0 << VALUE_SECTION_OFFSET),
PROFILE_VALUE = (1 << VALUE_SECTION_OFFSET),
CONTROL_RATE_VALUE = (2 << VALUE_SECTION_OFFSET),
MODE_DIRECT = (0 << VALUE_MODE_OFFSET),
MODE_LOOKUP = (1 << VALUE_MODE_OFFSET)
} |
|
enum | dumpFlags_e { DUMP_MASTER = (1 << 0),
DUMP_PROFILE = (1 << 1),
DUMP_CONTROL_RATE_PROFILE = (1 << 2)
} |
|
The cli module implements a command line interface for setting various ninjaflight config variables. It operates on a struct ninja object and on corresponding struct config object. It also provides various commands for diagnostics and control. It is similar to other configuration interfaces such as msp but in contrast to msp does not use a binary protocol, instead using a human readable stream of data.
#define CLI_COMMAND_DEF |
( |
|
name, |
|
|
|
description, |
|
|
|
args, |
|
|
|
method |
|
) |
| |
Value:{ \
name , \
description , \
args , \
method \
}
#define CPATH |
( |
|
path | ) |
offsetof(struct config, path) |
#define printSectionBreak |
( |
| ) |
cliPrintf(self, (char *)sectionBreak) |
#define VALUE_MODE_MASK (0xC0) |
#define VALUE_MODE_OFFSET 6 |
#define VALUE_SECTION_MASK (0x30) |
#define VALUE_SECTION_OFFSET 4 |
#define VALUE_TYPE_MASK (0x0F) |
#define VALUE_TYPE_OFFSET 0 |
Enumerator |
---|
VAR_UINT8 |
|
VAR_INT8 |
|
VAR_UINT16 |
|
VAR_INT16 |
|
VAR_UINT32 |
|
VAR_FLOAT |
|
MASTER_VALUE |
|
PROFILE_VALUE |
|
CONTROL_RATE_VALUE |
|
MODE_DIRECT |
|
MODE_LOOKUP |
|
Enumerator |
---|
DUMP_MASTER |
|
DUMP_PROFILE |
|
DUMP_CONTROL_RATE_PROFILE |
|
Enumerator |
---|
TABLE_OFF_ON |
|
TABLE_UNIT |
|
TABLE_ALIGNMENT |
|
TABLE_GPS_PROVIDER |
|
TABLE_GPS_SBAS_MODE |
|
TABLE_BLACKBOX_DEVICE |
|
TABLE_CURRENT_SENSOR |
|
TABLE_GIMBAL_MODE |
|
TABLE_PID_CONTROLLER |
|
TABLE_SERIAL_RX |
|
TABLE_GYRO_FILTER |
|
TABLE_GYRO_LPF |
|
bool cli_is_active |
( |
struct cli * |
self | ) |
|
void cli_update |
( |
struct cli * |
self | ) |
|
const clivalue_t valueTable[] |