mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-23 16:25:19 +03:00
Add support for battery profiles
This commit is contained in:
parent
a1b807fc4b
commit
e945c0749c
11 changed files with 131 additions and 8 deletions
|
@ -334,6 +334,9 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
|
|||
}
|
||||
|
||||
// fill battery voltage
|
||||
$('#voltagesource').val(MISC.voltage_source);
|
||||
$('#cells').val(MISC.battery_cells);
|
||||
$('#celldetectvoltage').val(MISC.vbatdetectcellvoltage);
|
||||
$('#mincellvoltage').val(MISC.vbatmincellvoltage);
|
||||
$('#maxcellvoltage').val(MISC.vbatmaxcellvoltage);
|
||||
$('#warningcellvoltage').val(MISC.vbatwarningcellvoltage);
|
||||
|
@ -590,9 +593,9 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
|
|||
}
|
||||
|
||||
if (semver.gte(CONFIG.flightControllerVersion, "2.0.0")) {
|
||||
$(".requires-v2_0").show();
|
||||
$(".requires-v2_0_0").show();
|
||||
} else {
|
||||
$(".requires-v2_0").hide();
|
||||
$(".requires-v2_0_0").hide();
|
||||
}
|
||||
|
||||
$('#3ddeadbandlow').val(_3D.deadband3d_low);
|
||||
|
@ -666,6 +669,9 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
|
|||
MISC.maxthrottle = parseInt($('#maxthrottle').val());
|
||||
MISC.mincommand = parseInt($('#mincommand').val());
|
||||
|
||||
MISC.battery_cells = parseInt($('#cells').val());
|
||||
MISC.voltage_source = parseInt($('#voltagesource').val());
|
||||
MISC.vbatdetectcellvoltage = parseFloat($('#celldetectvoltage').val());
|
||||
MISC.vbatmincellvoltage = parseFloat($('#mincellvoltage').val());
|
||||
MISC.vbatmaxcellvoltage = parseFloat($('#maxcellvoltage').val());
|
||||
MISC.vbatwarningcellvoltage = parseFloat($('#warningcellvoltage').val());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue