    void set_loopback(bool loopback);
    std::optional<std::vector<uint8_t>> get_firmware_version();
    std::optional<std::string> get_serial();
    void set_power_saving(bool power_saving);
    void set_usb_power_mode(cereal::PandaState::UsbPowerMode power_mode);
    void send_heartbeat();
    void can_send(capnp::List<cereal::CanData>::Reader can_data_list);
    int can_receive(kj::Array<capnp::word>& out_buf);
  };
 
</s> remove void Panda::set_usb_power_mode(cereal::PandaState::UsbPowerMode power_mode) {
 </s> add void Panda::set_usb_power_mode(cereal::PeripheralState::UsbPowerMode power_mode) { </s> remove void hardware_control_thread(Panda *panda) {
  LOGD("start hardware control thread");
 </s> add void peripheral_control_thread(Panda *panda) {
  LOGD("start peripheral control thread"); </s> remove void panda_state_thread(PubMaster *pm, Panda *panda, bool spoofing_started) {
  LOGD("start panda state thread");
  uint32_t no_ignition_cnt = 0;
  bool ignition_last = false;
  Params params = Params();
 </s> add bool send_panda_state(PubMaster *pm, Panda *panda, bool spoofing_started) {
  health_t pandaState = panda->get_state();
  void set_usb_power_mode(cereal::PeripheralState::UsbPowerMode power_mode);
    void set_loopback(bool loopback);
    std::optional<std::vector<uint8_t>> get_firmware_version();
    std::optional<std::string> get_serial();
    void set_power_saving(bool power_saving);
  void set_usb_power_mode(cereal::PeripheralState::UsbPowerMode power_mode);
    void send_heartbeat();
    void can_send(capnp::List<cereal::CanData>::Reader can_data_list);
    int can_receive(kj::Array<capnp::word>& out_buf);
  };
keep keep keep keep replace keep keep keep keep
 Split pandaState into peripheralState and pandaState (#22385)

* publish peripheralState from boardd

* refactor consumers

* rename thread

* peripheralState has panda type too

* add to process replay

* fix device build

* properly remove hardware unsupported alert

* latest peripheralState

* remove pandaState from thermal_monitor

* put that back

* add back harness check

* fix cloudlog

* needs pandaState

* Update selfdrive/thermald/tests/test_power_monitoring.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* dont conflate

* Update selfdrive/thermald/tests/test_power_monitoring.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* pigeon is peripheral

* cleanup

* less global

* comment

* move rtc to peripheral_control_thread

* better diff?

* whitespace

* get msg

* bump cereal

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> 
selfdrive/boardd/panda.h