mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-14 11:59:51 +03:00
Rename Shark Byte to HDZero.
This commit is contained in:
parent
7dbb279c0f
commit
e17f6b9d68
4 changed files with 15 additions and 14 deletions
|
@ -1131,8 +1131,8 @@
|
|||
"portsFunction_DJI_FPV": {
|
||||
"message": "DJI FPV VTX"
|
||||
},
|
||||
"portsFunction_SHARKBYTE_OSD": {
|
||||
"message": "Shark Byte OSD"
|
||||
"portsFunction_HDZERO_VTX": {
|
||||
"message": "HDZero VTX"
|
||||
},
|
||||
"portsFunction_IMU2": {
|
||||
"message": "Secondary IMU"
|
||||
|
|
|
@ -44,7 +44,7 @@ var mspHelper = (function (gui) {
|
|||
'DJI_FPV': 21,
|
||||
'SMARTPORT_MASTER': 23,
|
||||
'IMU2': 24,
|
||||
'SHARKBYTE_OSD': 25,
|
||||
'HDZERO_VTX': 25,
|
||||
};
|
||||
|
||||
// Required for MSP_DEBUGMSG because console.log() doesn't allow omitting
|
||||
|
|
19
tabs/osd.js
19
tabs/osd.js
|
@ -136,7 +136,9 @@ FONT.constants = {
|
|||
MAX_NVM_FONT_CHAR_FIELD_SIZE: 64,
|
||||
CHAR_HEIGHT: 18,
|
||||
CHAR_WIDTH: 12,
|
||||
LINE: 50
|
||||
LINE: 30,
|
||||
/** maximum line size (used to calculate OSD element positions) */
|
||||
MAXLINE: 50
|
||||
},
|
||||
COLORS: {
|
||||
// black
|
||||
|
@ -2012,12 +2014,7 @@ OSD.updateDisplaySize = function () {
|
|||
video_type = 'PAL';
|
||||
}
|
||||
|
||||
$('.third_left').toggleClass('preview_hd_side', (video_type == 'HD'))
|
||||
$('.preview').toggleClass('preview_hd', (video_type == 'HD'))
|
||||
$('.third_right').toggleClass('preview_hd_side', (video_type == 'HD'))
|
||||
|
||||
// Not sure I can do this! This will mess with the calculation of the y position of the widget
|
||||
//FONT.constants.SIZES.LINE = OSD.constants.VIDEO_COLS[video_type];
|
||||
FONT.constants.SIZES.LINE = OSD.constants.VIDEO_COLS[video_type];
|
||||
|
||||
// compute the size
|
||||
OSD.data.display_size = {
|
||||
|
@ -2027,6 +2024,10 @@ OSD.updateDisplaySize = function () {
|
|||
};
|
||||
|
||||
OSD.constants.VIDEO_TYPES[OSD.data.video_system] = video_type;
|
||||
|
||||
$('.third_left').toggleClass('preview_hd_side', (video_type == 'HD'))
|
||||
$('.preview').toggleClass('preview_hd', (video_type == 'HD'))
|
||||
$('.third_right').toggleClass('preview_hd_side', (video_type == 'HD'))
|
||||
};
|
||||
|
||||
OSD.saveAlarms = function(callback) {
|
||||
|
@ -2063,14 +2064,14 @@ OSD.msp = {
|
|||
position: function (bits) {
|
||||
var display_item = {};
|
||||
// size * y + x
|
||||
display_item.position = FONT.constants.SIZES.LINE * ((bits >> 6) & 0x003F) + (bits & 0x003F);
|
||||
display_item.position = FONT.constants.SIZES.MAXLINE * ((bits >> 6) & 0x003F) + (bits & 0x003F);
|
||||
display_item.isVisible = (bits & OSD.constants.VISIBLE) != 0;
|
||||
return display_item;
|
||||
}
|
||||
},
|
||||
pack: {
|
||||
position: function (display_item) {
|
||||
return (display_item.isVisible ? 0x2000 : 0) | (((display_item.position / FONT.constants.SIZES.LINE) & 0x003F) << 6) | (display_item.position % FONT.constants.SIZES.LINE);
|
||||
return (display_item.isVisible ? 0x2000 : 0) | (((display_item.position / FONT.constants.SIZES.MAXLINE) & 0x003F) << 6) | (display_item.position % FONT.constants.SIZES.MAXLINE);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -94,7 +94,7 @@ TABS.ports.initialize = function (callback) {
|
|||
);
|
||||
|
||||
functionRules.push({
|
||||
name: 'SHARKBYTE_OSD',
|
||||
name: 'HDZERO_VTX',
|
||||
groups: ['peripherals'],
|
||||
maxPorts: 1 }
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue