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
10 changes: 10 additions & 0 deletions docs/Settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -4302,6 +4302,16 @@ Use wind estimation for remaining flight time/distance estimation

---

### osd_estimations_wind_mps

Wind speed estimation in m/s

| Default | Min | Max |
| --- | --- | --- |
| OFF | OFF | ON |

---

### osd_failsafe_switch_layout

If enabled the OSD automatically switches to the first layout during failsafe
Expand Down
6 changes: 6 additions & 0 deletions src/main/fc/settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3463,6 +3463,12 @@ groups:
condition: USE_WIND_ESTIMATOR
field: estimations_wind_compensation
type: bool
- name: osd_estimations_wind_mps
description: "Wind speed estimation in m/s"
default_value: OFF
condition: USE_WIND_ESTIMATOR
field: estimations_wind_mps
type: bool

- name: osd_failsafe_switch_layout
description: "If enabled the OSD automatically switches to the first layout during failsafe"
Expand Down
14 changes: 11 additions & 3 deletions src/main/io/osd.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ static bool osdDisplayHasCanvas;

#define AH_MAX_PITCH_DEFAULT 20 // Specify default maximum AHI pitch value displayed (degrees)

PG_REGISTER_WITH_RESET_TEMPLATE(osdConfig_t, osdConfig, PG_OSD_CONFIG, 9);
PG_REGISTER_WITH_RESET_TEMPLATE(osdConfig_t, osdConfig, PG_OSD_CONFIG, 10);
PG_REGISTER_WITH_RESET_FN(osdLayoutsConfig_t, osdLayoutsConfig, PG_OSD_LAYOUTS_CONFIG, 1);

void osdStartedSaveProcess(void) {
Expand Down Expand Up @@ -484,8 +484,16 @@ static void osdFormatWindSpeedStr(char *buff, int32_t ws, bool isValid)
break;
default:
case OSD_UNIT_METRIC:
centivalue = CMSEC_TO_CENTIKPH(ws);
suffix = SYM_KMH;
if (osdConfig()->estimations_wind_mps)
{
centivalue = ws;
suffix = SYM_MS;
}
else
{
centivalue = CMSEC_TO_CENTIKPH(ws);
suffix = SYM_KMH;
}
break;
}

Expand Down
1 change: 1 addition & 0 deletions src/main/io/osd.h
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@ typedef struct osdConfig_s {

#ifdef USE_WIND_ESTIMATOR
bool estimations_wind_compensation; // use wind compensation for estimated remaining flight/distance
bool estimations_wind_mps; // wind speed estimation in m/s
#endif
uint8_t coordinate_digits;
bool osd_failsafe_switch_layout;
Expand Down