  
    if sm is None:
      sm = messaging.SubMaster(['driverStateV2', 'liveCalibration', 'carState', 'controlsState', 'modelV2'], poll=['driverStateV2'])
  
    driver_status = DriverStatus(rhd_saved=params.get_bool("IsRhdDetected"))
  
    sm['liveCalibration'].calStatus = log.LiveCalibrationData.Status.invalid
    sm['liveCalibration'].rpyCalib = [0, 0, 0]
    sm['carState'].buttonEvents = []
    sm['carState'].standstill = True
 
</s> remove   params = Params()

 </s> add  </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   def put_nonblocking(self, key, dat):
    cdef string k = self.check_key(key)
    cdef string dat_bytes = ensure_bytes(dat)
    with nogil:
      self.p.putNonBlocking(k, dat_bytes)

  def put_bool_nonblocking(self, key, bool val):
    cdef string k = self.check_key(key)
    with nogil:
      self.p.putBoolNonBlocking(k, val)

 </s> add  </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
  driver_status = DriverStatus(rhd_saved=Params().get_bool("IsRhdDetected"))
  
    if sm is None:
      sm = messaging.SubMaster(['driverStateV2', 'liveCalibration', 'carState', 'controlsState', 'modelV2'], poll=['driverStateV2'])
  
  driver_status = DriverStatus(rhd_saved=Params().get_bool("IsRhdDetected"))
  
    sm['liveCalibration'].calStatus = log.LiveCalibrationData.Status.invalid
    sm['liveCalibration'].rpyCalib = [0, 0, 0]
    sm['carState'].buttonEvents = []
    sm['carState'].standstill = True
keep keep keep keep replace keep keep keep keep keep
 Revert "params: safe and efficient async writing parameters (#25912)"

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