  
      ret.standstill = ret.vEgoRaw < 0.001
  
      # Some newer models have a more accurate angle measurement in the TORQUE_SENSOR message. Use if non-zero
      if abs(cp.vl["STEER_TORQUE_SENSOR"]["STEER_ANGLE"]) > 1e-3:
        self.accurate_steer_angle_seen = True
  
      if self.accurate_steer_angle_seen:
        ret.steeringAngleDeg = cp.vl["STEER_TORQUE_SENSOR"]["STEER_ANGLE"] - self.angle_offset
        ret.steeringAngleOffsetDeg = self.angle_offset
 
</s> remove     self.angle_offset = 0.
 </s> add     self.angle_offset = FirstOrderFilter(None, 60.0, DT_CTRL, initialized=False) </s> remove     self.x = (1. - self.alpha) * self.x + self.alpha * x
 </s> add     if self.initialized:
      self.x = (1. - self.alpha) * self.x + self.alpha * x
    else:
      self.initialized = True
      self.x = x </s> remove   def __init__(self, x0, rc, dt):
 </s> add   def __init__(self, x0, rc, dt, initialized=True):
    if abs(torque_sensor_angle_deg) > 1e-3:
  
      ret.standstill = ret.vEgoRaw < 0.001
  
      # Some newer models have a more accurate angle measurement in the TORQUE_SENSOR message. Use if non-zero
    if abs(torque_sensor_angle_deg) > 1e-3:
        self.accurate_steer_angle_seen = True
  
      if self.accurate_steer_angle_seen:
        ret.steeringAngleDeg = cp.vl["STEER_TORQUE_SENSOR"]["STEER_ANGLE"] - self.angle_offset
        ret.steeringAngleOffsetDeg = self.angle_offset
keep keep keep keep replace keep keep keep keep keep
 Continuously update offset between TSS2 angle sensors (#21943)

* Continuously update offset between TSS2 angle sensors

* add comment

* less lines

* only when initialized

* init to None

* update ref 
selfdrive/car/toyota/carstate.py