From 9cf60224b2554b72dcd3f62225d27ae04a3f30d0 Mon Sep 17 00:00:00 2001 From: jaahaavi Date: Tue, 9 Dec 2014 10:37:02 +0200 Subject: [PATCH] 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). --- _locales/en/messages.json | 3 +++ js/msp.js | 4 ++-- tabs/configuration.html | 6 ++++++ tabs/configuration.js | 2 ++ 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 58f77492..8f52f13e 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -379,6 +379,9 @@ "configurationBatteryMinimum": { "message": "Minimum Cell Voltage" }, + "configurationBatteryWarning": { + "message": "Warning Cell Voltage" + }, "configurationBatteryMaximum": { "message": "Maximum Cell Voltage" }, diff --git a/js/msp.js b/js/msp.js index e6a6fe9c..ac2229ad 100644 --- a/js/msp.js +++ b/js/msp.js @@ -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++) { diff --git a/tabs/configuration.html b/tabs/configuration.html index b84451b9..d651b7f4 100644 --- a/tabs/configuration.html +++ b/tabs/configuration.html @@ -106,6 +106,12 @@ +
+ +