Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/OSD.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Here are the OSD Elements provided by INAV.
| 23 | OSD_HOME_DIST | 1.6.0 | |
| 24 | OSD_HEADING | 1.6.0 | |
| 25 | OSD_VARIO | 1.6.0 | |
| 26 | OSD_VARIO_NUM | 1.6.0 | |
| 26 | OSD_VERTICAL_SPEED_INDICATOR | 1.6.0 | |
| 27 | OSD_AIR_SPEED | 1.7.3 | |
| 28 | OSD_ONTIME_FLYTIME | 1.8.0 | |
| 29 | OSD_RTC_TIME | 1.8.0 | |
Expand Down
2 changes: 1 addition & 1 deletion src/main/cms/cms_menu_osd.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ static const OSD_Entry menuOsdElemsEntries[] =
OSD_ELEMENT_ENTRY("CRS HLD ADJ", OSD_COURSE_HOLD_ADJUSTMENT),
#if defined(USE_BARO) || defined(USE_GPS)
OSD_ELEMENT_ENTRY("VARIO", OSD_VARIO),
OSD_ELEMENT_ENTRY("VARIO NUM", OSD_VARIO_NUM),
OSD_ELEMENT_ENTRY("V SPEED", OSD_VERTICAL_SPEED_INDICATOR),
#endif // defined
OSD_ELEMENT_ENTRY("ALTITUDE", OSD_ALTITUDE),
OSD_ELEMENT_ENTRY("ALTITUDE MSL", OSD_ALTITUDE_MSL),
Expand Down
6 changes: 3 additions & 3 deletions src/main/io/osd.c
Original file line number Diff line number Diff line change
Expand Up @@ -3023,7 +3023,7 @@ static bool osdDrawSingleElement(uint8_t item)
return true;
}

case OSD_VARIO_NUM:
case OSD_VERTICAL_SPEED_INDICATOR:
{
int16_t value = getEstimatedActualVelocity(Z);
char sym;
Expand Down Expand Up @@ -4409,8 +4409,8 @@ void pgResetFn_osdLayoutsConfig(osdLayoutsConfig_t *osdLayoutsConfig)

// avoid OSD_VARIO under OSD_CROSSHAIRS
osdLayoutsConfig->item_pos[0][OSD_VARIO] = OSD_POS(23, 5);
// OSD_VARIO_NUM at the right of OSD_VARIO
osdLayoutsConfig->item_pos[0][OSD_VARIO_NUM] = OSD_POS(24, 7);
// OSD_VERTICAL_SPEED_INDICATOR at the right of OSD_VARIO
osdLayoutsConfig->item_pos[0][OSD_VERTICAL_SPEED_INDICATOR] = OSD_POS(24, 7);
osdLayoutsConfig->item_pos[0][OSD_HOME_DIR] = OSD_POS(14, 11);
osdLayoutsConfig->item_pos[0][OSD_ARTIFICIAL_HORIZON] = OSD_POS(8, 6);
osdLayoutsConfig->item_pos[0][OSD_HORIZON_SIDEBARS] = OSD_POS(8, 6);
Expand Down
2 changes: 1 addition & 1 deletion src/main/io/osd.h
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ typedef enum {
OSD_HOME_DIST,
OSD_HEADING,
OSD_VARIO,
OSD_VARIO_NUM,
OSD_VERTICAL_SPEED_INDICATOR,
OSD_AIR_SPEED,
OSD_ONTIME_FLYTIME,
OSD_RTC_TIME,
Expand Down
7 changes: 5 additions & 2 deletions src/main/io/osd_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,13 @@ void osdDrawSidebars(displayPort_t *display, displayCanvas_t *canvas)
#endif

#ifdef USE_GPS
/*
* 3D speed in cm/s
*/
int16_t osdGet3DSpeed(void)
{
int16_t vert_speed = getEstimatedActualVelocity(Z);
int16_t hor_speed = gpsSol.groundSpeed;
float vert_speed = getEstimatedActualVelocity(Z);
float hor_speed = (float)gpsSol.groundSpeed;
return (int16_t)calc_length_pythagorean_2D(hor_speed, vert_speed);
}
#endif
2 changes: 1 addition & 1 deletion src/main/io/osd_dji_hd.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ const djiOsdMapping_t djiOSDItemIndexMap[] = {
{ OSD_HOME_DIR, FEATURE_GPS }, // DJI: OSD_HOME_DIR
{ OSD_HOME_DIST, FEATURE_GPS }, // DJI: OSD_HOME_DIST
{ OSD_HEADING, 0 }, // DJI: OSD_NUMERICAL_HEADING
{ OSD_VARIO_NUM, 0 }, // DJI: OSD_NUMERICAL_VARIO
{ OSD_VERTICAL_SPEED_INDICATOR, 0 }, // DJI: OSD_NUMERICAL_VARIO
{ -1, 0 }, // DJI: OSD_COMPASS_BAR
{ OSD_ESC_TEMPERATURE, 0 }, // DJI: OSD_ESC_TEMPERATURE
{ OSD_ESC_RPM, 0 }, // DJI: OSD_ESC_RPM
Expand Down
3 changes: 3 additions & 0 deletions src/main/sensors/pitotmeter.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,9 @@ void pitotUpdate(void)
pitotThread();
}

/*
* Airspeed estimate in cm/s
*/
float getAirspeedEstimate(void)
{
return pitot.airSpeed;
Expand Down