  from cereal import car
  from common.numpy_fast import mean
  from opendbc.can.can_define import CANDefine
  from selfdrive.car.interfaces import CarStateBase
  from opendbc.can.parser import CANParser
  from selfdrive.config import Conversions as CV
  from selfdrive.car.toyota.values import CAR, DBC, STEER_THRESHOLD, NO_STOP_TIMER_CAR, TSS2_CAR
  
 
</s> remove     self.angle_offset = 0.
 </s> add     self.angle_offset = FirstOrderFilter(None, 60.0, DT_CTRL, initialized=False) </s> remove     if abs(cp.vl["STEER_TORQUE_SENSOR"]["STEER_ANGLE"]) > 1e-3:
 </s> add     if abs(torque_sensor_angle_deg) > 1e-3: </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
from common.filter_simple import FirstOrderFilter
from common.realtime import DT_CTRL
  from cereal import car
  from common.numpy_fast import mean
from common.filter_simple import FirstOrderFilter
from common.realtime import DT_CTRL
  from opendbc.can.can_define import CANDefine
  from selfdrive.car.interfaces import CarStateBase
  from opendbc.can.parser import CANParser
  from selfdrive.config import Conversions as CV
  from selfdrive.car.toyota.values import CAR, DBC, STEER_THRESHOLD, NO_STOP_TIMER_CAR, TSS2_CAR
  
keep add keep 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