Skip to content

Commit

Permalink
Rebased and changes as per comments
Browse files Browse the repository at this point in the history
  • Loading branch information
basdelfos committed Jul 30, 2017
1 parent 63af808 commit f95b6f1
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 161 deletions.
3 changes: 0 additions & 3 deletions _locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -2480,8 +2480,6 @@
"configurationMagHardware": {
"message": "Magnetometer (if supported)"
},
// ---------------------------------------------
// Remove this when we officialy retire BF 3.1.x
"configurationBatteryVoltage": {
"message": "Battery Voltage"
},
Expand Down Expand Up @@ -2518,7 +2516,6 @@
"configurationBatteryMultiwiiCurrent": {
"message": "Enable support for legacy Multiwii MSP current output"
},
// --------------------------------------------- END
"pidTuningProfile": {
"message": "Profile"
},
Expand Down
164 changes: 16 additions & 148 deletions tabs/configuration.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</select>
</div>
</div>
<div class="spacer_box">
<div class="spacer_box reverseMotor">
<div class="checkbox" style="border-top: 1px solid #ddd; padding-top: 5px;">
<div style="float: left; height: 20px; margin-right: 15px; margin-left: 3px;">
<input type="checkbox" id="reverseMotorSwitch" class="toggle" />
Expand Down Expand Up @@ -530,11 +530,10 @@
</tr>
<tr class="oldBatteryConfig">
<td style="width:calc(50%);vertical-align:top;">
<!-- ROW 4 - LEFT PANE - ONLY NEEDED FOR BATTERY/CURRENT PART FOR PRE BF3.2 -->
<!-- ROW 4 - LEFT PANE -->

<!-- -------------------------------------------------------- -->
<!-- Remove this part when we officialy retire BF 3.1.x -->
<div class="rightWrapper current voltage">
<!-- BATTERY CONFIG FOR PRE BF 3.2 -->
<div class="voltage">
<div class="gui_box grey">
<div class="gui_box_titlebar">
<div class="spacer_box_title" i18n="configurationBatteryVoltage"></div>
Expand Down Expand Up @@ -585,7 +584,15 @@
</div>
</div>
</div>
<div class="gui_box grey">
</div>

</td>
<td style="width:calc(50%);vertical-align:top;">
<!-- ROW 4 - RIGHT PANE -->

<!-- CURRENT CONFIG FOR PRE BF 3.2 -->
<div class="current">
<div class="gui_box grey">
<div class="gui_box_titlebar">
<div class="spacer_box_title" i18n="configurationCurrent"></div>
</div>
Expand Down Expand Up @@ -633,17 +640,17 @@
</div>
</div>
</div>

</div>
<!-- -------------------------------------------------------- -->

</td>
</tr>
<tr>
<tr class="beepers">
<td style="width:calc(100%)" colspan="2">
<!-- ROW 4 - FULL WIDTH PANE -->

<!-- BEEPER -->
<div class="leftWrapper beepers" style="width: calc(100% - 20px);">
<div class="beepers" style="width: calc(100%);">
<div class="gui_box grey" style="margin-top:10px;">
<div class="gui_box_titlebar">
<div class="spacer_box_title" i18n="configurationBeeper"></div>
Expand All @@ -668,150 +675,11 @@
</div>
</div>
</div>
<<<<<<< HEAD

</td>
</tr>
</table>

=======
</div>
</div>
<div class="clear-both"></div>
</div>


<!-- -------------------------------------------------------- -->
<!-- Remove this part when we officialy retire BF 3.1.x -->
<div class="rightWrapper current voltage oldBatteryConfig">
<div class="gui_box grey">
<div class="gui_box_titlebar">
<div class="spacer_box_title" i18n="configurationBatteryVoltage"></div>
</div>
<div class="spacer_box">
<table cellpadding="0" cellspacing="0">
<thead>
<tr>
<th i18n="configurationFeatureEnabled"></th>
<th i18n="configurationFeatureDescription"></th>
<th i18n="configurationFeatureName"></th>
</tr>
</thead>
<tbody class="features batteryVoltage">
<!-- table generated here -->
</tbody>
</table>
<div class="select batterymetertype vbatmonitoring">
<label>
<select class="batterymetertype"><!-- list generated here --></select>
<span i18n="configurationBatteryMeterType"></span>
</label>
</div>
<div class="number vbatmonitoring">
<label> <input type="number" name="mincellvoltage" step="0.1" min="1" max="5" /> <span
i18n="configurationBatteryMinimum"></span>
</label>
</div>
<div class="number vbatmonitoring">
<label> <input type="number" name="maxcellvoltage" step="0.1" min="1" max="5" /> <span
i18n="configurationBatteryMaximum"></span>
</label>
</div>
<div class="number vbatmonitoring">
<label> <input type="number" name="warningcellvoltage" step="0.1" min="1" max="5" /> <span
i18n="configurationBatteryWarning"></span>
</label>
</div>
<div class="number vbatmonitoring vbatCalibration">
<label> <input type="number" name="voltagescale" step="1" min="10" max="255" /> <span
i18n="configurationBatteryScale"></span>
</label>
</div>
<div class="number vbatmonitoring">
<label> <input type="text" name="batteryvoltage" readonly class="disabled" /> <span
i18n="configurationBatteryVoltage"></span>
</label>
</div>
</div>
</div>
<div class="gui_box grey">
<div class="gui_box_titlebar">
<div class="spacer_box_title" i18n="configurationCurrent"></div>
</div>
<div class="spacer_box">
<table cellpadding="0" cellspacing="0">
<thead>
<tr>
<th i18n="configurationFeatureEnabled"></th>
<th i18n="configurationFeatureDescription"></th>
<th i18n="configurationFeatureName"></th>
</tr>
</thead>
<tbody class="features batteryCurrent">
<!-- table generated here -->
</tbody>
</table>
<div class="select currentMonitoring">
<label>
<select class="currentmetertype"><!-- list generated here --></select>
<span i18n="configurationCurrentMeterType"></span>
</label>
</div>
<div class="number currentMonitoring currentCalibration">
<label> <input type="number" name="currentscale" step="1" min="-16000" max="16000" /> <span
i18n="configurationCurrentScale"></span>
</label>
</div>
<div class="number currentMonitoring currentCalibration">
<label> <input type="number" name="currentoffset" step="1" min="-1600" max="16000" /> <span
i18n="configurationCurrentOffset"></span>
</label>
</div>
<div class="number currentMonitoring currentOutput">
<label>
<input type="text" name="batterycurrent" readonly class="disabled" /> <span
i18n="configurationBatteryCurrent"></span>
</label>
</div>
<div class="checkbox currentMonitoring currentOutput">
<div class="numberspacer">
<input type="checkbox" name="multiwiicurrentoutput" class="toggle" />
</div>
<label> <span i18n="configurationBatteryMultiwiiCurrent"></span>
</label>
</div>
</div>
</div>
</div>
<!-- -------------------------------------------------------- -->

<div class="leftWrapper beepers" style="width: calc(100% - 20px);">
<div class="gui_box grey" style="margin-top:10px;">
<div class="gui_box_titlebar">
<div class="spacer_box_title" i18n="configurationBeeper"></div>
</div>
<div class="spacer_box">
<table cellpadding="0" cellspacing="0">
<tbody class="beeper-configuration" id="noline">
<tr class="beeper-template" style="display:none">
<td>
<input class="beeper toggle" id="" name="" title="" type="checkbox" />
</td>
<td>
<label for=""></label>
</td>
<td>
<span i18n=""></span>
</td>
</tr>
<!-- table generated here -->
</tbody>
</table>
</div>
</div>
</div>
<div class="clear-both"></div>
>>>>>>> Several fixes for compatibility with BF 3.1.x
<div class="content_toolbar">
<div class="btn save_btn">
<a class="save" href="#" i18n="configurationButtonSave"></a>
Expand Down
11 changes: 1 addition & 10 deletions tabs/configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,6 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
}
}

// -----------------------------------------------
// Remove this when we officily retire BF 3.1.x
function load_battery() {
var next_callback = load_current;
if (semver.gte(CONFIG.flightControllerVersion, "3.1.0")) {
Expand All @@ -178,8 +176,7 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
} else {
next_callback();
}
}
// -----------------------------------------------
}

function load_rx_config() {
var next_callback = load_html;
Expand Down Expand Up @@ -592,8 +589,6 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
$('input[name="maxthrottle"]').val(MOTOR_CONFIG.maxthrottle);
$('input[name="mincommand"]').val(MOTOR_CONFIG.mincommand);

// -----------------------------------------------
// Remove this when we officily retire BF 3.1.x
// fill battery
if (self.SHOW_OLD_BATTERY_CONFIG) {
if (semver.gte(CONFIG.flightControllerVersion, "3.1.0")) {
Expand Down Expand Up @@ -689,7 +684,6 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
$('.currentMonitoring').hide();
}
}
// ------------------------------------------------

//fill 3D
if (semver.lt(CONFIG.apiVersion, "1.14.0")) {
Expand Down Expand Up @@ -980,8 +974,6 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
MSP.send_message(MSPCodes.MSP_SET_NAME, mspHelper.crunch(MSPCodes.MSP_SET_NAME), false, next_callback);
}

// -----------------------------------------------
// Remove this when we officily retire BF 3.1.x
function save_battery() {
var next_callback = save_current;
if (semver.gte(CONFIG.flightControllerVersion, "3.1.0")) {
Expand All @@ -999,7 +991,6 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
next_callback();
}
}
// -----------------------------------------------

function save_rx_config() {
var next_callback = save_to_eeprom;
Expand Down

0 comments on commit f95b6f1

Please sign in to comment.