mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-20 06:45:16 +03:00
Fixed OSD tests after GPS changes.
This commit is contained in:
parent
5f1ede6534
commit
6dfff4ac4d
2 changed files with 15 additions and 8 deletions
|
@ -38,8 +38,6 @@
|
||||||
#include "drivers/serial_softserial.h"
|
#include "drivers/serial_softserial.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define USE_SERIAL (defined(USE_UART) || defined(USE_SOFTSERIAL1) || defined(USE_SOFTSERIAL2))
|
|
||||||
|
|
||||||
#ifdef SITL
|
#ifdef SITL
|
||||||
#include "drivers/serial_tcp.h"
|
#include "drivers/serial_tcp.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -332,7 +330,7 @@ serialPort_t *openSerialPort(
|
||||||
portMode_t mode,
|
portMode_t mode,
|
||||||
portOptions_t options)
|
portOptions_t options)
|
||||||
{
|
{
|
||||||
#if !(USE_SERIAL)
|
#if !(defined(USE_UART) || defined(USE_SOFTSERIAL1) || defined(USE_SOFTSERIAL2))
|
||||||
UNUSED(rxCallback);
|
UNUSED(rxCallback);
|
||||||
UNUSED(baudRate);
|
UNUSED(baudRate);
|
||||||
UNUSED(mode);
|
UNUSED(mode);
|
||||||
|
|
|
@ -24,17 +24,26 @@ extern "C" {
|
||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
|
|
||||||
#include "build/debug.h"
|
#include "build/debug.h"
|
||||||
|
|
||||||
#include "blackbox/blackbox.h"
|
#include "blackbox/blackbox.h"
|
||||||
|
|
||||||
#include "config/parameter_group_ids.h"
|
#include "config/parameter_group_ids.h"
|
||||||
|
|
||||||
#include "drivers/max7456_symbols.h"
|
#include "drivers/max7456_symbols.h"
|
||||||
|
|
||||||
#include "fc/config.h"
|
#include "fc/config.h"
|
||||||
#include "fc/rc_controls.h"
|
#include "fc/rc_controls.h"
|
||||||
#include "fc/rc_modes.h"
|
#include "fc/rc_modes.h"
|
||||||
#include "fc/runtime_config.h"
|
#include "fc/runtime_config.h"
|
||||||
|
|
||||||
#include "flight/pid.h"
|
#include "flight/pid.h"
|
||||||
#include "flight/imu.h"
|
#include "flight/imu.h"
|
||||||
|
|
||||||
|
#include "io/gps.h"
|
||||||
#include "io/osd.h"
|
#include "io/osd.h"
|
||||||
|
|
||||||
#include "sensors/battery.h"
|
#include "sensors/battery.h"
|
||||||
|
|
||||||
#include "rx/rx.h"
|
#include "rx/rx.h"
|
||||||
|
|
||||||
void osdRefresh(timeUs_t currentTimeUs);
|
void osdRefresh(timeUs_t currentTimeUs);
|
||||||
|
@ -48,10 +57,10 @@ extern "C" {
|
||||||
int16_t debug[DEBUG16_VALUE_COUNT];
|
int16_t debug[DEBUG16_VALUE_COUNT];
|
||||||
int16_t rcData[MAX_SUPPORTED_RC_CHANNEL_COUNT];
|
int16_t rcData[MAX_SUPPORTED_RC_CHANNEL_COUNT];
|
||||||
uint8_t GPS_numSat;
|
uint8_t GPS_numSat;
|
||||||
uint16_t GPS_speed;
|
|
||||||
uint16_t GPS_distanceToHome;
|
uint16_t GPS_distanceToHome;
|
||||||
uint16_t GPS_directionToHome;
|
uint16_t GPS_directionToHome;
|
||||||
int32_t GPS_coord[2];
|
int32_t GPS_coord[2];
|
||||||
|
gpsSolutionData_t gpsSol;
|
||||||
|
|
||||||
PG_REGISTER(batteryConfig_t, batteryConfig, PG_BATTERY_CONFIG, 0);
|
PG_REGISTER(batteryConfig_t, batteryConfig, PG_BATTERY_CONFIG, 0);
|
||||||
PG_REGISTER(blackboxConfig_t, blackboxConfig, PG_BLACKBOX_CONFIG, 0);
|
PG_REGISTER(blackboxConfig_t, blackboxConfig, PG_BLACKBOX_CONFIG, 0);
|
||||||
|
@ -283,7 +292,7 @@ TEST(OsdTest, TestStatsImperial)
|
||||||
// and
|
// and
|
||||||
// these conditions occur during flight
|
// these conditions occur during flight
|
||||||
rssi = 1024;
|
rssi = 1024;
|
||||||
GPS_speed = 500;
|
gpsSol.groundSpeed = 500;
|
||||||
GPS_distanceToHome = 20;
|
GPS_distanceToHome = 20;
|
||||||
simulationBatteryVoltage = 158;
|
simulationBatteryVoltage = 158;
|
||||||
simulationAltitude = 100;
|
simulationAltitude = 100;
|
||||||
|
@ -291,7 +300,7 @@ TEST(OsdTest, TestStatsImperial)
|
||||||
osdRefresh(simulationTime);
|
osdRefresh(simulationTime);
|
||||||
|
|
||||||
rssi = 512;
|
rssi = 512;
|
||||||
GPS_speed = 800;
|
gpsSol.groundSpeed = 800;
|
||||||
GPS_distanceToHome = 50;
|
GPS_distanceToHome = 50;
|
||||||
simulationBatteryVoltage = 147;
|
simulationBatteryVoltage = 147;
|
||||||
simulationAltitude = 150;
|
simulationAltitude = 150;
|
||||||
|
@ -299,7 +308,7 @@ TEST(OsdTest, TestStatsImperial)
|
||||||
osdRefresh(simulationTime);
|
osdRefresh(simulationTime);
|
||||||
|
|
||||||
rssi = 256;
|
rssi = 256;
|
||||||
GPS_speed = 200;
|
gpsSol.groundSpeed = 200;
|
||||||
GPS_distanceToHome = 100;
|
GPS_distanceToHome = 100;
|
||||||
simulationBatteryVoltage = 152;
|
simulationBatteryVoltage = 152;
|
||||||
simulationAltitude = 200;
|
simulationAltitude = 200;
|
||||||
|
@ -343,7 +352,7 @@ TEST(OsdTest, TestStatsMetric)
|
||||||
// and
|
// and
|
||||||
// these conditions occur during flight (simplified to less assignments than previous test)
|
// these conditions occur during flight (simplified to less assignments than previous test)
|
||||||
rssi = 256;
|
rssi = 256;
|
||||||
GPS_speed = 800;
|
gpsSol.groundSpeed = 800;
|
||||||
GPS_distanceToHome = 100;
|
GPS_distanceToHome = 100;
|
||||||
simulationBatteryVoltage = 147;
|
simulationBatteryVoltage = 147;
|
||||||
simulationAltitude = 200;
|
simulationAltitude = 200;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue