card: remove old canRcvtimeout field (#32650)

* card: remove old canRcvtimeout field

* deprecate
old-commit-hash: b42b156fcd
This commit is contained in:
Adeeb Shihadeh
2024-06-07 17:03:17 -07:00
committed by GitHub
parent 9f4b55e32f
commit 97bfed714c
2 changed files with 2 additions and 9 deletions

View File

@@ -156,7 +156,6 @@ struct CarState {
canValid @26 :Bool; # invalid counter/checksums
canTimeout @40 :Bool; # CAN bus dropped out
canErrorCounter @48 :UInt32;
canRcvTimeout @49 :Bool;
# car speed
vEgo @1 :Float32; # best estimate of speed
@@ -282,6 +281,7 @@ struct CarState {
brakeLightsDEPRECATED @19 :Bool;
steeringRateLimitedDEPRECATED @29 :Bool;
canMonoTimesDEPRECATED @12: List(UInt64);
canRcvTimeoutDEPRECATED @49 :Bool;
}
# ******* radar state @ 20hz *******

View File

@@ -29,8 +29,7 @@ class Car:
self.sm = messaging.SubMaster(['pandaStates', 'carControl', 'onroadEvents'])
self.pm = messaging.PubMaster(['sendcan', 'carState', 'carParams', 'carOutput'])
self.can_rcv_timeout_counter = 0 # consecutive timeout count
self.can_rcv_cum_timeout_counter = 0 # cumulative timeout count
self.can_rcv_cum_timeout_counter = 0
self.CC_prev = car.CarControl.new_message()
self.CS_prev = car.CarState.new_message()
@@ -96,12 +95,7 @@ class Car:
# Check for CAN timeout
if not can_rcv_valid:
self.can_rcv_timeout_counter += 1
self.can_rcv_cum_timeout_counter += 1
else:
self.can_rcv_timeout_counter = 0
self.can_rcv_timeout = self.can_rcv_timeout_counter >= 5
if can_rcv_valid and REPLAY:
self.can_log_mono_time = messaging.log_from_bytes(can_strs[0]).logMonoTime
@@ -141,7 +135,6 @@ class Car:
cs_send = messaging.new_message('carState')
cs_send.valid = CS.canValid
cs_send.carState = CS
cs_send.carState.canRcvTimeout = self.can_rcv_timeout
cs_send.carState.canErrorCounter = self.can_rcv_cum_timeout_counter
cs_send.carState.cumLagMs = -self.rk.remaining * 1000.
self.pm.send('carState', cs_send)