mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-21 15:25:36 +03:00
CRSF Flight Mode Sensor Value update (#13854)
* CRSF Flight Mode Sensor Value update * Fix FS FM * Add ? for GPS not available * Need to check define * better name * Update mode and test unit * Fixes review CT * Fixes review JimB40 * Apply ctz comment * Update isAllowArmingWithoutFix * Fix fs/resc sw * Add required sats * Update comments
This commit is contained in:
parent
654d18ced4
commit
698b8616f9
7 changed files with 47 additions and 24 deletions
|
@ -44,6 +44,8 @@ extern "C" {
|
|||
#include "telemetry/msp_shared.h"
|
||||
#include "rx/crsf_protocol.h"
|
||||
#include "rx/expresslrs_telemetry.h"
|
||||
#include "fc/rc_modes.h"
|
||||
#include "flight/gps_rescue.h"
|
||||
#include "flight/imu.h"
|
||||
|
||||
#include "sensors/battery.h"
|
||||
|
@ -70,6 +72,7 @@ extern "C" {
|
|||
|
||||
PG_REGISTER(telemetryConfig_t, telemetryConfig, PG_TELEMETRY_CONFIG, 0);
|
||||
PG_REGISTER(systemConfig_t, systemConfig, PG_SYSTEM_CONFIG, 0);
|
||||
PG_REGISTER(gpsRescueConfig_t, gpsRescueConfig, PG_GPS_RESCUE, 0);
|
||||
}
|
||||
|
||||
#include "unittest_macros.h"
|
||||
|
@ -209,10 +212,10 @@ TEST(RxSpiExpressLrsTelemetryUnitTest, TestFlightMode)
|
|||
getNextTelemetryPayload(&payloadSize, &payload);
|
||||
EXPECT_EQ(currentPayloadIndex, 0);
|
||||
|
||||
EXPECT_EQ('W', payload[3]);
|
||||
EXPECT_EQ('A', payload[4]);
|
||||
EXPECT_EQ('I', payload[5]);
|
||||
EXPECT_EQ('T', payload[6]);
|
||||
EXPECT_EQ('A', payload[3]);
|
||||
EXPECT_EQ('C', payload[4]);
|
||||
EXPECT_EQ('R', payload[5]);
|
||||
EXPECT_EQ('O', payload[6]);
|
||||
EXPECT_EQ('*', payload[7]);
|
||||
EXPECT_EQ(0, payload[8]);
|
||||
|
||||
|
@ -464,4 +467,9 @@ extern "C" {
|
|||
|
||||
timeUs_t rxFrameTimeUs(void) { return 0; }
|
||||
|
||||
bool IS_RC_MODE_ACTIVE(boxId_e) { return false; }
|
||||
|
||||
int getArmingDisableFlags(void) { return 0; }
|
||||
|
||||
bool gpsRescueIsConfigured(void) { return false; }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue