mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-07-23 23:02:04 +08:00
not really
This commit is contained in:
+1
-1
Submodule panda updated: dcd226d85f...4f40ae6767
@@ -137,8 +137,8 @@ void Panda::enable_deepsleep() {
|
||||
handle->control_write(0xfb, 0, 0);
|
||||
}
|
||||
|
||||
void Panda::send_heartbeat(bool engaged, bool mads_engaged) {
|
||||
handle->control_write(0xf3, engaged, mads_engaged);
|
||||
void Panda::send_heartbeat(bool engaged) {
|
||||
handle->control_write(0xf3, engaged, 0);
|
||||
}
|
||||
|
||||
void Panda::set_can_speed_kbps(uint16_t bus, uint16_t speed) {
|
||||
|
||||
@@ -75,7 +75,7 @@ public:
|
||||
std::optional<std::string> get_serial();
|
||||
void set_power_saving(bool power_saving);
|
||||
void enable_deepsleep();
|
||||
void send_heartbeat(bool engaged, bool mads_engaged);
|
||||
void send_heartbeat(bool engaged);
|
||||
void set_can_speed_kbps(uint16_t bus, uint16_t speed);
|
||||
void set_data_speed_kbps(uint16_t bus, uint16_t speed);
|
||||
void set_canfd_non_iso(uint16_t bus, bool non_iso);
|
||||
|
||||
@@ -313,7 +313,7 @@ void send_peripheral_state(Panda *panda, PubMaster *pm) {
|
||||
}
|
||||
|
||||
void process_panda_state(std::vector<Panda *> &pandas, PubMaster *pm, bool spoofing_started) {
|
||||
static SubMaster sm({"selfdriveState", "selfdriveStateSP"});
|
||||
static SubMaster sm({"selfdriveState"});
|
||||
|
||||
std::vector<std::string> connected_serials;
|
||||
for (Panda *p : pandas) {
|
||||
@@ -352,9 +352,8 @@ void process_panda_state(std::vector<Panda *> &pandas, PubMaster *pm, bool spoof
|
||||
|
||||
sm.update(0);
|
||||
const bool engaged = sm.allAliveAndValid({"selfdriveState"}) && sm["selfdriveState"].getSelfdriveState().getEnabled();
|
||||
const bool mads_engaged = sm.allAliveAndValid({"selfdriveStateSP"}) && sm["selfdriveStateSP"].getSelfdriveStateSP().getMads().getEnabled();
|
||||
for (const auto &panda : pandas) {
|
||||
panda->send_heartbeat(engaged, mads_engaged);
|
||||
panda->send_heartbeat(engaged);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ void PandaStream::streamThread() {
|
||||
|
||||
handleEvent(capnp::messageToFlatArray(msg));
|
||||
|
||||
panda->send_heartbeat(false, false);
|
||||
panda->send_heartbeat(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user