File tree Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -170,7 +170,8 @@ var FC = {
170170 voltage : 0 ,
171171 mAhdrawn : 0 ,
172172 rssi : 0 ,
173- amperage : 0
173+ amperage : 0 ,
174+ last_received_timestamp : Date . now ( )
174175 } ;
175176
176177 ARMING_CONFIG = {
Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ MspHelper.prototype.process_data = function(dataHandler) {
115115 ANALOG . mAhdrawn = data . getUint16 ( 1 , 1 ) ;
116116 ANALOG . rssi = data . getUint16 ( 3 , 1 ) ; // 0-1023
117117 ANALOG . amperage = data . getInt16 ( 5 , 1 ) / 100 ; // A
118- // this.analog_last_received_timestamp = Date.now(); //TODO, fix this
118+ ANALOG . last_received_timestamp = Date . now ( ) ;
119119 break ;
120120 case MSPCodes . MSP_RC_TUNING :
121121 var offset = 0 ;
Original file line number Diff line number Diff line change @@ -475,7 +475,7 @@ function update_live_status() {
475475 MSP . send_message ( MSPCodes . MSP_ANALOG , false , false ) ;
476476 }
477477
478- var active = ( ( Date . now ( ) - MSP . analog_last_received_timestamp ) < 300 ) ;
478+ var active = ( ( Date . now ( ) - ANALOG . last_received_timestamp ) < 300 ) ;
479479
480480 for ( var i = 0 ; i < AUX_CONFIG . length ; i ++ ) {
481481 if ( AUX_CONFIG [ i ] == 'ARM' ) {
You can’t perform that action at this time.
0 commit comments