  def dmonitoringd_thread(sm=None, pm=None):
    gc.disable()
    set_realtime_priority(2)
  
    params = Params()
  
    if pm is None:
      pm = messaging.PubMaster(['driverMonitoringState'])
  
    if sm is None:
      sm = messaging.SubMaster(['driverStateV2', 'liveCalibration', 'carState', 'controlsState', 'modelV2'], poll=['driverStateV2'])
 
</s> remove   driver_status = DriverStatus(rhd_saved=params.get_bool("IsRhdDetected"))
 </s> add   driver_status = DriverStatus(rhd_saved=Params().get_bool("IsRhdDetected")) </s> remove         self.params.put_nonblocking("CarBatteryCapacity", str(int(self.car_battery_capacity_uWh)))
 </s> add         put_nonblocking("CarBatteryCapacity", str(int(self.car_battery_capacity_uWh))) </s> remove     Use the put_nonblocking, put_bool_nonblocking in time sensitive code, but
 </s> add     Use the put_nonblocking helper function in time sensitive code, but </s> remove       params.put_bool_nonblocking("IsRhdDetected", driver_status.wheel_on_right)
 </s> add       put_bool_nonblocking("IsRhdDetected", driver_status.wheel_on_right) </s> remove from openpilot.common.params import Params, ParamKeyType, UnknownKeyName
 </s> add from openpilot.common.params import Params, ParamKeyType, UnknownKeyName, put_nonblocking, put_bool_nonblocking
  def dmonitoringd_thread(sm=None, pm=None):
    gc.disable()
    set_realtime_priority(2)
  


    if pm is None:
      pm = messaging.PubMaster(['driverMonitoringState'])
  
    if sm is None:
      sm = messaging.SubMaster(['driverStateV2', 'liveCalibration', 'carState', 'controlsState', 'modelV2'], poll=['driverStateV2'])
keep keep keep keep replace replace keep keep keep keep keep
 Revert "params: safe and efficient async writing parameters (#25912)"

This reverts commit 0d797f4e8b2552192669d0329c14849f0a970066. 
selfdrive/monitoring/dmonitoringd.py