Cleanup looptime configuration.
parent
be93f37416
commit
fb46711659
|
@ -503,9 +503,18 @@
|
||||||
"configurationBatteryMultiwiiCurrent": {
|
"configurationBatteryMultiwiiCurrent": {
|
||||||
"message": "Enable support for legacy Multiwii MSP current output"
|
"message": "Enable support for legacy Multiwii MSP current output"
|
||||||
},
|
},
|
||||||
"configurationLoopTimeHead": {
|
"configurationSystem": {
|
||||||
|
"message": "System configuration"
|
||||||
|
},
|
||||||
|
"configurationLoopTime": {
|
||||||
"message": "Flight Controller Loop Time"
|
"message": "Flight Controller Loop Time"
|
||||||
},
|
},
|
||||||
|
"configurationCalculatedCyclesSec": {
|
||||||
|
"message": "Cycles/Sec (Hz)"
|
||||||
|
},
|
||||||
|
"configurationLoopTimeHelp": {
|
||||||
|
"message": "<strong>Note:</strong> Changing this may require PID re-tuning."
|
||||||
|
},
|
||||||
"configurationGPS": {
|
"configurationGPS": {
|
||||||
"message": "GPS"
|
"message": "GPS"
|
||||||
},
|
},
|
||||||
|
@ -519,7 +528,7 @@
|
||||||
"message": "Ground Assistance Type"
|
"message": "Ground Assistance Type"
|
||||||
},
|
},
|
||||||
"configurationGPSHelp": {
|
"configurationGPSHelp": {
|
||||||
"message": "<strong>Note:</strong> Rememer to configure a Serial Port (via Ports tab) when using GPS feature."
|
"message": "<strong>Note:</strong> Remember to configure a Serial Port (via Ports tab) when using GPS feature."
|
||||||
},
|
},
|
||||||
|
|
||||||
"configurationSerialRX": {
|
"configurationSerialRX": {
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
</p>
|
</p>
|
||||||
<span>2015.05.23 - 0.65.0 - cleanflight</span>
|
<span>2015.05.23 - 0.65.0 - cleanflight</span>
|
||||||
<p>
|
<p>
|
||||||
- Configuration tab supports setting FC loop time - Requires 1.8.0 firmware.<br />
|
|
||||||
- Support flashing of the SPRacingF3.<br />
|
- Support flashing of the SPRacingF3.<br />
|
||||||
- Support manual baud rate configuration for flashing.<br />
|
- Support manual baud rate configuration for flashing.<br />
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -99,6 +99,13 @@
|
||||||
|
|
||||||
border: 1px solid silver;
|
border: 1px solid silver;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tab-configuration .number input.disabled {
|
||||||
|
width: 50px;
|
||||||
|
padding: 0px 5px;
|
||||||
|
background-color: #ececec;
|
||||||
|
}
|
||||||
|
|
||||||
.tab-configuration .number span {
|
.tab-configuration .number span {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
|
@ -154,27 +161,6 @@
|
||||||
.tab-configuration .disarm .checkbox span {
|
.tab-configuration .disarm .checkbox span {
|
||||||
margin-left: 15px;
|
margin-left: 15px;
|
||||||
}
|
}
|
||||||
.tab-configuration .cycles {
|
|
||||||
border-bottom: 1px solid #dddddd;
|
|
||||||
margin-top: 16px;
|
|
||||||
}
|
|
||||||
.tab-configuration .block {
|
|
||||||
float: left;
|
|
||||||
display: block;
|
|
||||||
border: 1px solid silver;
|
|
||||||
}
|
|
||||||
.tab-configuration .block .head {
|
|
||||||
display: block;
|
|
||||||
text-align: center;
|
|
||||||
line-height: 20px;
|
|
||||||
font-weight: bold;
|
|
||||||
border-bottom: 1px solid silver;
|
|
||||||
background-color: #ececec;
|
|
||||||
}
|
|
||||||
.tab-configuration .block.looptime {
|
|
||||||
width: 200px;
|
|
||||||
margin-top: 11px;
|
|
||||||
}
|
|
||||||
.tab-configuration .save {
|
.tab-configuration .save {
|
||||||
display: block;
|
display: block;
|
||||||
float: right;
|
float: right;
|
||||||
|
|
|
@ -131,19 +131,6 @@
|
||||||
<p i18n="configurationSerialRXHelp"></p>
|
<p i18n="configurationSerialRXHelp"></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="groupTitle" i18n="configurationRSSI"></div>
|
|
||||||
<table>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th i18n="configurationFeatureEnabled"></th>
|
|
||||||
<th i18n="configurationFeatureName"></th>
|
|
||||||
<th i18n="configurationFeatureDescription"></th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody class="features rssi">
|
|
||||||
<!-- table generated here -->
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<div class="groupTitle" i18n="configurationFailsafe"></div>
|
<div class="groupTitle" i18n="configurationFailsafe"></div>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
|
@ -163,8 +150,6 @@
|
||||||
<span i18n="configurationThrottleFailsafe"></span>
|
<span i18n="configurationThrottleFailsafe"></span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="rightWrapper current voltage">
|
<div class="rightWrapper current voltage">
|
||||||
<div class="groupTitle" i18n="configurationBatteryVoltage"></div>
|
<div class="groupTitle" i18n="configurationBatteryVoltage"></div>
|
||||||
|
@ -205,7 +190,7 @@
|
||||||
<span i18n="configurationBatteryScale"></span>
|
<span i18n="configurationBatteryScale"></span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="groupTitle" i18n="configurationCurrent"></div>
|
<div class="groupTitle" i18n="configurationCurrent"></div>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -238,14 +223,41 @@
|
||||||
<span i18n="configurationBatteryMultiwiiCurrent"></span>
|
<span i18n="configurationBatteryMultiwiiCurrent"></span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="cycles" style="display: none;">
|
|
||||||
<div class="block looptime">
|
|
||||||
<span class="head" i18n="configurationLoopTimeHead"></span>
|
|
||||||
<input type="number" name="looptime" step="100" min="0" max="9000"/>
|
|
||||||
<span class="looptimehz"></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="clear-both"></div>
|
||||||
|
|
||||||
|
<div class="leftWrapper rssi">
|
||||||
|
<div class="groupTitle" i18n="configurationRSSI"></div>
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th i18n="configurationFeatureEnabled"></th>
|
||||||
|
<th i18n="configurationFeatureName"></th>
|
||||||
|
<th i18n="configurationFeatureDescription"></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody class="features rssi">
|
||||||
|
<!-- table generated here -->
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="rightWrapper system">
|
||||||
|
<div class="groupTitle" i18n="configurationSystem"></div>
|
||||||
|
<div class="number">
|
||||||
|
<label>
|
||||||
|
<input type="number" name="looptime" step="100" min="0" max="9000"/>
|
||||||
|
<span i18n="configurationLoopTime"></span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="number">
|
||||||
|
<label>
|
||||||
|
<input type="text" name="looptimehz" readonly="readonly" class="disabled"/>
|
||||||
|
<span i18n="configurationCalculatedCyclesSec"></span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<p class="help" i18n="configurationLoopTimeHelp"></p>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="clear-both"></div>
|
<div class="clear-both"></div>
|
||||||
<div class="leftWrapper gps">
|
<div class="leftWrapper gps">
|
||||||
<div class="groupTitle" i18n="configurationGPS"></div>
|
<div class="groupTitle" i18n="configurationGPS"></div>
|
||||||
|
@ -307,6 +319,7 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="clear-both"></div>
|
<div class="clear-both"></div>
|
||||||
<div class="buttons">
|
<div class="buttons">
|
||||||
<a class="save" href="#" i18n="configurationButtonSave"></a>
|
<a class="save" href="#" i18n="configurationButtonSave"></a>
|
||||||
|
|
|
@ -49,6 +49,17 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
|
||||||
|
|
||||||
MSP.send_message(MSP_codes.MSP_IDENT, false, false, load_config);
|
MSP.send_message(MSP_codes.MSP_IDENT, false, false, load_config);
|
||||||
|
|
||||||
|
function recalculate_cycles_sec() {
|
||||||
|
var looptime = $('input[name="looptime"]').val();
|
||||||
|
|
||||||
|
var message = 'Max';
|
||||||
|
if (looptime > 0) {
|
||||||
|
message = parseFloat((1 / looptime) * 1000 * 1000).toFixed(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
$('input[name="looptimehz"]').val(message);
|
||||||
|
}
|
||||||
|
|
||||||
function process_html() {
|
function process_html() {
|
||||||
// translate to user-selected language
|
// translate to user-selected language
|
||||||
localize();
|
localize();
|
||||||
|
@ -278,10 +289,8 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
|
||||||
|
|
||||||
// fill FC loop time
|
// fill FC loop time
|
||||||
$('input[name="looptime"]').val(FC_CONFIG.loopTime);
|
$('input[name="looptime"]').val(FC_CONFIG.loopTime);
|
||||||
if(FC_CONFIG.loopTime > 0)
|
|
||||||
$('span.looptimehz').text(parseFloat((1/FC_CONFIG.loopTime)*1000*1000).toFixed(0) + ' Cycles per Sec');
|
recalculate_cycles_sec();
|
||||||
else
|
|
||||||
$('span.looptimehz').text('Maximum Cycles per Sec');
|
|
||||||
|
|
||||||
$('div.cycles').show();
|
$('div.cycles').show();
|
||||||
}
|
}
|
||||||
|
@ -307,11 +316,7 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
|
||||||
|
|
||||||
// UI hooks
|
// UI hooks
|
||||||
$('input[name="looptime"]').change(function() {
|
$('input[name="looptime"]').change(function() {
|
||||||
FC_CONFIG.loopTime = parseInt($('input[name="looptime"]').val());
|
recalculate_cycles_sec();
|
||||||
if(FC_CONFIG.loopTime > 0)
|
|
||||||
$('span.looptimehz').text(parseFloat((1/FC_CONFIG.loopTime)*1000*1000).toFixed(0) + ' Cycles per Sec');
|
|
||||||
else
|
|
||||||
$('span.looptimehz').text('Maximum Cycles per Sec');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$('input[type="checkbox"].feature', features_e).change(function () {
|
$('input[type="checkbox"].feature', features_e).change(function () {
|
||||||
|
|
Loading…
Reference in New Issue