NinjaFlight
|
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <strings.h>
#include <math.h>
#include <ctype.h>
#include <platform.h>
#include "version.h"
#include "build_config.h"
#include "common/utils.h"
#include "common/axis.h"
#include "common/maths.h"
#include "common/color.h"
#include "common/typeconversion.h"
#include "config/tilt.h"
#include "config/gimbal.h"
#include "drivers/system.h"
#include "drivers/sensor.h"
#include "drivers/accgyro.h"
#include "drivers/compass.h"
#include "drivers/serial.h"
#include "drivers/bus_i2c.h"
#include "drivers/pwm_rx.h"
#include "drivers/sdcard.h"
#include "drivers/pwm_output.h"
#include "common/buf_writer.h"
#include "flight/rate_profile.h"
#include "io/rc_adjustments.h"
#include "io/serial.h"
#include "io/ledstrip.h"
#include "io/beeper.h"
#include "rx/rx.h"
#include "rx/spektrum.h"
#include "sensors/battery.h"
#include "sensors/boardalignment.h"
#include "sensors/acceleration.h"
#include "sensors/gyro.h"
#include "sensors/compass.h"
#include "sensors/barometer.h"
#include "blackbox/blackbox.h"
#include "flight/anglerate.h"
#include "flight/gtune.h"
#include "flight/mixer.h"
#include "flight/navigation.h"
#include "flight/failsafe.h"
#include "flight/altitudehold.h"
#include "flight/tilt.h"
#include "ninja.h"
#include "config/config.h"
#include "config/feature.h"
#include "config/profile.h"
#include "common/printf.h"
#include "cli.h"
Data Structures | |
struct | clicmd_t |
struct | lookupTableEntry_s |
struct | cliMinMaxConfig_s |
struct | cliLookupTableConfig_s |
union | cliValueConfig_t |
union | __attribute__ |
union | int_float_value_t |
Macros | |
#define | SENSOR_NAMES_MASK (SENSOR_GYRO | SENSOR_ACC | SENSOR_BARO | SENSOR_MAG) |
#define | CLI_COMMAND_DEF(name, description, args, method) |
#define | CMD_COUNT (sizeof(cmdTable) / sizeof(clicmd_t)) |
#define | VALUE_TYPE_OFFSET 0 |
#define | VALUE_SECTION_OFFSET 4 |
#define | VALUE_MODE_OFFSET 6 |
#define | VALUE_TYPE_MASK (0x0F) |
#define | VALUE_SECTION_MASK (0x30) |
#define | VALUE_MODE_MASK (0xC0) |
#define | CPATH(path) offsetof(struct config, path) |
#define | PPATH(path) offsetof(struct config_profile, path) |
#define | RPATH(path) offsetof(struct rate_profile, path) |
#define | DUMP_ALL (DUMP_MASTER | DUMP_PROFILE | DUMP_CONTROL_RATE_PROFILE) |
#define | printSectionBreak() cliPrintf(self, (char *)sectionBreak) |
Typedefs | |
typedef struct lookupTableEntry_s | lookupTableEntry_t |
typedef struct cliMinMaxConfig_s | cliMinMaxConfig_t |
typedef struct cliLookupTableConfig_s | cliLookupTableConfig_t |
Enumerations | |
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) } |
Functions | |
void | cli_start (struct cli *self, serialPort_t *serialPort) |
void | cli_update (struct cli *self) |
bool | cli_is_active (struct cli *self) |
void | cli_init (struct cli *self, struct ninja *ninja, struct config *config, const struct system_calls *system) |
Variables | |
const clicmd_t | cmdTable [] |
const clivalue_t | valueTable [] |