Skip to content

Commit 58a6047

Browse files
authored
Merge pull request #10058 from iNavFlight/MrD_Allow-pilots-to-hide-question-marks
Allow pilots the option to hide question marks from the OSD.
2 parents d5823d3 + 946241d commit 58a6047

File tree

5 files changed

+24
-39
lines changed

5 files changed

+24
-39
lines changed

docs/Settings.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4422,6 +4422,16 @@ Value under which the OSD axis g force indicators will blink (g)
44224422

44234423
---
44244424

4425+
### osd_highlight_djis_missing_font_symbols
4426+
4427+
Show question marks where there is no symbol in the DJI font to represent the INAV OSD element's symbol. When off, blank spaces will be used. Only relevent for DJICOMPAT modes.
4428+
4429+
| Default | Min | Max |
4430+
| --- | --- | --- |
4431+
| ON | OFF | ON |
4432+
4433+
---
4434+
44254435
### osd_home_position_arm_screen
44264436

44274437
Should home position coordinates be displayed on the arming screen.

src/main/fc/settings.yaml

Lines changed: 5 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -3460,7 +3460,6 @@ groups:
34603460
min: 8
34613461
max: 11
34623462
default_value: 9
3463-
34643463
- name: osd_adsb_distance_warning
34653464
description: "Distance in meters of ADSB aircraft that is displayed"
34663465
default_value: 20000
@@ -3485,7 +3484,6 @@ groups:
34853484
min: 0
34863485
max: 64000
34873486
type: uint16_t
3488-
34893487
- name: osd_estimations_wind_compensation
34903488
description: "Use wind estimation for remaining flight time/distance estimation"
34913489
default_value: ON
@@ -3498,12 +3496,10 @@ groups:
34983496
condition: USE_WIND_ESTIMATOR
34993497
field: estimations_wind_mps
35003498
type: bool
3501-
35023499
- name: osd_failsafe_switch_layout
35033500
description: "If enabled the OSD automatically switches to the first layout during failsafe"
35043501
default_value: OFF
35053502
type: bool
3506-
35073503
- name: osd_plus_code_digits
35083504
description: "Numer of plus code digits before shortening with `osd_plus_code_short`. Precision at the equator: 10=13.9x13.9m; 11=2.8x3.5m; 12=56x87cm; 13=11x22cm."
35093505
field: plus_code_digits
@@ -3515,213 +3511,186 @@ groups:
35153511
field: plus_code_short
35163512
default_value: "0"
35173513
table: osd_plus_code_short
3518-
35193514
- name: osd_ahi_style
35203515
description: "Sets OSD Artificial Horizon style \"DEFAULT\" or \"LINE\" for the FrSky Graphical OSD."
35213516
field: ahi_style
35223517
default_value: "DEFAULT"
35233518
table: osd_ahi_style
35243519
type: uint8_t
3525-
35263520
- name: osd_force_grid
35273521
field: force_grid
35283522
type: bool
35293523
default_value: OFF
35303524
description: Force OSD to work in grid mode even if the OSD device supports pixel level access (mainly used for development)
3531-
35323525
- name: osd_ahi_bordered
35333526
field: ahi_bordered
35343527
type: bool
35353528
description: Shows a border/corners around the AHI region (pixel OSD only)
35363529
default_value: OFF
3537-
35383530
- name: osd_ahi_width
35393531
field: ahi_width
35403532
max: 255
35413533
description: AHI width in pixels (pixel OSD only)
35423534
default_value: 132
3543-
35443535
- name: osd_ahi_height
35453536
field: ahi_height
35463537
max: 255
35473538
description: AHI height in pixels (pixel OSD only)
35483539
default_value: 162
3549-
35503540
- name: osd_ahi_vertical_offset
35513541
field: ahi_vertical_offset
35523542
min: -128
35533543
max: 127
35543544
description: AHI vertical offset from center (pixel OSD only)
35553545
default_value: -18
3556-
35573546
- name: osd_sidebar_horizontal_offset
35583547
field: sidebar_horizontal_offset
35593548
min: -128
35603549
max: 127
35613550
default_value: 0
35623551
description: Sidebar horizontal offset from default position. Positive values move the sidebars closer to the edges.
3563-
35643552
- name: osd_left_sidebar_scroll_step
35653553
field: left_sidebar_scroll_step
35663554
max: 255
35673555
default_value: 0
35683556
description: How many units each sidebar step represents. 0 means the default value for the scroll type.
3569-
35703557
- name: osd_right_sidebar_scroll_step
35713558
field: right_sidebar_scroll_step
35723559
max: 255
35733560
default_value: 0
35743561
description: Same as left_sidebar_scroll_step, but for the right sidebar
3575-
35763562
- name: osd_sidebar_height
35773563
field: sidebar_height
35783564
min: 0
35793565
max: 5
35803566
default_value: 3
35813567
description: Height of sidebars in rows. 0 leaves only the level indicator arrows (Not for pixel OSD)
3582-
35833568
- name: osd_ahi_pitch_interval
35843569
field: ahi_pitch_interval
35853570
min: 0
35863571
max: 30
35873572
default_value: 0
35883573
description: Draws AHI at increments of the set pitch interval over the full pitch range. AHI line is drawn with ends offset when pitch first exceeds interval with offset increasing with increasing pitch. Offset direction changes between climb and dive. Set to 0 to disable (Not for pixel OSD)
3589-
35903574
- name: osd_home_position_arm_screen
35913575
type: bool
35923576
default_value: ON
35933577
description: Should home position coordinates be displayed on the arming screen.
3594-
35953578
- name: osd_pan_servo_index
35963579
description: Index of the pan servo, used to adjust osd home heading direction based on camera pan. Note that this feature does not work with continiously rotating servos.
35973580
field: pan_servo_index
35983581
min: 0
35993582
max: 16
36003583
default_value: 0
3601-
36023584
- name: osd_pan_servo_pwm2centideg
36033585
description: Centidegrees of pan servo rotation us PWM signal. A servo with 180 degrees of rotation from 1000 to 2000 us PWM typically needs `18` for this setting. Change sign to inverse direction.
36043586
field: pan_servo_pwm2centideg
36053587
default_value: 0
36063588
min: -36
36073589
max: 36
3608-
36093590
- name: osd_pan_servo_offcentre_warning
36103591
description: Degrees either side of the pan servo centre; where it is assumed camera is wanted to be facing forwards, but isn't at 0. If in this range and not 0 for longer than 10 seconds, the pan servo offset OSD element will blink. 0 means the warning is disabled.
36113592
field: pan_servo_offcentre_warning
36123593
min: 0
36133594
max: 45
36143595
default_value: 10
3615-
36163596
- name: osd_pan_servo_indicator_show_degrees
36173597
description: Show the degress of offset from centre on the pan servo OSD display element.
36183598
field: pan_servo_indicator_show_degrees
36193599
type: bool
36203600
default_value: OFF
3621-
36223601
- name: osd_esc_rpm_precision
36233602
description: Number of characters used to display the RPM value.
36243603
field: esc_rpm_precision
36253604
min: 3
36263605
max: 6
36273606
default_value: 3
3628-
36293607
- name: osd_mah_precision
36303608
description: Number of digits used for mAh precision. Currently used by mAh Used and Battery Remaining Capacity
36313609
field: mAh_precision
36323610
min: 4
36333611
max: 6
36343612
default_value: 4
3635-
36363613
- name: osd_use_pilot_logo
36373614
description: Use custom pilot logo with/instead of the INAV logo. The pilot logo must be characters 473 to 511
36383615
field: use_pilot_logo
36393616
type: bool
36403617
default_value: OFF
3641-
36423618
- name: osd_inav_to_pilot_logo_spacing
36433619
description: The space between the INAV and pilot logos, if `osd_use_pilot_logo` is `ON`. This number may be adjusted so that it fits the odd/even col width displays. For example, if using an odd column width display, such as Walksnail, and this is set to 4. 1 will be added so that the logos are equally spaced from the centre of the screen.
36443620
field: inav_to_pilot_logo_spacing
36453621
min: 0
36463622
max: 20
36473623
default_value: 8
3648-
36493624
- name: osd_arm_screen_display_time
36503625
description: Amount of time to display the arm screen [ms]
36513626
field: arm_screen_display_time
36523627
min: 1000
36533628
max: 5000
36543629
default_value: 1500
3655-
36563630
- name: osd_switch_indicator_zero_name
36573631
description: "Character to use for OSD switch incicator 0."
36583632
field: osd_switch_indicator0_name
36593633
type: string
36603634
max: 5
36613635
default_value: "FLAP"
3662-
36633636
- name: osd_switch_indicator_one_name
36643637
description: "Character to use for OSD switch incicator 1."
36653638
field: osd_switch_indicator1_name
36663639
type: string
36673640
max: 5
36683641
default_value: "GEAR"
3669-
36703642
- name: osd_switch_indicator_two_name
36713643
description: "Character to use for OSD switch incicator 2."
36723644
field: osd_switch_indicator2_name
36733645
type: string
36743646
max: 5
36753647
default_value: "CAM"
3676-
36773648
- name: osd_switch_indicator_three_name
36783649
description: "Character to use for OSD switch incicator 3."
36793650
field: osd_switch_indicator3_name
36803651
type: string
36813652
max: 5
36823653
default_value: "LIGT"
3683-
36843654
- name: osd_switch_indicator_zero_channel
36853655
description: "RC Channel to use for OSD switch indicator 0."
36863656
field: osd_switch_indicator0_channel
36873657
min: 5
36883658
max: MAX_SUPPORTED_RC_CHANNEL_COUNT
36893659
default_value: 5
3690-
36913660
- name: osd_switch_indicator_one_channel
36923661
description: "RC Channel to use for OSD switch indicator 1."
36933662
field: osd_switch_indicator1_channel
36943663
min: 5
36953664
max: MAX_SUPPORTED_RC_CHANNEL_COUNT
36963665
default_value: 5
3697-
36983666
- name: osd_switch_indicator_two_channel
36993667
description: "RC Channel to use for OSD switch indicator 2."
37003668
field: osd_switch_indicator2_channel
37013669
min: 5
37023670
max: MAX_SUPPORTED_RC_CHANNEL_COUNT
37033671
default_value: 5
3704-
37053672
- name: osd_switch_indicator_three_channel
37063673
description: "RC Channel to use for OSD switch indicator 3."
37073674
field: osd_switch_indicator3_channel
37083675
min: 5
37093676
max: MAX_SUPPORTED_RC_CHANNEL_COUNT
37103677
default_value: 5
3711-
37123678
- name: osd_switch_indicators_align_left
37133679
description: "Align text to left of switch indicators"
37143680
field: osd_switch_indicators_align_left
37153681
type: bool
37163682
default_value: ON
3717-
37183683
- name: osd_system_msg_display_time
37193684
description: System message display cycle time for multiple messages (milliseconds).
37203685
field: system_msg_display_time
37213686
default_value: 1000
37223687
min: 500
37233688
max: 5000
3724-
3689+
- name: osd_highlight_djis_missing_font_symbols
3690+
description: Show question marks where there is no symbol in the DJI font to represent the INAV OSD element's symbol. When off, blank spaces will be used. Only relevent for DJICOMPAT modes.
3691+
field: highlight_djis_missing_characters
3692+
default_value: ON
3693+
type: bool
37253694
- name: PG_OSD_COMMON_CONFIG
37263695
type: osdCommonConfig_t
37273696
headers: ["io/osd_common.h"]

src/main/io/displayport_msp_dji_compat.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ uint8_t getDJICharacter(uint8_t ch, uint8_t page)
724724
break;
725725
}
726726

727-
return '?'; // Missing/not mapped character
727+
return (osdConfig()->highlight_djis_missing_characters) ? '?' : SYM_BLANK; // Missing/not mapped character
728728
}
729729

730730
#endif

src/main/io/osd.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ static bool osdDisplayHasCanvas;
223223

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

226-
PG_REGISTER_WITH_RESET_TEMPLATE(osdConfig_t, osdConfig, PG_OSD_CONFIG, 10);
226+
PG_REGISTER_WITH_RESET_TEMPLATE(osdConfig_t, osdConfig, PG_OSD_CONFIG, 11);
227227
PG_REGISTER_WITH_RESET_FN(osdLayoutsConfig_t, osdLayoutsConfig, PG_OSD_LAYOUTS_CONFIG, 1);
228228

229229
void osdStartedSaveProcess(void) {
@@ -3874,6 +3874,9 @@ PG_RESET_TEMPLATE(osdConfig_t, osdConfig,
38743874
.airspeed_alarm_min = SETTING_OSD_AIRSPEED_ALARM_MIN_DEFAULT,
38753875
.airspeed_alarm_max = SETTING_OSD_AIRSPEED_ALARM_MAX_DEFAULT,
38763876
#endif
3877+
#ifndef DISABLE_MSP_DJI_COMPAT
3878+
.highlight_djis_missing_characters = SETTING_OSD_HIGHLIGHT_DJIS_MISSING_FONT_SYMBOLS_DEFAULT,
3879+
#endif
38773880

38783881
.video_system = SETTING_OSD_VIDEO_SYSTEM_DEFAULT,
38793882
.row_shiftdown = SETTING_OSD_ROW_SHIFTDOWN_DEFAULT,

src/main/io/osd.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,10 @@ typedef struct osdConfig_s {
457457
bool use_pilot_logo; // If enabled, the pilot logo (last 40 characters of page 2 font) will be used with the INAV logo.
458458
uint8_t inav_to_pilot_logo_spacing; // The space between the INAV and pilot logos, if pilot logo is used. This number may be adjusted so that it fits the odd/even col width.
459459
uint16_t arm_screen_display_time; // Length of time the arm screen is displayed
460-
#ifdef USE_ADSB
460+
#ifndef DISABLE_MSP_DJI_COMPAT
461+
bool highlight_djis_missing_characters; // If enabled, show question marks where there is no character in DJI's font to represent an OSD element symbol
462+
#endif
463+
#ifdef USE_ADSB
461464
uint16_t adsb_distance_warning; // in metres
462465
uint16_t adsb_distance_alert; // in metres
463466
uint16_t adsb_ignore_plane_above_me_limit; // in metres

0 commit comments

Comments
 (0)