Merge pull request #247 from mikeller/add_expert_mode

Added expert mode. Moved FAILSAFE feature back into failsafe tab.
10.3.x-maintenance
Michael Keller 2016-08-26 11:57:58 +12:00 committed by GitHub
commit f5e53d1a6b
10 changed files with 496 additions and 323 deletions

View File

@ -11,10 +11,6 @@
"options_receive_app_notifications": { "options_receive_app_notifications": {
"message": "Receive desktop <strong>notification</strong> when application updates" "message": "Receive desktop <strong>notification</strong> when application updates"
}, },
"options_improve_configurator": {
"message": "Send anonymous usage data to the developer team"
},
"connect": { "connect": {
"message": "Connect" "message": "Connect"
}, },
@ -33,6 +29,12 @@
"autoConnectDisabled": { "autoConnectDisabled": {
"message": "Auto-Connect: Disabled - User needs to select the correct serial port and click \"Connect\" button on its own" "message": "Auto-Connect: Disabled - User needs to select the correct serial port and click \"Connect\" button on its own"
}, },
"expertMode": {
"message": "Enable Expert Mode"
},
"permanentExpertMode": {
"message": "Permanently enable Expert Mode"
},
"deviceRebooting": { "deviceRebooting": {
"message": "Device - <span style=\"color: red\">Rebooting</span>" "message": "Device - <span style=\"color: red\">Rebooting</span>"
}, },
@ -544,10 +546,16 @@
"message": "On Screen Display" "message": "On Screen Display"
}, },
"featureFAILSAFE": { "featureFAILSAFE": {
"message": "Override failsafe behaviour on RX signal loss" "message": "Enable Failsafe Stage 2"
},
"featureFAILSAFEOld": {
"message": "Enable Failsafe"
}, },
"featureFAILSAFETip": { "featureFAILSAFETip": {
"message": "<strong>Warning:</strong> Use this only if you know what you are doing. The default behaviour on RX signal loss (deactivate all motors to bring craft to the ground) is the safest option in most situations." "message": "<strong>Note:</strong> When Stage 2 is DISABLED, the fallback setting <strong>Auto</strong> is used instead of the user settings for all flightchannels (Roll, Pitch, Yaw and Throttle)."
},
"featureFAILSAFEOldTip": {
"message": "Apply Failsafe settings on RX signal loss"
}, },
"configurationFeatureEnabled": { "configurationFeatureEnabled": {
"message": "Enabled" "message": "Enabled"

View File

@ -12,7 +12,6 @@ var Features = function (config) {
{bit: 5, group: 'other', name: 'SERVO_TILT'}, {bit: 5, group: 'other', name: 'SERVO_TILT'},
{bit: 6, group: 'other', name: 'SOFTSERIAL', haveTip: true}, {bit: 6, group: 'other', name: 'SOFTSERIAL', haveTip: true},
{bit: 7, group: 'gps', name: 'GPS', haveTip: true}, {bit: 7, group: 'gps', name: 'GPS', haveTip: true},
{bit: 8, group: 'other', name: 'FAILSAFE', haveTip: true},
{bit: 9, group: 'other', name: 'SONAR'}, {bit: 9, group: 'other', name: 'SONAR'},
{bit: 10, group: 'other', name: 'TELEMETRY'}, {bit: 10, group: 'other', name: 'TELEMETRY'},
{bit: 11, group: 'batteryCurrent', name: 'CURRENT_METER'}, {bit: 11, group: 'batteryCurrent', name: 'CURRENT_METER'},
@ -31,6 +30,16 @@ var Features = function (config) {
); );
} }
if (semver.gte(config.apiVersion, "1.15.0")) {
features.push(
{bit: 8, group: 'rxFailsafe', name: 'FAILSAFE', haveTip: true}
);
} else {
features.push(
{bit: 8, group: 'rxFailsafe', name: 'FAILSAFE', haveTip: true}
);
}
if (semver.gte(config.apiVersion, "1.16.0")) { if (semver.gte(config.apiVersion, "1.16.0")) {
features.push( features.push(
{bit: 21, group: 'other', name: 'TRANSPONDER', haveTip: true} {bit: 21, group: 'other', name: 'TRANSPONDER', haveTip: true}

View File

@ -1,7 +1,28 @@
Number.prototype.clamp = function(min, max) {
return Math.min(Math.max(this, min), max);
};
/**
* String formatting now supports currying (partial application).
* For a format string with N replacement indices, you can call .format
* with M <= N arguments. The result is going to be a format string
* with N-M replacement indices, properly counting from 0 .. N-M.
* The following Example should explain the usage of partial applied format:
* "{0}:{1}:{2}".format("a","b","c") === "{0}:{1}:{2}".format("a","b").format("c")
* "{0}:{1}:{2}".format("a").format("b").format("c") === "{0}:{1}:{2}".format("a").format("b", "c")
**/
String.prototype.format = function () {
var args = arguments;
return this.replace(/\{(\d+)\}/g, function (t, i) {
return args[i] !== void 0 ? args[i] : "{"+(i-args.length)+"}";
});
};
Array.prototype.push8 = function(val) { Array.prototype.push8 = function(val) {
this.push(0xFF & val); this.push(0xFF & val);
return this; return this;
}; };
Array.prototype.push16 = function(val) { Array.prototype.push16 = function(val) {
// low byte // low byte
this.push(0x00FF & val); this.push(0x00FF & val);
@ -10,13 +31,15 @@ Array.prototype.push16 = function(val) {
// chainable // chainable
return this; return this;
}; };
Array.prototype.push32 = function(val) { Array.prototype.push32 = function(val) {
this.push8(val) this.push8(val)
.push8(val >> 8) .push8(val >> 8)
.push8(val >> 16) .push8(val >> 16)
.push8(val >> 24); .push8(val >> 24);
return this; return this;
} };
DataView.prototype.offset = 0; DataView.prototype.offset = 0;
DataView.prototype.readU8 = function() { DataView.prototype.readU8 = function() {
if (this.byteLength >= this.offset+1) { if (this.byteLength >= this.offset+1) {
@ -24,28 +47,32 @@ DataView.prototype.readU8 = function() {
} else { } else {
return null; return null;
} }
} };
DataView.prototype.readU16 = function() { DataView.prototype.readU16 = function() {
if (this.byteLength >= this.offset+2) { if (this.byteLength >= this.offset+2) {
return this.readU8() + this.readU8()*256; return this.readU8() + this.readU8()*256;
} else { } else {
return null; return null;
} }
} };
DataView.prototype.readU32 = function() { DataView.prototype.readU32 = function() {
if (this.byteLength >= this.offset+4) { if (this.byteLength >= this.offset+4) {
return this.readU16() + this.readU16()*65536; return this.readU16() + this.readU16()*65536;
} else { } else {
return null; return null;
} }
} };
DataView.prototype.read8 = function() { DataView.prototype.read8 = function() {
if (this.byteLength >= this.offset+1) { if (this.byteLength >= this.offset+1) {
return this.getInt8(this.offset++, 1); return this.getInt8(this.offset++, 1);
} else { } else {
return null; return null;
} }
} };
DataView.prototype.read16 = function() { DataView.prototype.read16 = function() {
this.offset += 2; this.offset += 2;
if (this.byteLength >= this.offset) { if (this.byteLength >= this.offset) {
@ -53,7 +80,8 @@ DataView.prototype.read16 = function() {
} else { } else {
return null; return null;
} }
} };
DataView.prototype.read32 = function() { DataView.prototype.read32 = function() {
this.offset += 4; this.offset += 4;
if (this.byteLength >= this.offset) { if (this.byteLength >= this.offset) {
@ -61,4 +89,4 @@ DataView.prototype.read32 = function() {
} else { } else {
return null; return null;
} }
} };

View File

@ -1581,6 +1581,14 @@ dialog {
display:none; display:none;
} }
#expertMode {
color: #ddd;
margin-top: 16px;
width:125px;
float: right;
margin-right: 0px;
line-height: 12px;
}
/* Battery element styling*/ /* Battery element styling*/

504
main.html
View File

@ -1,261 +1,281 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="author" content="cTn" /> <meta name="author" content="cTn"/>
<link type="text/css" rel="stylesheet" href="./main.css" media="all"/> <link type="text/css" rel="stylesheet" href="./main.css" media="all"/>
<link type="text/css" rel="stylesheet" href="./js/libraries/jquery.nouislider.min.css" /> <link type="text/css" rel="stylesheet" href="./js/libraries/jquery.nouislider.min.css"/>
<link type="text/css" rel="stylesheet" href="./js/libraries/jquery.nouislider.pips.min.css" /> <link type="text/css" rel="stylesheet" href="./js/libraries/jquery.nouislider.pips.min.css"/>
<link type="text/css" rel="stylesheet" href="./js/libraries/flightindicators.css" /> <link type="text/css" rel="stylesheet" href="./js/libraries/flightindicators.css"/>
<link type="text/css" rel="stylesheet" href="./tabs/landing.css" media="all" /> <link type="text/css" rel="stylesheet" href="./tabs/landing.css" media="all"/>
<link type="text/css" rel="stylesheet" href="./tabs/setup.css" media="all" /> <link type="text/css" rel="stylesheet" href="./tabs/setup.css" media="all"/>
<link type="text/css" rel="stylesheet" href="./tabs/help.css" media="all" /> <link type="text/css" rel="stylesheet" href="./tabs/help.css" media="all"/>
<link type="text/css" rel="stylesheet" href="./tabs/ports.css" media="all" /> <link type="text/css" rel="stylesheet" href="./tabs/ports.css" media="all"/>
<link type="text/css" rel="stylesheet" href="./tabs/configuration.css" media="all" /> <link type="text/css" rel="stylesheet" href="./tabs/configuration.css" media="all"/>
<link type="text/css" rel="stylesheet" href="./tabs/pid_tuning.css" media="all" /> <link type="text/css" rel="stylesheet" href="./tabs/pid_tuning.css" media="all"/>
<link type="text/css" rel="stylesheet" href="./tabs/receiver.css" media="all" /> <link type="text/css" rel="stylesheet" href="./tabs/receiver.css" media="all"/>
<link type="text/css" rel="stylesheet" href="./tabs/servos.css" media="all" /> <link type="text/css" rel="stylesheet" href="./tabs/servos.css" media="all"/>
<link type="text/css" rel="stylesheet" href="./tabs/gps.css" media="all" /> <link type="text/css" rel="stylesheet" href="./tabs/gps.css" media="all"/>
<link type="text/css" rel="stylesheet" href="./tabs/motors.css" media="all" /> <link type="text/css" rel="stylesheet" href="./tabs/motors.css" media="all"/>
<link type="text/css" rel="stylesheet" href="./tabs/led_strip.css" media="all" /> <link type="text/css" rel="stylesheet" href="./tabs/led_strip.css" media="all"/>
<link type="text/css" rel="stylesheet" href="./tabs/sensors.css" media="all" /> <link type="text/css" rel="stylesheet" href="./tabs/sensors.css" media="all"/>
<link type="text/css" rel="stylesheet" href="./tabs/cli.css" media="all" /> <link type="text/css" rel="stylesheet" href="./tabs/cli.css" media="all"/>
<link type="text/css" rel="stylesheet" href="./tabs/logging.css" media="all" /> <link type="text/css" rel="stylesheet" href="./tabs/logging.css" media="all"/>
<link type="text/css" rel="stylesheet" href="./tabs/onboard_logging.css" media="all" /> <link type="text/css" rel="stylesheet" href="./tabs/onboard_logging.css" media="all"/>
<link type="text/css" rel="stylesheet" href="./tabs/firmware_flasher.css" media="all" /> <link type="text/css" rel="stylesheet" href="./tabs/firmware_flasher.css" media="all"/>
<link type="text/css" rel="stylesheet" href="./tabs/adjustments.css" media="all" /> <link type="text/css" rel="stylesheet" href="./tabs/adjustments.css" media="all"/>
<link type="text/css" rel="stylesheet" href="./tabs/auxiliary.css" media="all" /> <link type="text/css" rel="stylesheet" href="./tabs/auxiliary.css" media="all"/>
<link type="text/css" rel="stylesheet" href="./tabs/failsafe.css" media="all" /> <link type="text/css" rel="stylesheet" href="./tabs/failsafe.css" media="all"/>
<link type="text/css" rel="stylesheet" href="./tabs/osd.css" media="all" /> <link type="text/css" rel="stylesheet" href="./tabs/osd.css" media="all"/>
<link type="text/css" rel="stylesheet" href="./tabs/transponder.css" media="all" /> <link type="text/css" rel="stylesheet" href="./tabs/transponder.css" media="all"/>
<link type="text/css" rel="stylesheet" href="./css/opensans_webfontkit/fonts.css" media="all" /> <link type="text/css" rel="stylesheet" href="./css/opensans_webfontkit/fonts.css" media="all"/>
<link type="text/css" rel="stylesheet" href="./css/dropdown-lists/css/style_lists.css" media="all" /> <link type="text/css" rel="stylesheet" href="./css/dropdown-lists/css/style_lists.css" media="all"/>
<link type="text/css" rel="stylesheet" href="./js/libraries/switchery/switchery.css" media="all" /> <link type="text/css" rel="stylesheet" href="./js/libraries/switchery/switchery.css" media="all"/>
<link rel="stylesheet" type="text/css" href="./js/libraries/jbox/jBox.css" /> <link rel="stylesheet" type="text/css" href="./js/libraries/jbox/jBox.css"/>
<script type="text/javascript" src="./js/libraries/q.js"></script> <script type="text/javascript" src="./js/libraries/q.js"></script>
<script type="text/javascript" src="./js/libraries/jquery-2.1.4.min.js"></script> <script type="text/javascript" src="./js/libraries/jquery-2.1.4.min.js"></script>
<script type="text/javascript" src="./js/libraries/jquery-ui-1.11.4.min.js"></script> <script type="text/javascript" src="./js/libraries/jquery-ui-1.11.4.min.js"></script>
<script type="text/javascript" src="./js/libraries/d3.min.js"></script> <script type="text/javascript" src="./js/libraries/d3.min.js"></script>
<script type="text/javascript" src="./js/libraries/jquery.nouislider.all.min.js"></script> <script type="text/javascript" src="./js/libraries/jquery.nouislider.all.min.js"></script>
<script type="text/javascript" src="./js/libraries/three/three.min.js"></script> <script type="text/javascript" src="./js/libraries/three/three.min.js"></script>
<script type="text/javascript" src="./js/libraries/three/Projector.js"></script> <script type="text/javascript" src="./js/libraries/three/Projector.js"></script>
<script type="text/javascript" src="./js/libraries/three/CanvasRenderer.js"></script> <script type="text/javascript" src="./js/libraries/three/CanvasRenderer.js"></script>
<script type="text/javascript" src="./js/libraries/jquery.flightindicators.js"></script> <script type="text/javascript" src="./js/libraries/jquery.flightindicators.js"></script>
<script type="text/javascript" src="./js/libraries/semver.js"></script> <script type="text/javascript" src="./js/libraries/semver.js"></script>
<script type="text/javascript" src="./js/libraries/jbox/jBox.min.js"></script> <script type="text/javascript" src="./js/libraries/jbox/jBox.min.js"></script>
<script type="text/javascript" src="./js/libraries/switchery/switchery.js"></script> <script type="text/javascript" src="./js/libraries/switchery/switchery.js"></script>
<script type="text/javascript" src="./js/libraries/bluebird.min.js"></script> <script type="text/javascript" src="./js/libraries/bluebird.min.js"></script>
<script type="text/javascript" src="./js/libraries/jquery.ba-throttle-debounce.min.js"></script> <script type="text/javascript" src="./js/libraries/jquery.ba-throttle-debounce.min.js"></script>
<script type="text/javascript" src="./js/libraries/inflection.min.js"></script> <script type="text/javascript" src="./js/libraries/inflection.min.js"></script>
<script type="text/javascript" src="./js/injected_methods.js"></script> <script type="text/javascript" src="./js/injected_methods.js"></script>
<script type="text/javascript" src="./js/port_handler.js"></script> <script type="text/javascript" src="./js/port_handler.js"></script>
<script type="text/javascript" src="./js/port_usage.js"></script> <script type="text/javascript" src="./js/port_usage.js"></script>
<script type="text/javascript" src="./js/serial.js"></script> <script type="text/javascript" src="./js/serial.js"></script>
<script type="text/javascript" src="./js/gui.js"></script> <script type="text/javascript" src="./js/gui.js"></script>
<script type="text/javascript" src="./js/model.js"></script> <script type="text/javascript" src="./js/model.js"></script>
<script type="text/javascript" src="./js/serial_backend.js"></script> <script type="text/javascript" src="./js/serial_backend.js"></script>
<script type="text/javascript" src="./js/data_storage.js"></script> <script type="text/javascript" src="./js/data_storage.js"></script>
<script type="text/javascript" src="./js/fc.js"></script> <script type="text/javascript" src="./js/fc.js"></script>
<script type="text/javascript" src="./js/msp/MSPCodes.js"></script> <script type="text/javascript" src="./js/msp/MSPCodes.js"></script>
<script type="text/javascript" src="./js/msp.js"></script> <script type="text/javascript" src="./js/msp.js"></script>
<script type="text/javascript" src="./js/msp/MSPHelper.js"></script> <script type="text/javascript" src="./js/msp/MSPHelper.js"></script>
<script type="text/javascript" src="./js/backup_restore.js"></script> <script type="text/javascript" src="./js/backup_restore.js"></script>
<script type="text/javascript" src="./js/protocols/stm32.js"></script> <script type="text/javascript" src="./js/protocols/stm32.js"></script>
<script type="text/javascript" src="./js/protocols/stm32usbdfu.js"></script> <script type="text/javascript" src="./js/protocols/stm32usbdfu.js"></script>
<script type="text/javascript" src="./js/localization.js"></script> <script type="text/javascript" src="./js/localization.js"></script>
<script type="text/javascript" src="./js/boards.js"></script> <script type="text/javascript" src="./js/boards.js"></script>
<script type="text/javascript" src="./js/RateCurve.js"></script> <script type="text/javascript" src="./js/RateCurve.js"></script>
<script type="text/javascript" src="./js/Features.js"></script> <script type="text/javascript" src="./js/Features.js"></script>
<script type="text/javascript" src="./main.js"></script> <script type="text/javascript" src="./main.js"></script>
<script type="text/javascript" src="./tabs/landing.js"></script> <script type="text/javascript" src="./tabs/landing.js"></script>
<script type="text/javascript" src="./tabs/setup.js"></script> <script type="text/javascript" src="./tabs/setup.js"></script>
<script type="text/javascript" src="./tabs/help.js"></script> <script type="text/javascript" src="./tabs/help.js"></script>
<script type="text/javascript" src="./tabs/ports.js"></script> <script type="text/javascript" src="./tabs/ports.js"></script>
<script type="text/javascript" src="./tabs/configuration.js"></script> <script type="text/javascript" src="./tabs/configuration.js"></script>
<script type="text/javascript" src="./tabs/pid_tuning.js"></script> <script type="text/javascript" src="./tabs/pid_tuning.js"></script>
<script type="text/javascript" src="./tabs/receiver.js"></script> <script type="text/javascript" src="./tabs/receiver.js"></script>
<script type="text/javascript" src="./tabs/auxiliary.js"></script> <script type="text/javascript" src="./tabs/auxiliary.js"></script>
<script type="text/javascript" src="./tabs/adjustments.js"></script> <script type="text/javascript" src="./tabs/adjustments.js"></script>
<script type="text/javascript" src="./tabs/servos.js"></script> <script type="text/javascript" src="./tabs/servos.js"></script>
<script type="text/javascript" src="./tabs/gps.js"></script> <script type="text/javascript" src="./tabs/gps.js"></script>
<script type="text/javascript" src="./tabs/motors.js"></script> <script type="text/javascript" src="./tabs/motors.js"></script>
<script type="text/javascript" src="./tabs/led_strip.js"></script> <script type="text/javascript" src="./tabs/led_strip.js"></script>
<script type="text/javascript" src="./tabs/sensors.js"></script> <script type="text/javascript" src="./tabs/sensors.js"></script>
<script type="text/javascript" src="./tabs/cli.js"></script> <script type="text/javascript" src="./tabs/cli.js"></script>
<script type="text/javascript" src="./tabs/logging.js"></script> <script type="text/javascript" src="./tabs/logging.js"></script>
<script type="text/javascript" src="./tabs/onboard_logging.js"></script> <script type="text/javascript" src="./tabs/onboard_logging.js"></script>
<script type="text/javascript" src="./tabs/firmware_flasher.js"></script> <script type="text/javascript" src="./tabs/firmware_flasher.js"></script>
<script type="text/javascript" src="./tabs/failsafe.js"></script> <script type="text/javascript" src="./tabs/failsafe.js"></script>
<script type="text/javascript" src="./tabs/osd.js"></script> <script type="text/javascript" src="./tabs/osd.js"></script>
<script type="text/javascript" src="./tabs/transponder.js"></script> <script type="text/javascript" src="./tabs/transponder.js"></script>
<title></title> <title></title>
</head> </head>
<body> <body>
<div id="main-wrapper"> <div id="main-wrapper">
<div class="headerbar"> <div class="headerbar">
<div id="logo"> <div id="logo">
<div class="logo_text"> <div class="logo_text">
CONFIGURATOR CONFIGURATOR
<div class="version"></div> <div class="version"></div>
</div>
</div> </div>
<a id="options" href="#" i18n_title="options_title"></a> </div>
<div id="port-picker"> <a id="options" href="#" i18n_title="options_title"></a>
<div class="connect_controls" id="connectbutton"> <div id="port-picker">
<div class="connect_b"> <div class="connect_controls" id="connectbutton">
<a class="connect" href="#"></a> <div class="connect_b">
</div> <a class="connect" href="#"></a>
<a class="connect_state" i18n="connect"></a>
</div> </div>
<div id="portsinput"> <a class="connect_state" i18n="connect"></a>
<div class="dropdown dropdown-dark"> </div>
<select class="dropdown-select" id="port" title="Port"> <div id="portsinput">
<option value="manual">Manual</option> <div class="dropdown dropdown-dark">
<!-- port list gets generated here --> <select class="dropdown-select" id="port" title="Port">
</select> <option value="manual">Manual</option>
</div> <!-- port list gets generated here -->
<div class="dropdown dropdown-dark"> </select>
<select class="dropdown-select" id="baud" title="Baud Rate"> </div>
<option value="115200" selected="selected">115200</option> <div class="dropdown dropdown-dark">
<option value="57600">57600</option> <select class="dropdown-select" id="baud" title="Baud Rate">
<option value="38400">38400</option> <option value="115200" selected="selected">115200</option>
<option value="28800">28800</option> <option value="57600">57600</option>
<option value="19200">19200</option> <option value="38400">38400</option>
<option value="14400">14400</option> <option value="28800">28800</option>
<option value="9600">9600</option> <option value="19200">19200</option>
<option value="4800">4800</option> <option value="14400">14400</option>
<option value="2400">2400</option> <option value="9600">9600</option>
<option value="1200">1200</option> <option value="4800">4800</option>
</select> <option value="2400">2400</option>
</div> <option value="1200">1200</option>
<div id="port-override-option"> </select>
<label for="port-override">Port: <input id="port-override" type="text" </div>
value="/dev/rfcomm0" /></label> <div id="port-override-option">
</div> <label for="port-override">Port: <input id="port-override" type="text"
<div> value="/dev/rfcomm0"/></label>
<label><input class="auto_connect togglesmall" type="checkbox" /><span </div>
<div>
<label><input class="auto_connect togglesmall" type="checkbox"/><span
class="auto_connect" i18n="autoConnect"></span></label> class="auto_connect" i18n="autoConnect"></span></label>
</div>
</div>
</div>
<div class="header-wrapper">
<div id="dataflash_wrapper_global">
<div class="noflash_global" align="center">No dataflash <br>chip found</div>
<ul class="dataflash-contents_global">
<li class="dataflash-free_global">
<div class="legend">Dataflash: free space</div>
</li>
</ul>
</div>
<div id="sensor-status" class="sensor_state mode-connected">
<ul>
<li class="gyro" title="Gyroscope">
<div class="gyroicon">Gyro</div>
</li>
<li class="accel" title="Accelerometer">
<div class="accicon">Accel</div>
</li>
<li class="mag" title="Magnetometer">
<div class="magicon">Mag</div>
</li>
<li class="baro" title="Barometer">
<div class="baroicon">Baro</div>
</li>
<li class="gps" title="GPS">
<div class="gpsicon">GPS</div>
</li>
<li class="sonar" title="Sonar / Range finder">
<div class="sonaricon">Sonar</div>
</li>
</ul>
</div>
<div id="quad-status_wrapper">
<div class="battery-icon">
<div class="quad-status-contents">
<div class="battery-status"></div>
</div>
</div>
<div class="battery-legend">Battery voltage</div>
<div class="bottomStatusIcons">
<div class="armedicon cf_tip" i18n_title="mainHelpArmed"></div>
<div class="failsafeicon cf_tip" i18n_title="mainHelpFailsafe"></div>
<div class="linkicon cf_tip" i18n_title="mainHelpLink"></div>
</div>
</div> </div>
</div> </div>
</div> </div>
<div class="clear-both"></div> <div class="header-wrapper">
<div id="log"> <div id="dataflash_wrapper_global">
<div class="logswitch"> <div class="noflash_global" align="center">No dataflash <br>chip found</div>
<a href="#" id="showlog">Show Log</a> <ul class="dataflash-contents_global">
<li class="dataflash-free_global">
<div class="legend">Dataflash: free space</div>
</li>
</ul>
<div id="expertMode" align="center">
<label>
<input name="expertModeCheckbox" class="togglesmall" type="checkbox"/>
<span i18n="expertMode"></span>
</label>
</div>
</div> </div>
<div id="scrollicon"></div> <div id="sensor-status" class="sensor_state mode-connected">
<div class="wrapper"></div> <ul>
</div> <li class="gyro" title="Gyroscope">
<div class="tab_container"> <div class="gyroicon">Gyro</div>
<div id="tabs"> </li>
<ul class="mode-disconnected"> <li class="accel" title="Accelerometer">
<li class="tab_landing"><a href="#" i18n="tabLanding" class="tabicon ic_welcome" title="Welcome"></a></li> <div class="accicon">Accel</div>
<li class="tab_help"><a href="#" i18n="tabHelp" class="tabicon ic_help" title="Documentation &amp; Support"></a></li> </li>
<li class="tab_firmware_flasher"><a href="#" i18n="tabFirmwareFlasher" class="tabicon ic_flasher" title="Firmware Flasher"></a></li> <li class="mag" title="Magnetometer">
</ul> <div class="magicon">Mag</div>
<ul class="mode-connected"> </li>
<li class="tab_setup"><a href="#" i18n="tabSetup" class="tabicon ic_setup" title="Setup"></a></li> <li class="baro" title="Barometer">
<li class="tab_ports"><a href="#" i18n="tabPorts" class="tabicon ic_ports" title="Ports"></a></li> <div class="baroicon">Baro</div>
<li class="tab_configuration"><a href="#" i18n="tabConfiguration" class="tabicon ic_config" title="Configuration"></a></li> </li>
<li class="tab_failsafe"><a href="#" i18n="tabFailsafe" class="tabicon ic_failsafe" title="Failsafe"></a></li> <li class="gps" title="GPS">
<li class="tab_pid_tuning"><a href="#" i18n="tabPidTuning" class="tabicon ic_pid" title="PID Tuning"></a></li> <div class="gpsicon">GPS</div>
<li class="tab_receiver"><a href="#" i18n="tabReceiver" class="tabicon ic_rx" title="Receiver"></a></li> </li>
<li class="tab_auxiliary"><a href="#" i18n="tabAuxiliary" class="tabicon ic_modes" title="Modes"></a></li> <li class="sonar" title="Sonar / Range finder">
<li class="tab_adjustments"><a href="#" i18n="tabAdjustments" class="tabicon ic_adjust" title="Adjustments"></a></li> <div class="sonaricon">Sonar</div>
<li class="tab_servos"><a href="#" i18n="tabServos" class="tabicon ic_servo" title="Servos"></a></li> </li>
<li class="tab_gps"><a href="#" i18n="tabGPS" class="tabicon ic_gps" title="GPS"></a></li>
<li class="tab_motors"><a href="#" i18n="tabMotorTesting" class="tabicon ic_motor" title="Motors"></a></li>
<li class="tab_osd"><a href="#" i18n="tabOsd" class="tabicon ic_osd" title="Osd"></a></li>
<li class="tab_transponder"><a href="#" i18n="tabTransponder" class="tabicon ic_transponder" title="Transponder"></a></li>
<li class="tab_led_strip"><a href="#" i18n="tabLedStrip" class="tabicon ic_led" title="LED Strip"></a></li>
<li class="tab_sensors"><a href="#" i18n="tabRawSensorData" class="tabicon ic_sensors" title="Sensors"></a></li>
<li class="tab_logging"><a href="#" i18n="tabLogging" class="tabicon ic_log" title="Tethered Logging"></a></li>
<li class="tab_onboard_logging"><a href="#" i18n="tabOnboardLogging" class="tabicon ic_data" title="Onboard Logging"></a></li>
</ul>
<ul class="mode-connected-cli">
<li class="tab_cli"><a href="#" i18n="tabCLI" class="tabicon ic_cli" title="CLI"></a></li>
<!-- spare icons
<li class=""><a href="#"class="tabicon ic_mission">Mission (spare icon)</a></li>
<li class=""><a href="#"class="tabicon ic_advanced">Advanced (spare icon)</a></li>
<li class=""><a href="#"class="tabicon ic_wizzard">Wizzard (spare icon)</a></li>
-->
</ul> </ul>
</div> </div>
<div class="clear-both"></div> <div id="quad-status_wrapper">
</div> <div class="battery-icon">
<div id="content"></div> <div class="quad-status-contents">
<div id="status-bar"> <div class="battery-status"></div>
<div> </div>
<span i18n="statusbar_port_utilization"></span> <span class="port_usage_down">D: 0%</span> <span </div>
class="port_usage_up">U: 0%</span> <div class="battery-legend">Battery voltage</div>
</div> <div class="bottomStatusIcons">
<div> <div class="armedicon cf_tip" i18n_title="mainHelpArmed"></div>
<span i18n="statusbar_packet_error"></span> <span class="packet-error">0</span> <div class="failsafeicon cf_tip" i18n_title="mainHelpFailsafe"></div>
</div> <div class="linkicon cf_tip" i18n_title="mainHelpLink"></div>
<div> </div>
<span i18n="statusbar_i2c_error"></span> <span class="i2c-error">0</span>
</div>
<div>
<span i18n="statusbar_cycle_time"></span> <span class="cycle-time">0</span>
</div>
<div>
<span class="cpu-load"> </span>
</div>
<div class="version">
<!-- configuration version generated here -->
</div>
</div>
<div id="cache">
<div class="data-loading">
<p>Waiting for data ...</p>
</div> </div>
</div> </div>
</div> </div>
<div class="clear-both"></div>
<div id="log">
<div class="logswitch">
<a href="#" id="showlog">Show Log</a>
</div>
<div id="scrollicon"></div>
<div class="wrapper"></div>
</div>
<div class="tab_container">
<div id="tabs">
<ul class="mode-disconnected">
<li class="tab_landing"><a href="#" i18n="tabLanding" class="tabicon ic_welcome" title="Welcome"></a>
</li>
<li class="tab_help"><a href="#" i18n="tabHelp" class="tabicon ic_help"
title="Documentation &amp; Support"></a></li>
<li class="tab_firmware_flasher"><a href="#" i18n="tabFirmwareFlasher" class="tabicon ic_flasher"
title="Firmware Flasher"></a></li>
</ul>
<ul class="mode-connected">
<li class="tab_setup"><a href="#" i18n="tabSetup" class="tabicon ic_setup" title="Setup"></a></li>
<li class="tab_ports"><a href="#" i18n="tabPorts" class="tabicon ic_ports" title="Ports"></a></li>
<li class="tab_configuration"><a href="#" i18n="tabConfiguration" class="tabicon ic_config"
title="Configuration"></a></li>
<li class="tab_failsafe"><a href="#" i18n="tabFailsafe" class="tabicon ic_failsafe"
title="Failsafe"></a></li>
<li class="tab_pid_tuning"><a href="#" i18n="tabPidTuning" class="tabicon ic_pid"
title="PID Tuning"></a></li>
<li class="tab_receiver"><a href="#" i18n="tabReceiver" class="tabicon ic_rx" title="Receiver"></a></li>
<li class="tab_auxiliary"><a href="#" i18n="tabAuxiliary" class="tabicon ic_modes" title="Modes"></a>
</li>
<li class="tab_adjustments"><a href="#" i18n="tabAdjustments" class="tabicon ic_adjust"
title="Adjustments"></a></li>
<li class="tab_servos"><a href="#" i18n="tabServos" class="tabicon ic_servo" title="Servos"></a></li>
<li class="tab_gps"><a href="#" i18n="tabGPS" class="tabicon ic_gps" title="GPS"></a></li>
<li class="tab_motors"><a href="#" i18n="tabMotorTesting" class="tabicon ic_motor" title="Motors"></a>
</li>
<li class="tab_osd"><a href="#" i18n="tabOsd" class="tabicon ic_osd" title="Osd"></a></li>
<li class="tab_transponder"><a href="#" i18n="tabTransponder" class="tabicon ic_transponder"
title="Transponder"></a></li>
<li class="tab_led_strip"><a href="#" i18n="tabLedStrip" class="tabicon ic_led" title="LED Strip"></a>
</li>
<li class="tab_sensors"><a href="#" i18n="tabRawSensorData" class="tabicon ic_sensors"
title="Sensors"></a></li>
<li class="tab_logging"><a href="#" i18n="tabLogging" class="tabicon ic_log"
title="Tethered Logging"></a></li>
<li class="tab_onboard_logging"><a href="#" i18n="tabOnboardLogging" class="tabicon ic_data"
title="Onboard Logging"></a></li>
</ul>
<ul class="mode-connected-cli">
<li class="tab_cli"><a href="#" i18n="tabCLI" class="tabicon ic_cli" title="CLI"></a></li>
<!-- spare icons
<li class=""><a href="#"class="tabicon ic_mission">Mission (spare icon)</a></li>
<li class=""><a href="#"class="tabicon ic_advanced">Advanced (spare icon)</a></li>
<li class=""><a href="#"class="tabicon ic_wizzard">Wizzard (spare icon)</a></li>
-->
</ul>
</div>
<div class="clear-both"></div>
</div>
<div id="content"></div>
<div id="status-bar">
<div>
<span i18n="statusbar_port_utilization"></span> <span class="port_usage_down">D: 0%</span> <span
class="port_usage_up">U: 0%</span>
</div>
<div>
<span i18n="statusbar_packet_error"></span> <span class="packet-error">0</span>
</div>
<div>
<span i18n="statusbar_i2c_error"></span> <span class="i2c-error">0</span>
</div>
<div>
<span i18n="statusbar_cycle_time"></span> <span class="cycle-time">0</span>
</div>
<div>
<span class="cpu-load"> </span>
</div>
<div class="version">
<!-- configuration version generated here -->
</div>
</div>
<div id="cache">
<div class="data-loading">
<p>Waiting for data ...</p>
</div>
</div>
</div>
</body> </body>
</html> </html>

167
main.js
View File

@ -29,22 +29,25 @@ $(document).ready(function () {
// check for newer releases online to inform people in case they are running an old release // check for newer releases online to inform people in case they are running an old release
chrome.storage.local.get(['lastVersionChecked', 'lastVersionAvailableOnline'], function(result) { chrome.storage.local.get(['lastVersionChecked', 'lastVersionAvailableOnline'], function (result) {
if (typeof result.lastVersionChecked === undefined || ($.now() - result.lastVersionChecked) > 3600*1000) { if (typeof result.lastVersionChecked === undefined || ($.now() - result.lastVersionChecked) > 3600 * 1000) {
try { try {
var url = 'https://api.github.com/repos/betaflight/betaflight-configurator/tags'; var url = 'https://api.github.com/repos/betaflight/betaflight-configurator/tags';
$.get(url).done(function (data) { $.get(url).done(function (data) {
var versions = data.sort(function (v1, v2) { var versions = data.sort(function (v1, v2) {
try { try {
return semver.compare(v2.name, v1.name); return semver.compare(v2.name, v1.name);
} catch (e) { } catch (e) {
return false; return false;
} }
}); });
chrome.storage.local.set({'lastVersionChecked': $.now(), 'lastVersionAvailableOnline': versions[0].name}, function(result) { chrome.storage.local.set({
console.log("Latest version available online: "+ versions[0].name); 'lastVersionChecked': $.now(),
}); 'lastVersionAvailableOnline': versions[0].name
notifyOutdatedVersion(versions[0].name); }, function (result) {
console.log("Latest version available online: " + versions[0].name);
});
notifyOutdatedVersion(versions[0].name);
}); });
} catch (e) { } catch (e) {
// Just to catch and supress warnings if no internet connection is available // Just to catch and supress warnings if no internet connection is available
@ -57,7 +60,7 @@ $(document).ready(function () {
chrome.storage.local.get('logopen', function (result) { chrome.storage.local.get('logopen', function (result) {
if (result.logopen) { if (result.logopen) {
$("#showlog").trigger('click'); $("#showlog").trigger('click');
} }
}); });
// log webgl capability // log webgl capability
@ -206,12 +209,30 @@ $(document).ready(function () {
if (typeof result.update_notify === 'undefined' || result.update_notify) { if (typeof result.update_notify === 'undefined' || result.update_notify) {
$('div.notifications input').prop('checked', true); $('div.notifications input').prop('checked', true);
} }
$('div.notifications input').change(function () {
var check = $(this).is(':checked');
chrome.storage.local.set({'update_notify': check});
});
}); });
$('div.notifications input').change(function () { chrome.storage.local.get('permanentExpertMode', function (result) {
var check = $(this).is(':checked'); if (result.permanentExpertMode) {
$('div.permanentExpertMode input').prop('checked', true);
}
chrome.storage.local.set({'update_notify': check}); $('div.permanentExpertMode input').change(function () {
var checked = $(this).is(':checked');
chrome.storage.local.set({'permanentExpertMode': checked});
$('input[name="expertModeCheckbox"]').prop('checked', checked).change();
if (BF_CONFIG) {
updateTabList(BF_CONFIG.features);
}
}).change();
}); });
function close_and_cleanup(e) { function close_and_cleanup(e) {
@ -307,37 +328,48 @@ $(document).ready(function () {
} }
}); });
$("#showlog").on('click', function() { $("#showlog").on('click', function () {
var state = $(this).data('state'); var state = $(this).data('state');
if ( state ) { if (state) {
$("#log").animate({height: 27}, 200, function() { $("#log").animate({height: 27}, 200, function () {
var command_log = $('div#log'); var command_log = $('div#log');
command_log.scrollTop($('div.wrapper', command_log).height()); command_log.scrollTop($('div.wrapper', command_log).height());
}); });
$("#log").removeClass('active'); $("#log").removeClass('active');
$("#content").removeClass('logopen'); $("#content").removeClass('logopen');
$(".tab_container").removeClass('logopen'); $(".tab_container").removeClass('logopen');
$("#scrollicon").removeClass('active'); $("#scrollicon").removeClass('active');
chrome.storage.local.set({'logopen': false}); chrome.storage.local.set({'logopen': false});
state = false; state = false;
}else{ } else {
$("#log").animate({height: 111}, 200); $("#log").animate({height: 111}, 200);
$("#log").addClass('active'); $("#log").addClass('active');
$("#content").addClass('logopen'); $("#content").addClass('logopen');
$(".tab_container").addClass('logopen'); $(".tab_container").addClass('logopen');
$("#scrollicon").addClass('active'); $("#scrollicon").addClass('active');
chrome.storage.local.set({'logopen': true}); chrome.storage.local.set({'logopen': true});
state = true; state = true;
} }
$(this).text(state ? 'Hide Log' : 'Show Log'); $(this).text(state ? 'Hide Log' : 'Show Log');
$(this).data('state', state); $(this).data('state', state);
});
chrome.storage.local.get('permanentExpertMode', function (result) {
if (result.permanentExpertMode) {
$('input[name="expertModeCheckbox"]').prop('checked', true);
}
$('input[name="expertModeCheckbox"]').change(function () {
if (BF_CONFIG) {
updateTabList(BF_CONFIG.features);
}
}).change();
}); });
}); });
function notifyOutdatedVersion (version) { function notifyOutdatedVersion(version) {
if (semver.lt(chrome.runtime.getManifest().version, version)) { if (semver.lt(chrome.runtime.getManifest().version, version)) {
GUI.log('You are using an old version of ' + chrome.runtime.getManifest().name + '. Version ' + version + ' is available online with possible improvements and fixes.'); GUI.log('You are using an old version of ' + chrome.runtime.getManifest().name + '. Version ' + version + ' is available online with possible improvements and fixes.');
} }
@ -379,45 +411,52 @@ function bytesToSize(bytes) {
return bytes; return bytes;
} }
Number.prototype.clamp = function(min, max) { function isExpertModeEnabled() {
return Math.min(Math.max(this, min), max); return $('input[name="expertModeCheckbox"]').is(':checked');
}; }
/**
* String formatting now supports currying (partial application).
* For a format string with N replacement indices, you can call .format
* with M <= N arguments. The result is going to be a format string
* with N-M replacement indices, properly counting from 0 .. N-M.
* The following Example should explain the usage of partial applied format:
* "{0}:{1}:{2}".format("a","b","c") === "{0}:{1}:{2}".format("a","b").format("c")
* "{0}:{1}:{2}".format("a").format("b").format("c") === "{0}:{1}:{2}".format("a").format("b", "c")
**/
String.prototype.format = function () {
var args = arguments;
return this.replace(/\{(\d+)\}/g, function (t, i) {
return args[i] !== void 0 ? args[i] : "{"+(i-args.length)+"}";
});
};
function updateTabList(features) { function updateTabList(features) {
if (features.isEnabled('GPS')) { if (features.isEnabled('GPS') && isExpertModeEnabled()) {
$('#tabs ul.mode-connected li.tab_gps').show(); $('#tabs ul.mode-connected li.tab_gps').show();
} else { } else {
$('#tabs ul.mode-connected li.tab_gps').hide(); $('#tabs ul.mode-connected li.tab_gps').hide();
} }
if (features.isEnabled('FAILSAFE')) { if (isExpertModeEnabled()) {
$('#tabs ul.mode-connected li.tab_failsafe').show(); $('#tabs ul.mode-connected li.tab_failsafe').show();
} else { } else {
$('#tabs ul.mode-connected li.tab_failsafe').hide(); $('#tabs ul.mode-connected li.tab_failsafe').hide();
} }
if (isExpertModeEnabled()) {
$('#tabs ul.mode-connected li.tab_adjustments').show();
} else {
$('#tabs ul.mode-connected li.tab_adjustments').hide();
}
if (isExpertModeEnabled()) {
$('#tabs ul.mode-connected li.tab_servos').show();
} else {
$('#tabs ul.mode-connected li.tab_servos').hide();
}
if (features.isEnabled('LED_STRIP')) { if (features.isEnabled('LED_STRIP')) {
$('#tabs ul.mode-connected li.tab_led_strip').show(); $('#tabs ul.mode-connected li.tab_led_strip').show();
} else { } else {
$('#tabs ul.mode-connected li.tab_led_strip').hide(); $('#tabs ul.mode-connected li.tab_led_strip').hide();
} }
if (isExpertModeEnabled()) {
$('#tabs ul.mode-connected li.tab_sensors').show();
} else {
$('#tabs ul.mode-connected li.tab_sensors').hide();
}
if (isExpertModeEnabled()) {
$('#tabs ul.mode-connected li.tab_logging').show();
} else {
$('#tabs ul.mode-connected li.tab_logging').hide();
}
if (features.isEnabled('BLACKBOX')) { if (features.isEnabled('BLACKBOX')) {
$('#tabs ul.mode-connected li.tab_onboard_logging').show(); $('#tabs ul.mode-connected li.tab_onboard_logging').show();
} else { } else {

View File

@ -252,6 +252,37 @@
height: 90px; height: 90px;
} }
.tab-failsafe .featuresNew {
width: 100%;
}
.tab-failsafe .featuresNew tr {
width: 100%;
border-bottom: 1px solid #ddd;
float: left;
padding: 0px;
padding-bottom: 6px;
margin-bottom: 3px;
}
.tab-failsafe .featuresNew td:first-child {
width: 52px;
}
.tab-failsafe .featuresNew td:last-child {
width: calc(100% - 125px);
margin-right: 0px;
}
.tab-failsafe .featuresNew td {
float: left;
margin-right: 10px;
}
.tab-failsafe .featuresNew .helpicon {
margin-right: -2px;
}
.tab-failsafe table { .tab-failsafe table {
width: 100%; width: 100%;
} }

View File

@ -22,6 +22,11 @@
<div class="spacer_box_title" i18n="failsafePaneTitleOld"></div> <div class="spacer_box_title" i18n="failsafePaneTitleOld"></div>
</div> </div>
<div class="spacer_box"> <div class="spacer_box">
<table>
<tbody class="featuresOld rxFailsafe">
<!-- table generated here -->
</tbody>
</table>
<div class="number"> <div class="number">
<label> <input type="number" name="failsafe_throttle_old" min="0" max="2000" /> <span <label> <input type="number" name="failsafe_throttle_old" min="0" max="2000" /> <span
i18n="failsafeThrottleItemOld"></span> i18n="failsafeThrottleItemOld"></span>
@ -65,6 +70,11 @@
<div class="spacer_box_title" i18n="failsafeStageTwoSettingsTitle"></div> <div class="spacer_box_title" i18n="failsafeStageTwoSettingsTitle"></div>
</div> </div>
<div class="spacer_box"> <div class="spacer_box">
<table>
<tbody class="featuresNew rxFailsafe">
<!-- table generated here -->
</tbody>
</table>
<div class="checkbox stage2"> <div class="checkbox stage2">
<div class="numberspacer" > <div class="numberspacer" >
<input type="checkbox" name="failsafe_kill_switch" class="toggle" id="failsafe_kill_switch" /> <input type="checkbox" name="failsafe_kill_switch" class="toggle" id="failsafe_kill_switch" />

View File

@ -63,6 +63,15 @@ TABS.failsafe.initialize = function (callback, scrollPosition) {
} }
function process_html() { function process_html() {
// fill stage 2 fields
function toggleStage2(doShow) {
if (doShow) {
$('div.stage2').show();
} else {
$('div.stage2').hide();
}
}
// Conditionally hide the old or the new control pane's // Conditionally hide the old or the new control pane's
if(apiVersionGte1_15_0) { if(apiVersionGte1_15_0) {
var oldPane = $('div.oldpane'); var oldPane = $('div.oldpane');
@ -199,6 +208,14 @@ TABS.failsafe.initialize = function (callback, scrollPosition) {
channel_mode_array[i].change(); channel_mode_array[i].change();
} }
BF_CONFIG.features.generateElements($('.tab-failsafe .featuresNew'));
var failsafeFeature = $('input[name="FAILSAFE"]');
failsafeFeature.change(function () {
toggleStage2($(this).is(':checked'));
});
toggleStage2(BF_CONFIG.features.isEnabled('FAILSAFE'));
$('input[name="failsafe_throttle"]').val(FAILSAFE_CONFIG.failsafe_throttle); $('input[name="failsafe_throttle"]').val(FAILSAFE_CONFIG.failsafe_throttle);
$('input[name="failsafe_off_delay"]').val(FAILSAFE_CONFIG.failsafe_off_delay); $('input[name="failsafe_off_delay"]').val(FAILSAFE_CONFIG.failsafe_off_delay);
$('input[name="failsafe_throttle_low_delay"]').val(FAILSAFE_CONFIG.failsafe_throttle_low_delay); $('input[name="failsafe_throttle_low_delay"]').val(FAILSAFE_CONFIG.failsafe_throttle_low_delay);
@ -244,6 +261,7 @@ TABS.failsafe.initialize = function (callback, scrollPosition) {
$('input[name="failsafe_kill_switch"]').prop('checked', FAILSAFE_CONFIG.failsafe_kill_switch); $('input[name="failsafe_kill_switch"]').prop('checked', FAILSAFE_CONFIG.failsafe_kill_switch);
} else { } else {
BF_CONFIG.features.generateElements($('.tab-failsafe .featuresOld'));
// fill failsafe_throttle field (pre API 1.15.0) // fill failsafe_throttle field (pre API 1.15.0)
$('input[name="failsafe_throttle_old"]').val(MISC.failsafe_throttle); $('input[name="failsafe_throttle_old"]').val(MISC.failsafe_throttle);
} }
@ -251,6 +269,8 @@ TABS.failsafe.initialize = function (callback, scrollPosition) {
$('a.save').click(function () { $('a.save').click(function () {
// gather data that doesn't have automatic change event bound // gather data that doesn't have automatic change event bound
BF_CONFIG.features.updateData($('input[name="FAILSAFE"]'));
if(apiVersionGte1_15_0) { if(apiVersionGte1_15_0) {
RX_CONFIG.rx_min_usec = parseInt($('input[name="rx_min_usec"]').val()); RX_CONFIG.rx_min_usec = parseInt($('input[name="rx_min_usec"]').val());
RX_CONFIG.rx_max_usec = parseInt($('input[name="rx_max_usec"]').val()); RX_CONFIG.rx_max_usec = parseInt($('input[name="rx_max_usec"]').val());

View File

@ -1,6 +1,6 @@
<div class="notifications"> <div class="notifications">
<label><input type="checkbox" /><span i18n="options_receive_app_notifications"></span></label> <label><input type="checkbox" /><span i18n="options_receive_app_notifications"></span></label>
</div> </div>
<div class="statistics"> <div class="permanentExpertMode">
<label><input type="checkbox" /><span i18n="options_improve_configurator"></span></label> <label><input type="checkbox" /><span i18n="permanentExpertMode"></span></label>
</div> </div>