1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-24 16:55:22 +03:00

Merge branch 'master' into MrD_Move-AHI-on-OSD-screen

This commit is contained in:
Darren Lines 2022-07-13 08:30:52 +01:00
commit 3b1a9b8453
36 changed files with 2632 additions and 357 deletions

View file

@ -250,15 +250,16 @@ var Settings = (function () {
const oldValue = element.val();
//display names for the units
const unitDisplayDames = {
// Display names for the units
const unitDisplayNames = {
// Misc
'us' : "uS",
'cw' : 'cW',
'percent' : '%',
'cmss' : 'cm/s/s',
// Time
'us' : "uS",
'msec' : 'ms',
'msec-nc' : 'ms', // Milliseconds, but not converted.
'dsec' : 'ds',
'sec' : 's',
// Angles
@ -291,6 +292,47 @@ var Settings = (function () {
'nm' : 'NM'
}
// Hover full descriptions for the units
const unitExpandedNames = {
// Misc
'cw' : 'CentiWatts',
'percent' : 'Percent',
'cmss' : 'Centimetres per second, per second',
// Time
'us' : "Microseconds",
'msec' : 'Milliseconds',
'msec-nc' : 'Milliseconds',
'dsec' : 'Deciseconds',
'sec' : 'Seconds',
// Angles
'deg' : 'Degrees',
'decideg' : 'DeciDegrees',
'decideg-lrg' : 'DeciDegrees',
// Rotational speed
'degps' : 'Degrees per second',
'decadegps' : 'DecaDegrees per second',
// Temperature
'decidegc' : 'DeciDegrees Celsius',
'degc' : 'Degrees Celsius',
'degf' : 'Degrees Fahrenheit',
// Speed
'cms' : 'Centimetres per second',
'v-cms' : 'Centimetres per second',
'ms' : 'Metres per second',
'kmh' : 'Kilometres per hour',
'mph' : 'Miles per hour',
'hftmin' : 'Hundred feet per minute',
'fts' : 'Feet per second',
'kt' : 'Knots',
// Distance
'cm' : 'Centimetres',
'm' : 'Metres',
'km' : 'Kilometres',
'm-lrg' : 'Metres',
'ft' : 'Feet',
'mi' : 'Miles',
'nm' : 'Nautical Miles'
}
// Ensure we can do conversions
if (!inputUnit || !oldValue || !element) {
@ -326,6 +368,9 @@ var Settings = (function () {
'hftmin' : 50.8,
'fts' : 30.48
},
'msec-nc' : {
'msec-nc' : 1
},
'msec' : {
'sec' : 1000
},
@ -476,7 +521,7 @@ var Settings = (function () {
element.data('setting-multiplier', multiplier);
// Now wrap the input in a display that shows the unit
element.wrap(`<div data-unit="${unitDisplayDames[unitName]}" class="unit_wrapper unit"></div>`);
element.wrap(`<div data-unit="${unitDisplayNames[unitName]}" title="${unitExpandedNames[unitName]}" class="unit_wrapper unit"></div>`);
function toFahrenheit(decidegC) {
return (decidegC / 10) * 1.8 + 32;