    err = set_core_affinity(Hardware::TICI() ? 4 : 3);
    LOG("set affinity returns %d", err);
  
    LOGW("attempting to connect");
    PubMaster pm({"pandaState"});
  
    while (!do_exit) {
      Panda *panda = usb_connect();
  
      // Send empty pandaState and try again
 
</s> remove     // Send empty pandaState and try again
    if (panda == nullptr) {
 </s> add     // Send empty pandaState & peripheralState and try again
    if (panda == nullptr || peripheral_panda == nullptr) { </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(); </s> remove     if (spoofing_started) {
      pandaState.ignition_line = 1;
    }
 </s> add   // Make sure CAN buses are live: safety_setter_thread does not work if Panda CAN are silent and there is only one other CAN node
  if (pandaState.safety_model == (uint8_t)(cereal::CarParams::SafetyModel::SILENT)) {
    panda->set_safety_model(cereal::CarParams::SafetyModel::NO_OUTPUT);
  }
  PubMaster pm({"pandaState", "peripheralState"});
    err = set_core_affinity(Hardware::TICI() ? 4 : 3);
    LOG("set affinity returns %d", err);
  
    LOGW("attempting to connect");
  PubMaster pm({"pandaState", "peripheralState"});
  
    while (!do_exit) {
      Panda *panda = usb_connect();
  
      // Send empty pandaState and try again
keep keep keep keep replace keep 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/boardd.cc