Skip to content

Commit

Permalink
Merge pull request #1429 from iNavFlight/MrD-Add-switch-indicators-to…
Browse files Browse the repository at this point in the history
…-OSD

Add switch indicator elements to the OSD
  • Loading branch information
MrD-RC authored Apr 19, 2022
2 parents ce30d2c + 1ec6004 commit d113585
Show file tree
Hide file tree
Showing 24 changed files with 926 additions and 768 deletions.
33 changes: 33 additions & 0 deletions _locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -3489,6 +3489,21 @@
"osdElement_ESC_TEMPERATURE_HELP": {
"message": "Temperature of the ESC read from DSHOT telemetry"
},
"osdGroupSwitchIndicators": {
"message": "Switch Indicators"
},
"osdElement_SWITCH_INDICATOR_0": {
"message": "Switch Indicator 1"
},
"osdElement_SWITCH_INDICATOR_1": {
"message": "Switch Indicator 2"
},
"osdElement_SWITCH_INDICATOR_2": {
"message": "Switch Indicator 3"
},
"osdElement_SWITCH_INDICATOR_3": {
"message": "Switch Indicator 4"
},
"osdGroupGVars": {
"message": "Global Variables"
},
Expand Down Expand Up @@ -3570,6 +3585,24 @@
"osd_dji_cn_alternating_duration": {
"message" : "Craft Name alternating duration (in 1/10 sec)"
},
"osd_switch_indicator_settings": {
"message" : "Switch Indicator Settings"
},
"osd_switch_indicators_align_left": {
"message" : "Align switch names to left of switches"
},
"osdSwitchInd0": {
"message" : "Switch 1"
},
"osdSwitchInd1": {
"message" : "Switch 2"
},
"osdSwitchInd2": {
"message" : "Switch 3"
},
"osdSwitchInd3": {
"message" : "Switch 4"
},
"osd_font_default": {
"message" : "Default"
},
Expand Down
8 changes: 8 additions & 0 deletions js/msp/MSPHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -3090,6 +3090,9 @@ var mspHelper = (function (gui) {
(new Uint32Array(buf))[0] = fi32;
value = (new Float32Array(buf))[0];
break;
case "string":
value = resp.data.readString();
break;
default:
throw "Unknown setting type " + setting.type;
}
Expand Down Expand Up @@ -3133,6 +3136,11 @@ var mspHelper = (function (gui) {
var if32 = (new Uint32Array(buf))[0];
data.push32(if32);
break;
case "string":
for (var ii = 0; ii < value.length; ii++) {
data.push(value.charCodeAt(ii));
}
break;
default:
throw "Unknown setting type " + setting.type;
}
Expand Down
1 change: 1 addition & 0 deletions js/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ var Settings = (function () {
}
} else if (s.setting.type == 'string') {
input.val(s.value);
input.attr('maxlength', s.setting.max);
} else if (s.setting.type == 'float') {
input.attr('type', 'number');

Expand Down
192 changes: 96 additions & 96 deletions resources/osd/bold.mcm
Original file line number Diff line number Diff line change
Expand Up @@ -13315,20 +13315,52 @@ MAX7456
01010101
01010101
01010101
01000001
01010101
01010101
00101000
01010101
01010101
00101000
01010101
01010101
00101000
01010101
01010101
00101000
01010101
01010101
00000000
01010101
01010101
00101000
01010101
01010100
10101010
00010101
01010100
10101010
00010101
01010010
10101010
10000101
01010010
10101010
10000101
01001010
10101010
10100001
01001010
10101010
10100001
01010010
10101010
10000101
01010100
10101010
00010101
01010101
00000000
01010101
01010101
01010101
Expand All @@ -13347,20 +13379,52 @@ MAX7456
01010101
01010101
01010101
01000001
01010101
01010101
00101000
01010101
01010101
00101000
01010101
01010101
00000000
01010101
01010100
10101010
00010101
01010010
10101010
10000101
01001010
10101010
10100001
01001010
10101010
10100001
01001010
10101010
10100001
01001010
10101010
10100001
01010010
10101010
10000101
01010100
10101010
00010101
01010101
00000000
01010101
01010101
00101000
01010101
01010101
00101000
01010101
01010101
01000001
01010101
01010101
01010101
Expand All @@ -13379,116 +13443,52 @@ MAX7456
01010101
01010101
01010101
00000000
01010101
01010100
10101010
00010101
01010010
10101010
10000101
01001010
10101010
10100001
01001010
10101010
10100001
01010010
10101010
10000101
01010010
10101010
10000101
01010100
10101010
00010101
01010100
10101010
00010101
01010101
00101000
01010101
01010101
00000000
01010101
01010101
00101000
01010101
01010101
00101000
01010101
01010101
00101000
01010101
01010101
00101000
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
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
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01010101
01000001
01010101
01010101
01010101
Expand Down
Binary file modified resources/osd/bold.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit d113585

Please sign in to comment.