Skip to content

Commit

Permalink
Merge branch 'iNavFlight:master' into zdwarpf7
Browse files Browse the repository at this point in the history
  • Loading branch information
vishnumda authored Jan 16, 2025
2 parents adb1d79 + c9016a9 commit 85b1b3f
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion docs/Settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ Defines debug values exposed in debug variables (developer / debugging setting)

### disarm_always

Disarms the motors independently of throttle value. Setting to OFF reverts to the old behaviour of disarming only when the throttle is low.
When you switch to Disarm, do so regardless of throttle position. If this Setting is `OFF`. It will only disarm only when the throttle is low. This is similar to the previous `disarm_kill_switch` option. Default setting is the same as the old default behaviour.

| Default | Min | Max |
| --- | --- | --- |
Expand Down
2 changes: 1 addition & 1 deletion src/main/fc/settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1547,7 +1547,7 @@ groups:
default_value: OFF
type: bool
- name: disarm_always
description: "Disarms the motors independently of throttle value. Setting to OFF reverts to the old behaviour of disarming only when the throttle is low."
description: "When you switch to Disarm, do so regardless of throttle position. If this Setting is `OFF`. It will only disarm only when the throttle is low. This is similar to the previous `disarm_kill_switch` option. Default setting is the same as the old default behaviour."
default_value: ON
type: bool
- name: switch_disarm_delay
Expand Down
25 changes: 16 additions & 9 deletions src/main/io/displayport_msp_dji_compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@
#include "io/displayport_msp_dji_compat.h"
#include "io/dji_osd_symbols.h"
#include "drivers/osd_symbols.h"
#include <string.h>

// 0123456789
static char *dji_logo = " DJI, FIX "
" THE OSD "
" FOR O3 "
" AND O4 ";

uint8_t getDJICharacter(uint8_t ch, uint8_t page)
{
Expand All @@ -37,6 +44,14 @@ uint8_t getDJICharacter(uint8_t ch, uint8_t page)
return DJI_SYM_AH_DECORATION;
}

if (ech >= SYM_LOGO_START && ech <= 297) {
return dji_logo[(ech - SYM_LOGO_START) % (strlen(dji_logo) + 1)];
}

if (ech >= SYM_PILOT_LOGO_LRG_START && ech <= 511) {
return dji_logo[(ech - SYM_LOGO_START) % (strlen(dji_logo) + 1)];
}

switch (ech) {
case SYM_RSSI:
return DJI_SYM_RSSI;
Expand Down Expand Up @@ -452,16 +467,8 @@ uint8_t getDJICharacter(uint8_t ch, uint8_t page)
case SYM_CROSS_TRACK_ERROR:
return DJI_SYM_CROSS_TRACK_ERROR;
case SYM_LOGO_START:
return DJI_SYM_LOGO_START;
case SYM_LOGO_WIDTH:
return DJI_SYM_LOGO_WIDTH;
case SYM_LOGO_HEIGHT:
return DJI_SYM_LOGO_HEIGHT;
*/

case SYM_AH_LEFT:
return DJI_SYM_AH_LEFT;

Expand Down
9 changes: 1 addition & 8 deletions src/main/io/osd.c
Original file line number Diff line number Diff line change
Expand Up @@ -4401,18 +4401,11 @@ uint8_t drawLogos(bool singular, uint8_t row) {
bool usePilotLogo = (osdConfig()->use_pilot_logo && osdDisplayIsHD());
bool useINAVLogo = (singular && !usePilotLogo) || !singular;

#ifndef DISABLE_MSP_DJI_COMPAT // IF DJICOMPAT is in use, the pilot logo cannot be used, due to font issues.
if (isDJICompatibleVideoSystem(osdConfig())) {
usePilotLogo = false;
useINAVLogo = false;
}
#endif

uint8_t logoSpacing = osdConfig()->inav_to_pilot_logo_spacing;

if (logoSpacing > 0 && ((osdDisplayPort->cols % 2) != (logoSpacing % 2))) {
logoSpacing++; // Add extra 1 character space between logos, if the odd/even of the OSD cols doesn't match the odd/even of the logo spacing
}
}

// Draw Logo(s)
if (usePilotLogo && !singular) {
Expand Down

0 comments on commit 85b1b3f

Please sign in to comment.