Skip to content

Commit

Permalink
Merge pull request #10060 from iNavFlight/MrD_Tidy-up-dji-crosshairs
Browse files Browse the repository at this point in the history
Tidy up DJI crosshairs
  • Loading branch information
MrD-RC authored May 19, 2024
2 parents f5b40d3 + 655b325 commit dd1c701
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 68 deletions.
82 changes: 34 additions & 48 deletions src/main/io/displayport_msp_dji_compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -476,72 +476,58 @@ uint8_t getDJICharacter(uint8_t ch, uint8_t page)
case SYM_AH_CH_LEFT:
case SYM_AH_CH_AIRCRAFT1:
return DJI_SYM_CROSSHAIR_LEFT;

case SYM_AH_CH_TYPE3:
return DJI_SYM_AH_CH_TYPE3;

case SYM_AH_CH_TYPE4:
return DJI_SYM_AH_CH_TYPE4;

case SYM_AH_CH_TYPE5:
return DJI_SYM_AH_CH_TYPE5;

case SYM_AH_CH_TYPE6:
return DJI_SYM_AH_CH_TYPE6;

case SYM_AH_CH_TYPE7:
return DJI_SYM_AH_CH_TYPE7;

case SYM_AH_CH_TYPE8:
return DJI_SYM_AH_CH_TYPE8;

case SYM_AH_CH_CENTER:
case SYM_AH_CH_AIRCRAFT2:
return DJI_SYM_CROSSHAIR_CENTRE;

case (SYM_AH_CH_TYPE3+1):
return DJI_SYM_AH_CH_TYPE3_1;

case (SYM_AH_CH_TYPE4+1):
return DJI_SYM_AH_CH_TYPE4_1;

case (SYM_AH_CH_TYPE5+1):
return DJI_SYM_AH_CH_TYPE5_1;

case (SYM_AH_CH_TYPE6+1):
return DJI_SYM_AH_CH_TYPE6_1;

case (SYM_AH_CH_TYPE7+1):
return DJI_SYM_AH_CH_TYPE7_1;

case (SYM_AH_CH_TYPE8+1):
return DJI_SYM_AH_CH_TYPE8_1;

case SYM_AH_CH_RIGHT:
case SYM_AH_CH_AIRCRAFT3:
return DJI_SYM_CROSSHAIR_RIGHT;

case SYM_AH_CH_AIRCRAFT0:
case SYM_AH_CH_AIRCRAFT4:
return DJI_SYM_BLANK;

case SYM_AH_CH_TYPE3:
return DJI_SYM_NONE;
case (SYM_AH_CH_TYPE3+1):
return DJI_SYM_SMALL_CROSSHAIR;
case (SYM_AH_CH_TYPE3+2):
return DJI_SYM_AH_CH_TYPE3_2;
return DJI_SYM_NONE;

case SYM_AH_CH_TYPE4:
return DJI_SYM_HYPHEN;
case (SYM_AH_CH_TYPE4+1):
return DJI_SYM_SMALL_CROSSHAIR;
case (SYM_AH_CH_TYPE4+2):
return DJI_SYM_AH_CH_TYPE4_2;
return DJI_SYM_HYPHEN;

case SYM_AH_CH_TYPE5:
return DJI_SYM_STICK_OVERLAY_HORIZONTAL;
case (SYM_AH_CH_TYPE5+1):
return DJI_SYM_SMALL_CROSSHAIR;
case (SYM_AH_CH_TYPE5+2):
return DJI_SYM_AH_CH_TYPE5_2;
return DJI_SYM_STICK_OVERLAY_HORIZONTAL;

case SYM_AH_CH_TYPE6:
return DJI_SYM_NONE;
case (SYM_AH_CH_TYPE6+1):
return DJI_SYM_STICK_OVERLAY_SPRITE_MID;
case (SYM_AH_CH_TYPE6+2):
return DJI_SYM_AH_CH_TYPE6_2;
return DJI_SYM_NONE;

case SYM_AH_CH_TYPE7:
return DJI_SYM_ARROW_SMALL_LEFT;
case (SYM_AH_CH_TYPE7+1):
return DJI_SYM_SMALL_CROSSHAIR;
case (SYM_AH_CH_TYPE7+2):
return DJI_SYM_AH_CH_TYPE7_2;
return DJI_SYM_ARROW_SMALL_RIGHT;

case SYM_AH_CH_TYPE8:
return DJI_SYM_AH_LEFT;
case (SYM_AH_CH_TYPE8+1):
return DJI_SYM_SMALL_CROSSHAIR;
case (SYM_AH_CH_TYPE8+2):
return DJI_SYM_AH_CH_TYPE8_2;

case SYM_AH_CH_AIRCRAFT0:
case SYM_AH_CH_AIRCRAFT4:
return DJI_SYM_BLANK;
return DJI_SYM_AH_RIGHT;

case SYM_ARROW_UP:
return DJI_SYM_ARROW_NORTH;
Expand Down
20 changes: 0 additions & 20 deletions src/main/io/dji_osd_symbols.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,23 +162,3 @@
#define DJI_SYM_GPS_DEGREE DJI_SYM_STICK_OVERLAY_SPRITE_HIGH // kind of looks like the degree symbol
#define DJI_SYM_GPS_MINUTE 0x27 // '
#define DJI_SYM_GPS_SECOND 0x22 // "

// Crosshair Styles
#define DJI_SYM_AH_CH_TYPE3 DJI_SYM_NONE
#define DJI_SYM_AH_CH_TYPE3_1 DJI_SYM_SMALL_CROSSHAIR
#define DJI_SYM_AH_CH_TYPE3_2 DJI_SYM_NONE
#define DJI_SYM_AH_CH_TYPE4 DJI_SYM_HYPHEN
#define DJI_SYM_AH_CH_TYPE4_1 DJI_SYM_SMALL_CROSSHAIR
#define DJI_SYM_AH_CH_TYPE4_2 DJI_SYM_HYPHEN
#define DJI_SYM_AH_CH_TYPE5 DJI_SYM_STICK_OVERLAY_HORIZONTAL
#define DJI_SYM_AH_CH_TYPE5_1 DJI_SYM_SMALL_CROSSHAIR
#define DJI_SYM_AH_CH_TYPE5_2 DJI_SYM_STICK_OVERLAY_HORIZONTAL
#define DJI_SYM_AH_CH_TYPE6 DJI_SYM_NONE
#define DJI_SYM_AH_CH_TYPE6_1 DJI_SYM_STICK_OVERLAY_SPRITE_MID
#define DJI_SYM_AH_CH_TYPE6_2 DJI_SYM_NONE
#define DJI_SYM_AH_CH_TYPE7 DJI_SYM_ARROW_SMALL_LEFT
#define DJI_SYM_AH_CH_TYPE7_1 DJI_SYM_SMALL_CROSSHAIR
#define DJI_SYM_AH_CH_TYPE7_2 DJI_SYM_ARROW_SMALL_RIGHT
#define DJI_SYM_AH_CH_TYPE8 DJI_SYM_AH_LEFT
#define DJI_SYM_AH_CH_TYPE8_1 DJI_SYM_SMALL_CROSSHAIR
#define DJI_SYM_AH_CH_TYPE8_2 DJI_SYM_AH_RIGHT

0 comments on commit dd1c701

Please sign in to comment.