add i2c error counter in status bar

10.3.x-maintenance
cTn 2014-06-16 14:13:30 +02:00
parent 22cc8f0b96
commit f70b6f64ff
4 changed files with 9 additions and 2 deletions

View File

@ -108,6 +108,9 @@
"statusbar_packet_error": {
"message": "Packet error:"
},
"statusbar_i2c_error": {
"message": "I2C error:"
},
"statusbar_cycle_time": {
"message": "Cycle Time:"
},

View File

@ -173,6 +173,7 @@ MSP.process_data = function(code, message_buffer, message_length) {
CONFIG.profile = data.getUint8(10);
sensor_status(CONFIG.activeSensors);
$('span.i2c-error').text(CONFIG.i2cError);
$('span.cycle-time').text(CONFIG.cycleTime);
break;
case MSP_codes.MSP_RAW_IMU:

View File

@ -32,8 +32,8 @@ $(document).ready(function() {
GUI.connected_to = false;
// Reset various UI elements
$('.software-version').html('0.0');
$('span.cycle-time').html('0');
$('span.i2c-error').text(0);
$('span.cycle-time').text(0);
MSP.disconnect_cleanup();
PortUsage.reset();

View File

@ -123,6 +123,9 @@
<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>