  
      capnp::FlatArrayMessageReader cmsg(aligned_buf.align(msg.get()));
      cereal::Event::Reader event = cmsg.getRoot<cereal::Event>();
  
      //Dont send if older than 1 second
      if ((nanos_since_boot() - event.getLogMonoTime() < 1e9) && !fake_send) {
        for (const auto& panda : pandas) {
          LOGT("sending sendcan to panda: %s", (panda->hw_serial()).c_str());
          panda->can_send(event.getSendcan());
          LOGT("sendcan sent to panda: %s", (panda->hw_serial()).c_str());
 
</s> remove       // send empty pandaState & peripheralState and try again
      send_empty_panda_state(&pm);
      send_empty_peripheral_state(&pm);
      util::sleep_for(500);
 </s> add       util::sleep_for(100); </s> remove     // Disable ir_pwr on front frame timeout
    uint64_t cur_t = nanos_since_boot();
    if (cur_t - last_front_frame_t > 1e9) {
 </s> add     // Disable IR on input timeout
    if (nanos_since_boot() - last_driver_camera_t > 1e9) { </s> remove   // we have exited, clean up pandas
 </s> add  </s> remove     if (ir_pwr != prev_ir_pwr || cnt % 100 == 0 || ir_pwr >= 50.0) {
 </s> add     if (ir_pwr != prev_ir_pwr || sm.frame % 100 == 0 || ir_pwr >= 50.0) {
    // Don't send if older than 1 second
  
      capnp::FlatArrayMessageReader cmsg(aligned_buf.align(msg.get()));
      cereal::Event::Reader event = cmsg.getRoot<cereal::Event>();
  
    // Don't send if older than 1 second
      if ((nanos_since_boot() - event.getLogMonoTime() < 1e9) && !fake_send) {
        for (const auto& panda : pandas) {
          LOGT("sending sendcan to panda: %s", (panda->hw_serial()).c_str());
          panda->can_send(event.getSendcan());
          LOGT("sendcan sent to panda: %s", (panda->hw_serial()).c_str());
keep keep keep keep replace keep keep keep keep keep
 boardd: misc cleanup (#28969)

* boardd cleanup

* no more front frame

* faster connect loop

* fix that on mac 
selfdrive/boardd/boardd.cc