1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-24 16:55:22 +03:00

Add Odometer to OSD

First cut
This commit is contained in:
Darren Lines 2023-04-15 22:08:33 +01:00
parent f3c58244bb
commit ddea431bee
22 changed files with 330 additions and 312 deletions

View file

@ -284,6 +284,7 @@
| ![Home distance](/resources/osd/digital/default/24x36/357.png) | SYM_HOME_DIST | | Home distance icon | 357 | 0x165 |
| ![Crosshair centre](/resources/osd/digital/default/24x36/358.png) | SYM_AH_CH_CENTER | SYM.AH_CROSSHAIRS | Default crosshair centre | 358 | 0x166 |
| ![Flight dist rem](/resources/osd/digital/default/24x36/359.png) | SYM_FLIGHT_DIST_REMAINING | SYM.FLIGHT_DIST_REMAINING | Flight distance remaining | 359 | 0x167 |
| ![Odometer](/resources/osd/digital/default/24x36/360.png) | SYM_ODOMETER | SYM.ODOMETER | Odometer (total aircraft distance) | 360 | 0x168 |
| ![Crosshair 3](/resources/osd/digital/default/24x36/400_402.png) | SYM_AH_CH_TYPE3 | SYM.AH_CROSSHAIRS | Crosshair type 3 | 400 - 402 | 0x190 - 0x192 |
| ![Crosshair 4](/resources/osd/digital/default/24x36/403_405.png) | SYM_AH_CH_TYPE4 | SYM.AH_CROSSHAIRS | Crosshair type 4 | 403 - 405 | 0x193 - 0x195 |
| ![Crosshair 5](/resources/osd/digital/default/24x36/406_408.png) | SYM_AH_CH_TYPE5 | SYM.AH_CROSSHAIRS | Crosshair type 5 | 406 - 408 | 0x196 - 0x198 |

View file

@ -23042,51 +23042,51 @@ MAX7456
01010101
01010101
01010101
00000000
00000000
00000000
10100010
10001010
00101000
10100010
10001010
00101000
10100010
10001010
00101000
10100010
10001010
00101000
10100010
10001010
00101000
00000000
00000000
00000000
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01000101
00000101
01000101
00100000
10100000
00100001
10001000
10001000
10001000
10001000
10001000
10001000
00100000
10100000
00100001
01000101
00000101
01000101
01010101
01010101
01010101

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Before After
Before After

View file

@ -23042,51 +23042,51 @@ MAX7456
01010101
01010101
01010101
00000000
00000000
00000000
10100010
10001010
00101000
10100010
10001010
00101000
10100010
10001010
00101000
10100010
10001010
00101000
10100010
10001010
00101000
00000000
00000000
00000000
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01000101
00000101
01000101
00100000
10100000
00100001
10001000
10001000
10001000
10001000
10001000
10001000
00100000
10100000
00100001
01000101
00000101
01000101
01010101
01010101
01010101

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Before After
Before After

View file

@ -23042,51 +23042,51 @@ MAX7456
01010101
01010101
01010101
00000000
00000000
00000000
10100010
10001010
00101000
10100010
10001010
00101000
10100010
10001010
00101000
10100010
10001010
00101000
10100010
10001010
00101000
00000000
00000000
00000000
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01000101
00000101
01000101
00100000
10100000
00100001
10001000
10001000
10001000
10001000
10001000
10001000
00100000
10100000
00100001
01000101
00000101
01000101
01010101
01010101
01010101

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Before After
Before After

View file

@ -23042,51 +23042,51 @@ MAX7456
01010101
01010101
01010101
00000000
00000000
00000000
10100010
10001010
00101000
10100010
10001010
00101000
10100010
10001010
00101000
10100010
10001010
00101000
10100010
10001010
00101000
00000000
00000000
00000000
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01000101
00000101
01000101
00100000
10100000
00100001
10001000
10001000
10001000
10001000
10001000
10001000
00100000
10100000
00100001
01000101
00000101
01000101
01010101
01010101
01010101

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

View file

@ -23042,51 +23042,51 @@ MAX7456
01010101
01010101
01010101
00000000
00000000
00000000
10100010
10001010
00101000
10100010
10001010
00101000
10100010
10001010
00101000
10100010
10001010
00101000
10100010
10001010
00101000
00000000
00000000
00000000
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01000101
00000101
01000101
00100000
10100000
00100001
10001000
10001000
10001000
10001000
10001000
10001000
00100000
10100000
00100001
01000101
00000101
01000101
01010101
01010101
01010101

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Before After
Before After

View file

@ -23042,51 +23042,51 @@ MAX7456
01010101
01010101
01010101
00000000
00000000
00000000
10100010
10001010
00101000
10100010
10001010
00101000
10100010
10001010
00101000
10100010
10001010
00101000
10100010
10001010
00101000
00000000
00000000
00000000
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01000101
00000101
01000101
00100000
10100000
00100001
10001000
10001000
10001000
10001000
10001000
10001000
00100000
10100000
00100001
01000101
00000101
01000101
01010101
01010101
01010101

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Before After
Before After

View file

@ -23042,51 +23042,51 @@ MAX7456
01010101
01010101
01010101
00000000
00000000
00000000
10100010
10001010
00101000
10100010
10001010
00101000
10100010
10001010
00101000
10100010
10001010
00101000
10100010
10001010
00101000
00000000
00000000
00000000
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01000101
00000101
01000101
00100000
10100000
00100001
10001000
10001000
10001000
10001000
10001000
10001000
00100000
10100000
00100001
01000101
00000101
01000101
01010101
01010101
01010101

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Before After
Before After

View file

@ -23042,51 +23042,51 @@ MAX7456
01010101
01010101
01010101
00000000
00000000
00000000
10100010
10001010
00101000
10100010
10001010
00101000
10100010
10001010
00101000
10100010
10001010
00101000
10100010
10001010
00101000
00000000
00000000
00000000
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01000101
00000101
01000101
00100000
10100000
00100001
10001000
10001000
10001000
10001000
10001000
10001000
00100000
10100000
00100001
01000101
00000101
01000101
01010101
01010101
01010101

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View file

@ -114,6 +114,7 @@ SYM.FLIGHT_DIST_REMAINING = 0x167;
SYM.GROUND_COURSE = 0xDC;
SYM.CROSS_TRACK_ERROR = 0xFC;
SYM.PAN_SERVO_IS_OFFSET_L = 0x1C7;
SYM.ODOMETER = 0X168;
SYM.AH_AIRCRAFT0 = 0x1A2;
SYM.AH_AIRCRAFT1 = 0x1A3;
@ -1551,6 +1552,22 @@ OSD.constants = {
}
}
},
{
name: 'ODOMETER',
id: 144,
min_version: '6.1.0',
preview: function(osd_data) {
switch (OSD.data.preferences.units) {
case 0: // Imperial
case 3: // UK
return FONT.symbol(SYM.ODOMETER) + FONT.embed_dot('0000169') + FONT.symbol(SYM.DIST_MI);
case 4: // GA
return FONT.symbol(SYM.ODOMETER) + FONT.embed_dot('0000147') + FONT.symbol(SYM.DIST_NM);
default: // Metric
return FONT.symbol(SYM.ODOMETER) + FONT.embed_dot('0000272') + FONT.symbol(SYM.DIST_KM);
}
}
},
{
name: 'GPS_HDOP',
id: 31,