        # Cap the car battery power and save it in a param every 10-ish seconds
        self.car_battery_capacity_uWh = max(self.car_battery_capacity_uWh, 0)
        self.car_battery_capacity_uWh = min(self.car_battery_capacity_uWh, CAR_BATTERY_CAPACITY_uWh)
        if now - self.last_save_time >= 10:
          self.params.put_nonblocking("CarBatteryCapacity", str(int(self.car_battery_capacity_uWh)))
          self.last_save_time = now
  
        # First measurement, set integration time
        with self.integration_lock:
          if self.last_measurement_time is None:
 
</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   params = Params()

 </s> add  </s> remove   driver_status = DriverStatus(rhd_saved=params.get_bool("IsRhdDetected"))
 </s> add   driver_status = DriverStatus(rhd_saved=Params().get_bool("IsRhdDetected")) </s> remove from openpilot.common.params import Params
 </s> add from openpilot.common.params import Params, put_nonblocking
        put_nonblocking("CarBatteryCapacity", str(int(self.car_battery_capacity_uWh)))
        # Cap the car battery power and save it in a param every 10-ish seconds
        self.car_battery_capacity_uWh = max(self.car_battery_capacity_uWh, 0)
        self.car_battery_capacity_uWh = min(self.car_battery_capacity_uWh, CAR_BATTERY_CAPACITY_uWh)
        if now - self.last_save_time >= 10:
        put_nonblocking("CarBatteryCapacity", str(int(self.car_battery_capacity_uWh)))
          self.last_save_time = now
  
        # First measurement, set integration time
        with self.integration_lock:
          if self.last_measurement_time is None:
keep keep keep keep replace keep keep keep keep keep
 Revert "params: safe and efficient async writing parameters (#25912)"

This reverts commit 0d797f4e8b2552192669d0329c14849f0a970066. 
selfdrive/thermald/power_monitoring.py