Skip to content

Commit b361b00

Browse files
authored
adding TFNOVA - which requires firmware update (#4485)
* add switch TF-NOVA * add sonar checkbox, icons sonar and language localization * a little cleaning * Duplication fixed * changed locales/ * add png osd and delete "TFNOVA" * add lidar TFNOVA * add support TFNOVA on firmware >= 1.47 * delete icon 'lidar' * // delete * correction
1 parent 0349f3e commit b361b00

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

locales/en/messages.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7675,5 +7675,13 @@
76757675
"programmingFailedNotification": {
76767676
"message": "FC programming failed",
76777677
"description": "Notification message when programming is unsuccessful"
7678+
},
7679+
"osdTextElementLidar": {
7680+
"message": "Sonar",
7681+
"description": "Displays distance from sonar sensor in cm"
7682+
},
7683+
"osdDescElementLidar": {
7684+
"message": "$t(osdTextElementLidar.message)",
7685+
"description": "Don't translate!!!"
76787686
}
76797687
}

src/js/sensor_types.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export function sensorTypes() {
9595
},
9696
sonar: {
9797
name: "Sonar",
98-
elements: ["NONE", "HCSR04", "TFMINI", "TF02", "MTF01", "MTF02", "MTF01P", "MTF02P"],
98+
elements: ["NONE", "HCSR04", "TFMINI", "TF02", "MTF01", "MTF02", "MTF01P", "MTF02P", "TFNOVA"],
9999
},
100100
opticalflow: {
101101
name: "Optical Flow",

src/js/tabs/osd.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1578,6 +1578,15 @@ OSD.loadDisplayFields = function () {
15781578
positionable: true,
15791579
preview: "CUSTOM MSG4",
15801580
},
1581+
OSD_LIDAR_DIST: {
1582+
name: "OSD_LIDAR_DIST",
1583+
text: "osdTextElementLidar",
1584+
desc: "osdDescElementLidar",
1585+
defaultPosition: -1,
1586+
draw_order: 610,
1587+
positionable: true,
1588+
preview: "RF:---",
1589+
},
15811590
};
15821591

15831592
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_47)) {
@@ -2024,6 +2033,7 @@ OSD.chooseFields = function () {
20242033
F.CUSTOM_MSG1,
20252034
F.CUSTOM_MSG2,
20262035
F.CUSTOM_MSG3,
2036+
F.OSD_LIDAR_DIST,
20272037
]);
20282038
}
20292039
// Choose statistic fields

0 commit comments

Comments
 (0)