1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-15 04:15:28 +03:00

Rename Shark Byte to HDZero.

This commit is contained in:
Geoff Sim 2021-12-01 08:04:58 +00:00
parent 7dbb279c0f
commit e17f6b9d68
4 changed files with 15 additions and 14 deletions

View file

@ -1131,8 +1131,8 @@
"portsFunction_DJI_FPV": { "portsFunction_DJI_FPV": {
"message": "DJI FPV VTX" "message": "DJI FPV VTX"
}, },
"portsFunction_SHARKBYTE_OSD": { "portsFunction_HDZERO_VTX": {
"message": "Shark Byte OSD" "message": "HDZero VTX"
}, },
"portsFunction_IMU2": { "portsFunction_IMU2": {
"message": "Secondary IMU" "message": "Secondary IMU"

View file

@ -44,7 +44,7 @@ var mspHelper = (function (gui) {
'DJI_FPV': 21, 'DJI_FPV': 21,
'SMARTPORT_MASTER': 23, 'SMARTPORT_MASTER': 23,
'IMU2': 24, 'IMU2': 24,
'SHARKBYTE_OSD': 25, 'HDZERO_VTX': 25,
}; };
// Required for MSP_DEBUGMSG because console.log() doesn't allow omitting // Required for MSP_DEBUGMSG because console.log() doesn't allow omitting

View file

@ -136,7 +136,9 @@ FONT.constants = {
MAX_NVM_FONT_CHAR_FIELD_SIZE: 64, MAX_NVM_FONT_CHAR_FIELD_SIZE: 64,
CHAR_HEIGHT: 18, CHAR_HEIGHT: 18,
CHAR_WIDTH: 12, CHAR_WIDTH: 12,
LINE: 50 LINE: 30,
/** maximum line size (used to calculate OSD element positions) */
MAXLINE: 50
}, },
COLORS: { COLORS: {
// black // black
@ -2012,13 +2014,8 @@ OSD.updateDisplaySize = function () {
video_type = 'PAL'; video_type = 'PAL';
} }
$('.third_left').toggleClass('preview_hd_side', (video_type == 'HD')) FONT.constants.SIZES.LINE = OSD.constants.VIDEO_COLS[video_type];
$('.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];
// compute the size // compute the size
OSD.data.display_size = { OSD.data.display_size = {
x: OSD.constants.VIDEO_COLS[video_type], x: OSD.constants.VIDEO_COLS[video_type],
@ -2027,6 +2024,10 @@ OSD.updateDisplaySize = function () {
}; };
OSD.constants.VIDEO_TYPES[OSD.data.video_system] = video_type; 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) { OSD.saveAlarms = function(callback) {
@ -2063,14 +2064,14 @@ OSD.msp = {
position: function (bits) { position: function (bits) {
var display_item = {}; var display_item = {};
// size * y + x // 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; display_item.isVisible = (bits & OSD.constants.VISIBLE) != 0;
return display_item; return display_item;
} }
}, },
pack: { pack: {
position: function (display_item) { 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);
} }
} }
}, },

View file

@ -94,7 +94,7 @@ TABS.ports.initialize = function (callback) {
); );
functionRules.push({ functionRules.push({
name: 'SHARKBYTE_OSD', name: 'HDZERO_VTX',
groups: ['peripherals'], groups: ['peripherals'],
maxPorts: 1 } maxPorts: 1 }
); );