Merge pull request #524 from DanNixon/new_osd_elements

Heading and vario OSD elements
10.3.x-maintenance
Michael Keller 2017-06-14 12:48:45 +12:00 committed by GitHub
commit fa353f7e2c
1 changed files with 27 additions and 12 deletions

View File

@ -26,6 +26,7 @@ SYM.PB_EMPTY = 0x8D;
SYM.PB_END = 0x8E;
SYM.PB_CLOSE = 0x8F;
SYM.BATTERY = 0x96;
SYM.ARROW_NORTH=0x68;
SYM.ARROW_SOUTH=0x60;
SYM.ARROW_EAST=0x64;
@ -456,19 +457,31 @@ OSD.constants = {
preview: FONT.symbol(SYM.FLY_M) + '02:07'
},
HOME_DIR: {
name: 'HOME_DIRECTION',
default_position: -1,
positionable: true,
preview: FONT.symbol(SYM.ARROW_SOUTH + 2)
name: 'HOME_DIRECTION',
default_position: -1,
positionable: true,
preview: FONT.symbol(SYM.ARROW_SOUTH + 2)
},
HOME_DIST: {
name: 'HOME_DISTANCE',
default_position: -1,
positionable: true,
preview: function(osd_data) {
return '43' + FONT.symbol(osd_data.unit_mode === 0 ? SYM.FEET : SYM.METRE)
}
}
name: 'HOME_DISTANCE',
default_position: -1,
positionable: true,
preview: function(osd_data) {
return '43' + FONT.symbol(osd_data.unit_mode === 0 ? SYM.FEET : SYM.METRE)
}
},
NUMERICAL_HEADING: {
name: 'NUMERICAL_HEADING',
default_position: -1,
positionable: true,
preview: FONT.symbol(SYM.ARROW_EAST) + '90'
},
NUMERICAL_VARIO: {
name: 'NUMERICAL_VARIO',
default_position: -1,
positionable: true,
preview: FONT.symbol(SYM.ARROW_NORTH) + '8.7'
}
},
ALL_STATISTIC_FIELDS: {
@ -561,7 +574,9 @@ OSD.chooseFields = function () {
F.ARMED_TIME,
F.DISARMED,
F.HOME_DIR,
F.HOME_DIST
F.HOME_DIST,
F.NUMERICAL_HEADING,
F.NUMERICAL_VARIO
]);
}
}