drone status menue with status and critical event log implemented
This commit is contained in:
@@ -138,6 +138,20 @@ MspNavMode parseMspNavMode(Uint8List payload) {
|
||||
/// 0-100 berechnet, siehe [MspCommands.inavAnalog]).
|
||||
int parseMspInavAnalogBatteryPercent(Uint8List payload) => payload[21];
|
||||
|
||||
/// Parst die `MSP2_INAV_ANALOG`-Antwort und liefert die Akkuspannung in Volt
|
||||
/// (Offset 1, u16 in 0.01V-Schritten - `battery.c`: `static uint16_t vbat`,
|
||||
/// Kommentar "battery voltage in 0.01V steps", siehe [MspCommands.inavAnalog]).
|
||||
double parseMspInavAnalogVoltage(Uint8List payload) =>
|
||||
ByteData.sublistView(payload).getUint16(1, Endian.little) / 100.0;
|
||||
|
||||
/// Parst die `MSP2_INAV_ANALOG`-Antwort und liefert die aktuelle
|
||||
/// Stromaufnahme in Ampere (Offset 3, `fc_msp.c`: `sbufWriteU16(dst,
|
||||
/// getAmperage())` - "send amperage in 0.01 A steps", `getAmperage()` selbst
|
||||
/// liefert `int16_t`, deshalb vorzeichenbehaftet gelesen, siehe
|
||||
/// [MspCommands.inavAnalog]).
|
||||
double parseMspInavAnalogAmperage(Uint8List payload) =>
|
||||
ByteData.sublistView(payload).getInt16(3, Endian.little) / 100.0;
|
||||
|
||||
/// Parst die `MSP2_INAV_GET_LINK_STATS`-Antwort und liefert die
|
||||
/// Empfaenger-Linkqualitaet in Prozent (Offset 1, `rxLinkStatistics.uplinkLQ`
|
||||
/// - bereits 0-100, siehe [MspCommands.inavLinkStats]).
|
||||
|
||||
Reference in New Issue
Block a user