|
Sensor Fusion Library 0.6.1
Orientation sensing for Espressif (ESP32, ESP8266) processors
|
Command interpreter which interfaces to the Sensor Fusion Toolbox. Commands sent from the Toolbox (e.g. Save Calibration) are interpreted and acted on. More...
#include "sensor_fusion.h"#include "calibration_storage.h"#include "control.h"#include "fusion.h"
Go to the source code of this file.
Macros | |
| #define | cmd_VGplus (((((('V' << 8) | 'G') << 8) | '+') << 8) | ' ') |
| #define | cmd_VGminus (((((('V' << 8) | 'G') << 8) | '-') << 8) | ' ') |
| #define | cmd_DBplus (((((('D' << 8) | 'B') << 8) | '+') << 8) | ' ') |
| #define | cmd_DBminus (((((('D' << 8) | 'B') << 8) | '-') << 8) | ' ') |
| #define | cmd_Q3 (((((('Q' << 8) | '3') << 8) | ' ') << 8) | ' ') |
| #define | cmd_Q3M (((((('Q' << 8) | '3') << 8) | 'M') << 8) | ' ') |
| #define | cmd_Q3G (((((('Q' << 8) | '3') << 8) | 'G') << 8) | ' ') |
| #define | cmd_Q6MA (((((('Q' << 8) | '6') << 8) | 'M') << 8) | 'A') |
| #define | cmd_Q6AG (((((('Q' << 8) | '6') << 8) | 'A') << 8) | 'G') |
| #define | cmd_Q9 (((((('Q' << 8) | '9') << 8) | ' ') << 8) | ' ') |
| #define | cmd_RPCplus (((((('R' << 8) | 'P') << 8) | 'C') << 8) | '+') |
| #define | cmd_RPCminus (((((('R' << 8) | 'P') << 8) | 'C') << 8) | '-') |
| #define | cmd_ALTplus (((((('A' << 8) | 'L') << 8) | 'T') << 8) | '+') |
| #define | cmd_ALTminus (((((('A' << 8) | 'L') << 8) | 'T') << 8) | '-') |
| #define | cmd_RST (((((('R' << 8) | 'S') << 8) | 'T') << 8) | ' ') |
| #define | cmd_RINS (((((('R' << 8) | 'I') << 8) | 'N') << 8) | 'S') |
| #define | cmd_SVAC (((((('S' << 8) | 'V') << 8) | 'A') << 8) | 'C') |
| #define | cmd_SVMC (((((('S' << 8) | 'V') << 8) | 'M') << 8) | 'C') |
| #define | cmd_SVYC (((((('S' << 8) | 'V') << 8) | 'Y') << 8) | 'C') |
| #define | cmd_SVGC (((((('S' << 8) | 'V') << 8) | 'G') << 8) | 'C') |
| #define | cmd_ERAC (((((('E' << 8) | 'R') << 8) | 'A') << 8) | 'C') |
| #define | cmd_ERMC (((((('E' << 8) | 'R') << 8) | 'M') << 8) | 'C') |
| #define | cmd_ERYC (((((('E' << 8) | 'R') << 8) | 'Y') << 8) | 'C') |
| #define | cmd_ERGC (((((('E' << 8) | 'R') << 8) | 'G') << 8) | 'C') |
| #define | cmd_180X (((((('1' << 8) | '8') << 8) | '0') << 8) | 'X') |
| #define | cmd_180Y (((((('1' << 8) | '8') << 8) | '0') << 8) | 'Y') |
| #define | cmd_180Z (((((('1' << 8) | '8') << 8) | '0') << 8) | 'Z') |
| #define | cmd_M90X (((((('M' << 8) | '9') << 8) | '0') << 8) | 'X') |
| #define | cmd_P90X (((((('P' << 8) | '9') << 8) | '0') << 8) | 'X') |
| #define | cmd_M90Y (((((('M' << 8) | '9') << 8) | '0') << 8) | 'Y') |
| #define | cmd_P90Y (((((('P' << 8) | '9') << 8) | '0') << 8) | 'Y') |
| #define | cmd_M90Z (((((('M' << 8) | '9') << 8) | '0') << 8) | 'Z') |
| #define | cmd_P90Z (((((('P' << 8) | '9') << 8) | '0') << 8) | 'Z') |
| #define | cmd_PA00 (((((('P' << 8) | 'A') << 8) | '0') << 8) | '0') |
| #define | cmd_PA01 (((((('P' << 8) | 'A') << 8) | '0') << 8) | '1') |
| #define | cmd_PA02 (((((('P' << 8) | 'A') << 8) | '0') << 8) | '2') |
| #define | cmd_PA03 (((((('P' << 8) | 'A') << 8) | '0') << 8) | '3') |
| #define | cmd_PA04 (((((('P' << 8) | 'A') << 8) | '0') << 8) | '4') |
| #define | cmd_PA05 (((((('P' << 8) | 'A') << 8) | '0') << 8) | '5') |
| #define | cmd_PA06 (((((('P' << 8) | 'A') << 8) | '0') << 8) | '6') |
| #define | cmd_PA07 (((((('P' << 8) | 'A') << 8) | '0') << 8) | '7') |
| #define | cmd_PA08 (((((('P' << 8) | 'A') << 8) | '0') << 8) | '8') |
| #define | cmd_PA09 (((((('P' << 8) | 'A') << 8) | '0') << 8) | '9') |
| #define | cmd_PA10 (((((('P' << 8) | 'A') << 8) | '1') << 8) | '0') |
| #define | cmd_PA11 (((((('P' << 8) | 'A') << 8) | '1') << 8) | '1') |
Functions | |
| void | DecodeCommandBytes (SensorFusionGlobals *sfg, uint8_t input_buffer[], uint16_t nbytes) |
Command interpreter which interfaces to the Sensor Fusion Toolbox. Commands sent from the Toolbox (e.g. Save Calibration) are interpreted and acted on.
Definition in file control_input.c.
| #define cmd_180X (((((('1' << 8) | '8') << 8) | '0') << 8) | 'X') |
Definition at line 48 of file control_input.c.
| #define cmd_180Y (((((('1' << 8) | '8') << 8) | '0') << 8) | 'Y') |
Definition at line 49 of file control_input.c.
| #define cmd_180Z (((((('1' << 8) | '8') << 8) | '0') << 8) | 'Z') |
Definition at line 50 of file control_input.c.
| #define cmd_ALTminus (((((('A' << 8) | 'L') << 8) | 'T') << 8) | '-') |
Definition at line 37 of file control_input.c.
| #define cmd_ALTplus (((((('A' << 8) | 'L') << 8) | 'T') << 8) | '+') |
Definition at line 36 of file control_input.c.
| #define cmd_DBminus (((((('D' << 8) | 'B') << 8) | '-') << 8) | ' ') |
Definition at line 27 of file control_input.c.
| #define cmd_DBplus (((((('D' << 8) | 'B') << 8) | '+') << 8) | ' ') |
Definition at line 26 of file control_input.c.
| #define cmd_ERAC (((((('E' << 8) | 'R') << 8) | 'A') << 8) | 'C') |
Definition at line 44 of file control_input.c.
| #define cmd_ERGC (((((('E' << 8) | 'R') << 8) | 'G') << 8) | 'C') |
Definition at line 47 of file control_input.c.
| #define cmd_ERMC (((((('E' << 8) | 'R') << 8) | 'M') << 8) | 'C') |
Definition at line 45 of file control_input.c.
| #define cmd_ERYC (((((('E' << 8) | 'R') << 8) | 'Y') << 8) | 'C') |
Definition at line 46 of file control_input.c.
| #define cmd_M90X (((((('M' << 8) | '9') << 8) | '0') << 8) | 'X') |
Definition at line 51 of file control_input.c.
| #define cmd_M90Y (((((('M' << 8) | '9') << 8) | '0') << 8) | 'Y') |
Definition at line 53 of file control_input.c.
| #define cmd_M90Z (((((('M' << 8) | '9') << 8) | '0') << 8) | 'Z') |
Definition at line 55 of file control_input.c.
| #define cmd_P90X (((((('P' << 8) | '9') << 8) | '0') << 8) | 'X') |
Definition at line 52 of file control_input.c.
| #define cmd_P90Y (((((('P' << 8) | '9') << 8) | '0') << 8) | 'Y') |
Definition at line 54 of file control_input.c.
| #define cmd_P90Z (((((('P' << 8) | '9') << 8) | '0') << 8) | 'Z') |
Definition at line 56 of file control_input.c.
| #define cmd_PA00 (((((('P' << 8) | 'A') << 8) | '0') << 8) | '0') |
Definition at line 57 of file control_input.c.
| #define cmd_PA01 (((((('P' << 8) | 'A') << 8) | '0') << 8) | '1') |
Definition at line 58 of file control_input.c.
| #define cmd_PA02 (((((('P' << 8) | 'A') << 8) | '0') << 8) | '2') |
Definition at line 59 of file control_input.c.
| #define cmd_PA03 (((((('P' << 8) | 'A') << 8) | '0') << 8) | '3') |
Definition at line 60 of file control_input.c.
| #define cmd_PA04 (((((('P' << 8) | 'A') << 8) | '0') << 8) | '4') |
Definition at line 61 of file control_input.c.
| #define cmd_PA05 (((((('P' << 8) | 'A') << 8) | '0') << 8) | '5') |
Definition at line 62 of file control_input.c.
| #define cmd_PA06 (((((('P' << 8) | 'A') << 8) | '0') << 8) | '6') |
Definition at line 63 of file control_input.c.
| #define cmd_PA07 (((((('P' << 8) | 'A') << 8) | '0') << 8) | '7') |
Definition at line 64 of file control_input.c.
| #define cmd_PA08 (((((('P' << 8) | 'A') << 8) | '0') << 8) | '8') |
Definition at line 65 of file control_input.c.
| #define cmd_PA09 (((((('P' << 8) | 'A') << 8) | '0') << 8) | '9') |
Definition at line 66 of file control_input.c.
| #define cmd_PA10 (((((('P' << 8) | 'A') << 8) | '1') << 8) | '0') |
Definition at line 67 of file control_input.c.
| #define cmd_PA11 (((((('P' << 8) | 'A') << 8) | '1') << 8) | '1') |
Definition at line 68 of file control_input.c.
| #define cmd_Q3 (((((('Q' << 8) | '3') << 8) | ' ') << 8) | ' ') |
Definition at line 28 of file control_input.c.
| #define cmd_Q3G (((((('Q' << 8) | '3') << 8) | 'G') << 8) | ' ') |
Definition at line 30 of file control_input.c.
| #define cmd_Q3M (((((('Q' << 8) | '3') << 8) | 'M') << 8) | ' ') |
Definition at line 29 of file control_input.c.
| #define cmd_Q6AG (((((('Q' << 8) | '6') << 8) | 'A') << 8) | 'G') |
Definition at line 32 of file control_input.c.
| #define cmd_Q6MA (((((('Q' << 8) | '6') << 8) | 'M') << 8) | 'A') |
Definition at line 31 of file control_input.c.
| #define cmd_Q9 (((((('Q' << 8) | '9') << 8) | ' ') << 8) | ' ') |
Definition at line 33 of file control_input.c.
| #define cmd_RINS (((((('R' << 8) | 'I') << 8) | 'N') << 8) | 'S') |
Definition at line 39 of file control_input.c.
| #define cmd_RPCminus (((((('R' << 8) | 'P') << 8) | 'C') << 8) | '-') |
Definition at line 35 of file control_input.c.
| #define cmd_RPCplus (((((('R' << 8) | 'P') << 8) | 'C') << 8) | '+') |
Definition at line 34 of file control_input.c.
| #define cmd_RST (((((('R' << 8) | 'S') << 8) | 'T') << 8) | ' ') |
Definition at line 38 of file control_input.c.
| #define cmd_SVAC (((((('S' << 8) | 'V') << 8) | 'A') << 8) | 'C') |
Definition at line 40 of file control_input.c.
| #define cmd_SVGC (((((('S' << 8) | 'V') << 8) | 'G') << 8) | 'C') |
Definition at line 43 of file control_input.c.
| #define cmd_SVMC (((((('S' << 8) | 'V') << 8) | 'M') << 8) | 'C') |
Definition at line 41 of file control_input.c.
| #define cmd_SVYC (((((('S' << 8) | 'V') << 8) | 'Y') << 8) | 'C') |
Definition at line 42 of file control_input.c.
| #define cmd_VGminus (((((('V' << 8) | 'G') << 8) | '-') << 8) | ' ') |
Definition at line 25 of file control_input.c.
| #define cmd_VGplus (((((('V' << 8) | 'G') << 8) | '+') << 8) | ' ') |
Definition at line 24 of file control_input.c.
| void DecodeCommandBytes | ( | SensorFusionGlobals * | sfg, |
| uint8_t | input_buffer[], | ||
| uint16_t | nbytes | ||
| ) |
Located in control_input.c: This function is responsible for decoding commands, which can arrive externally (serial or WiFi) when sent by the NXP Sensor Fusion Toolbox, or by direct call. This function sets the appropriate flags in the ControlSubsystem data structure, or performs whatever other appropriate action called for by the command. Packet protocols are defined in the NXP Sensor Fusion for Kinetis Product Development Kit User Guide.
Definition at line 70 of file control_input.c.