Merge pull request #225 from mikeller/fix_connection_active_indicator
Fixed 'connection active' indicator.10.3.x-maintenance
commit
abaf226818
3
js/fc.js
3
js/fc.js
|
@ -170,7 +170,8 @@ var FC = {
|
|||
voltage: 0,
|
||||
mAhdrawn: 0,
|
||||
rssi: 0,
|
||||
amperage: 0
|
||||
amperage: 0,
|
||||
last_received_timestamp: Date.now()
|
||||
};
|
||||
|
||||
ARMING_CONFIG = {
|
||||
|
|
|
@ -115,7 +115,7 @@ MspHelper.prototype.process_data = function(dataHandler) {
|
|||
ANALOG.mAhdrawn = data.getUint16(1, 1);
|
||||
ANALOG.rssi = data.getUint16(3, 1); // 0-1023
|
||||
ANALOG.amperage = data.getInt16(5, 1) / 100; // A
|
||||
// this.analog_last_received_timestamp = Date.now(); //TODO, fix this
|
||||
ANALOG.last_received_timestamp = Date.now();
|
||||
break;
|
||||
case MSPCodes.MSP_RC_TUNING:
|
||||
var offset = 0;
|
||||
|
|
|
@ -475,7 +475,7 @@ function update_live_status() {
|
|||
MSP.send_message(MSPCodes.MSP_ANALOG, false, false);
|
||||
}
|
||||
|
||||
var active = ((Date.now() - MSP.analog_last_received_timestamp) < 300);
|
||||
var active = ((Date.now() - ANALOG.last_received_timestamp) < 300);
|
||||
|
||||
for (var i = 0; i < AUX_CONFIG.length; i++) {
|
||||
if (AUX_CONFIG[i] == 'ARM') {
|
||||
|
|
Loading…
Reference in New Issue