Added Warning Cell Voltage
Added Warning Cell Voltage to Battery voltage in Configuration tab. When battery has deployed to level that is defined with warning cell voltage buzzer starts slow beeping and copter can still land safely. When min voltage is reached beeper start fast "screaming" and LIPO is empty (to point when it could be damaged from over discharging if using that default 3.3V).10.3.x-maintenance
parent
b3ae9b2967
commit
9cf60224b2
|
@ -379,6 +379,9 @@
|
|||
"configurationBatteryMinimum": {
|
||||
"message": "Minimum Cell Voltage"
|
||||
},
|
||||
"configurationBatteryWarning": {
|
||||
"message": "Warning Cell Voltage"
|
||||
},
|
||||
"configurationBatteryMaximum": {
|
||||
"message": "Maximum Cell Voltage"
|
||||
},
|
||||
|
|
|
@ -305,7 +305,7 @@ var MSP = {
|
|||
MISC.vbatscale = data.getUint8(18, 1); // 10-200
|
||||
MISC.vbatmincellvoltage = data.getUint8(19, 1) / 10; // 10-50
|
||||
MISC.vbatmaxcellvoltage = data.getUint8(20, 1) / 10; // 10-50
|
||||
MISC.placeholder3 = data.getUint8(21, 1);
|
||||
MISC.vbatwarningcellvoltage = data.getUint8(21, 1) / 10; // 10-50
|
||||
break;
|
||||
case MSP_codes.MSP_MOTOR_PINS:
|
||||
console.log(data);
|
||||
|
@ -679,7 +679,7 @@ MSP.crunch = function (code) {
|
|||
buffer.push(MISC.vbatscale);
|
||||
buffer.push(MISC.vbatmincellvoltage * 10);
|
||||
buffer.push(MISC.vbatmaxcellvoltage * 10);
|
||||
buffer.push(MISC.placeholder3);
|
||||
buffer.push(MISC.vbatwarningcellvoltage * 10);
|
||||
break;
|
||||
case MSP_codes.MSP_SET_SERVO_CONF:
|
||||
for (var i = 0; i < SERVO_CONFIG.length; i++) {
|
||||
|
|
|
@ -106,6 +106,12 @@
|
|||
<span i18n="configurationBatteryMinimum"></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="number">
|
||||
<label>
|
||||
<input type="number" name="warningcellvoltage" step="0.1" min="1" max="5" />
|
||||
<span i18n="configurationBatteryWarning"></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="number">
|
||||
<label>
|
||||
<input type="number" name="maxcellvoltage" step="0.1" min="1" max="5" />
|
||||
|
|
|
@ -211,6 +211,7 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
|
|||
|
||||
// fill battery
|
||||
$('input[name="mincellvoltage"]').val(MISC.vbatmincellvoltage);
|
||||
$('input[name="warningcellvoltage"]').val(MISC.vbatwarningcellvoltage);
|
||||
$('input[name="maxcellvoltage"]').val(MISC.vbatmaxcellvoltage);
|
||||
$('input[name="voltagescale"]').val(MISC.vbatscale);
|
||||
|
||||
|
@ -250,6 +251,7 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
|
|||
MISC.mincommand = parseInt($('input[name="mincommand"]').val());
|
||||
|
||||
MISC.vbatmincellvoltage = parseFloat($('input[name="mincellvoltage"]').val());
|
||||
MISC.vbatwarningcellvoltage = parseFloat($('input[name="warningcellvoltage"]').val());
|
||||
MISC.vbatmaxcellvoltage = parseFloat($('input[name="maxcellvoltage"]').val());
|
||||
MISC.vbatscale = parseInt($('input[name="voltagescale"]').val());
|
||||
|
||||
|
|
Loading…
Reference in New Issue