Cleanup looptime configuration.
parent
be93f37416
commit
fb46711659
|
@ -503,9 +503,18 @@
|
|||
"configurationBatteryMultiwiiCurrent": {
|
||||
"message": "Enable support for legacy Multiwii MSP current output"
|
||||
},
|
||||
"configurationLoopTimeHead": {
|
||||
"configurationSystem": {
|
||||
"message": "System configuration"
|
||||
},
|
||||
"configurationLoopTime": {
|
||||
"message": "Flight Controller Loop Time"
|
||||
},
|
||||
"configurationCalculatedCyclesSec": {
|
||||
"message": "Cycles/Sec (Hz)"
|
||||
},
|
||||
"configurationLoopTimeHelp": {
|
||||
"message": "<strong>Note:</strong> Changing this may require PID re-tuning."
|
||||
},
|
||||
"configurationGPS": {
|
||||
"message": "GPS"
|
||||
},
|
||||
|
@ -519,7 +528,7 @@
|
|||
"message": "Ground Assistance Type"
|
||||
},
|
||||
"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": {
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
</p>
|
||||
<span>2015.05.23 - 0.65.0 - cleanflight</span>
|
||||
<p>
|
||||
- Configuration tab supports setting FC loop time - Requires 1.8.0 firmware.<br />
|
||||
- Support flashing of the SPRacingF3.<br />
|
||||
- Support manual baud rate configuration for flashing.<br />
|
||||
</p>
|
||||
|
|
|
@ -99,6 +99,13 @@
|
|||
|
||||
border: 1px solid silver;
|
||||
}
|
||||
|
||||
.tab-configuration .number input.disabled {
|
||||
width: 50px;
|
||||
padding: 0px 5px;
|
||||
background-color: #ececec;
|
||||
}
|
||||
|
||||
.tab-configuration .number span {
|
||||
margin-left: 10px;
|
||||
line-height: 20px;
|
||||
|
@ -154,27 +161,6 @@
|
|||
.tab-configuration .disarm .checkbox span {
|
||||
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 {
|
||||
display: block;
|
||||
float: right;
|
||||
|
|
|
@ -131,19 +131,6 @@
|
|||
<p i18n="configurationSerialRXHelp"></p>
|
||||
</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>
|
||||
<table>
|
||||
<thead>
|
||||
|
@ -163,8 +150,6 @@
|
|||
<span i18n="configurationThrottleFailsafe"></span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="rightWrapper current voltage">
|
||||
<div class="groupTitle" i18n="configurationBatteryVoltage"></div>
|
||||
|
@ -238,14 +223,41 @@
|
|||
<span i18n="configurationBatteryMultiwiiCurrent"></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="cycles" style="display: none;">
|
||||
<div class="block looptime">
|
||||
<span class="head" i18n="configurationLoopTimeHead"></span>
|
||||
</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 class="looptimehz"></span>
|
||||
<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="leftWrapper gps">
|
||||
<div class="groupTitle" i18n="configurationGPS"></div>
|
||||
|
@ -307,6 +319,7 @@
|
|||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="clear-both"></div>
|
||||
<div class="buttons">
|
||||
<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);
|
||||
|
||||
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() {
|
||||
// translate to user-selected language
|
||||
localize();
|
||||
|
@ -278,10 +289,8 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
|
|||
|
||||
// fill FC loop time
|
||||
$('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');
|
||||
else
|
||||
$('span.looptimehz').text('Maximum Cycles per Sec');
|
||||
|
||||
recalculate_cycles_sec();
|
||||
|
||||
$('div.cycles').show();
|
||||
}
|
||||
|
@ -307,11 +316,7 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
|
|||
|
||||
// UI hooks
|
||||
$('input[name="looptime"]').change(function() {
|
||||
FC_CONFIG.loopTime = parseInt($('input[name="looptime"]').val());
|
||||
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');
|
||||
recalculate_cycles_sec();
|
||||
});
|
||||
|
||||
$('input[type="checkbox"].feature', features_e).change(function () {
|
||||
|
|
Loading…
Reference in New Issue