|
Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
#include <ch.h>#include <hal.h>Go to the source code of this file.
Data Structures | |
| union | DshotEPeriodPacket |
| ERPS classic rpm frame. More... | |
| union | DshotEPeriodTelemetry |
| ERPS telemetry frame. More... | |
| struct | DshotErps |
| ERPS complete frame, raw and decoded. More... | |
| struct | DshotEPeriodPacket.__unnamed0__ |
| struct | DshotEPeriodTelemetry.__unnamed0__ |
Enumerations | |
| enum | EdtType { EDT_NOTEDT =0x0 , EDT_TEMP =0x2 , EDT_VOLT =0x4 , EDT_CURRENT =0x6 , EDT_DBG1 =0x8 , EDT_DBG2 =0xA , EDT_STRESS =0xC , EDT_STATUS =0xE } |
| ERPS telemetry type. More... | |
| enum | EdtStatus { EDT_STATUS_ALERT = 1<<7 , EDT_STATUS_WARNING = 1<<6 , EDT_STATUS_ERROR = 1<<5 } |
Functions | |
| const DshotErps * | DshotErpsSetFromFrame (DshotErps *derpsp, uint32_t frame) |
| initialise from GCR encoded frame | |
| const DshotErps * | DshotErpsSetFromRpm (DshotErps *derpsp, uint32_t rpm) |
| initialise from rpm value | |
| uint32_t | DshotErpsGetEperiod (const DshotErps *derpsp) |
| return eperiod from mantisse and exponent | |
| uint32_t | DshotErpsGetRpm (const DshotErps *derpsp) |
| calculate and return rpm | |
| bool | DshotErpsCheckCrc4 (const DshotErps *derpsp) |
| check packed validity | |
| static uint32_t | DshotErpsGetFrame (const DshotErps *derpsp) |
| return encoded frame | |
| static bool | DshotErpsIsEdt (const DshotErps *derpsp) |
| return true if current frame is a telemetry frame | |
| static EdtType | DshotErpsEdtType (const DshotErps *derpsp) |
| return type of a telemetry frame | |
| static uint8_t | DshotErpsEdtTempCentigrade (const DshotErps *derpsp) |
| return temperature for a temperature telemetry frame | |
| static uint16_t | DshotErpsEdtCentiVolts (const DshotErps *derpsp) |
| return voltage for a voltage telemetry frame | |
| static uint16_t | DshotErpsEdtCurrentAmp (const DshotErps *derpsp) |
| return current intensity for a current telemetry frame | |
| static uint16_t | DshotErpsEdtStress (const DshotErps *derpsp) |
| return stress value | |
| static uint16_t | DshotErpsEdtStatus (const DshotErps *derpsp) |
| return status value | |
| union DshotEPeriodPacket |
ERPS classic rpm frame.
Definition at line 30 of file dshot_erps.h.
| Data Fields | ||
|---|---|---|
| struct DshotEPeriodPacket.__unnamed0__ | __unnamed__ | |
| uint16_t | rawFrame | |
| union DshotEPeriodTelemetry |
ERPS telemetry frame.
Definition at line 42 of file dshot_erps.h.
| Data Fields | ||
|---|---|---|
| struct DshotEPeriodTelemetry.__unnamed0__ | __unnamed__ | |
| uint16_t | rawFrame | |
| struct DshotErps |
ERPS complete frame, raw and decoded.
Definition at line 58 of file dshot_erps.h.
| Data Fields | ||
|---|---|---|
| uint32_t | ef | |
| DshotEPeriodPacket | ep | |
| struct DshotEPeriodPacket.__unnamed0__ |
Definition at line 31 of file dshot_erps.h.
| Data Fields | ||
|---|---|---|
| uint16_t | crc:4 | |
| uint16_t | exponent:3 | |
| uint16_t | mantisse:9 | |
| struct DshotEPeriodTelemetry.__unnamed0__ |
Definition at line 43 of file dshot_erps.h.
| Data Fields | ||
|---|---|---|
| uint16_t | crc:4 | |
| EdtType | edt_type:4 | |
| uint16_t | edt_value:8 | |
| enum EdtStatus |
| Enumerator | |
|---|---|
| EDT_STATUS_ALERT | |
| EDT_STATUS_WARNING | |
| EDT_STATUS_ERROR | |
Definition at line 21 of file dshot_erps.h.
| enum EdtType |
ERPS telemetry type.
| Enumerator | |
|---|---|
| EDT_NOTEDT | |
| EDT_TEMP | |
| EDT_VOLT | |
| EDT_CURRENT | |
| EDT_DBG1 | |
| EDT_DBG2 | |
| EDT_STRESS | |
| EDT_STATUS | |
Definition at line 14 of file dshot_erps.h.
| bool DshotErpsCheckCrc4 | ( | const DshotErps * | derpsp | ) |
check packed validity
| [in] | derpsp | pointer to the DshotErps object |
Definition at line 99 of file dshot_erps.c.
References crc4(), DshotErps::ep, and DshotEPeriodPacket::rawFrame.
return voltage for a voltage telemetry frame
| [in] | derpsp | pointer to the DshotErps object @api |
Definition at line 115 of file dshot_erps.h.
References DshotErps::ep, and DshotEPeriodPacket::rawFrame.
return current intensity for a current telemetry frame
| [in] | derpsp | pointer to the DshotErps object @api |
Definition at line 124 of file dshot_erps.h.
References DshotErps::ep, and DshotEPeriodPacket::rawFrame.
return status value
| [in] | derpsp | pointer to the DshotErps object @api |
Definition at line 144 of file dshot_erps.h.
References DshotErps::ep, and DshotEPeriodPacket::rawFrame.
return stress value
| [in] | derpsp | pointer to the DshotErps object @api |
Definition at line 134 of file dshot_erps.h.
References DshotErps::ep, and DshotEPeriodPacket::rawFrame.
return temperature for a temperature telemetry frame
| [in] | derpsp | pointer to the DshotErps object @api |
Definition at line 106 of file dshot_erps.h.
References DshotErps::ep, and DshotEPeriodPacket::rawFrame.
return type of a telemetry frame
| [in] | derpsp | pointer to the DshotErps object @api |
Definition at line 97 of file dshot_erps.h.
References DshotErps::ep, and DshotEPeriodPacket::rawFrame.
return eperiod from mantisse and exponent
| [in] | derpsp | pointer to the DshotErps object |
Definition at line 72 of file dshot_erps.c.
References DshotErps::ep.
Referenced by DshotErpsGetRpm().
return encoded frame
| [in] | derpsp | pointer to the DshotErps object @api |
Definition at line 77 of file dshot_erps.h.
References DshotErps::ef.
calculate and return rpm
| [in] | derpsp | pointer to the DshotErps object |
Definition at line 87 of file dshot_erps.c.
References DshotErpsGetEperiod().
|
inlinestatic |
return true if current frame is a telemetry frame
| [in] | derpsp | pointer to the DshotErps object @api |
Definition at line 84 of file dshot_erps.h.
References DshotErps::ep, and DshotEPeriodPacket::rawFrame.
initialise from GCR encoded frame
| [in] | derpsp | pointer to the DshotErps object @api |
Definition at line 44 of file dshot_erps.c.
References DshotErps::ef, frame, and frameToPacket().
initialise from rpm value
| [in] | derpsp | pointer to the DshotErps object @api |
Definition at line 57 of file dshot_erps.c.
References rpm, and setFromEperiod().