This commit is contained in:
firestar5683
2026-03-25 21:50:09 -05:00
parent d3b1cc8e69
commit 2fb8526d01
33 changed files with 12 additions and 10 deletions
+10 -8
View File
@@ -316,6 +316,9 @@ static void gm_rx_hook(const CANPacket_t *msg) {
uint32_t now_us = microsecond_timer_get();
gm_update_periodic_phase(&gm_bd_state, now_us, GM_PADDLE_PERIOD_US, GM_PADDLE_LOCK_TOLERANCE_US);
gm_bd_state.next_tx_us = now_us + GM_PADDLE_TX_OFFSET_US;
// Keep PRNDL2 locked to the same cadence as the paddle frame.
gm_update_periodic_phase(&gm_prndl2_state, now_us, GM_PADDLE_PERIOD_US, GM_PADDLE_LOCK_TOLERANCE_US);
gm_prndl2_state.next_tx_us = now_us + GM_PADDLE_TX_OFFSET_US;
gm_try_send_periodic_spoof(now_us, 0xBDU, 7U, &gm_bd_state, GM_PADDLE_PERIOD_US);
gm_try_send_periodic_spoof(now_us, 0x1F5U, 8U, &gm_prndl2_state, GM_PADDLE_PERIOD_US);
}
@@ -325,6 +328,9 @@ static void gm_rx_hook(const CANPacket_t *msg) {
uint32_t now_us = microsecond_timer_get();
gm_update_periodic_phase(&gm_prndl2_state, now_us, GM_PADDLE_PERIOD_US, GM_PADDLE_LOCK_TOLERANCE_US);
gm_prndl2_state.next_tx_us = now_us + GM_PADDLE_TX_OFFSET_US;
// Keep paddle cadence aligned if PRNDL2 is the only stable timing source.
gm_update_periodic_phase(&gm_bd_state, now_us, GM_PADDLE_PERIOD_US, GM_PADDLE_LOCK_TOLERANCE_US);
gm_bd_state.next_tx_us = now_us + GM_PADDLE_TX_OFFSET_US;
gm_try_send_periodic_spoof(now_us, 0x1F5U, 8U, &gm_prndl2_state, GM_PADDLE_PERIOD_US);
gm_try_send_periodic_spoof(now_us, 0xBDU, 7U, &gm_bd_state, GM_PADDLE_PERIOD_US);
}
@@ -468,10 +474,8 @@ static bool gm_tx_hook(const CANPacket_t *msg) {
gm_bd_state.next_tx_us = now_us + GM_PADDLE_TX_OFFSET_US;
}
}
bool scheduler_ready = gm_periodic_scheduler_ready(&gm_bd_state, now_us, GM_PADDLE_STALE_US, GM_PADDLE_FEED_STALE_US);
if (scheduler_ready) {
tx = false;
}
// Feed-only stream: always block controller TX and let panda periodic TX own wire output.
tx = false;
}
}
@@ -493,10 +497,8 @@ static bool gm_tx_hook(const CANPacket_t *msg) {
gm_prndl2_state.next_tx_us = now_us + GM_PADDLE_TX_OFFSET_US;
}
}
bool scheduler_ready = gm_periodic_scheduler_ready(&gm_prndl2_state, now_us, GM_PADDLE_STALE_US, GM_PADDLE_FEED_STALE_US);
if (scheduler_ready) {
tx = false;
}
// Feed-only stream: always block controller TX and let panda periodic TX own wire output.
tx = false;
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -1,2 +1,2 @@
extern const uint8_t gitversion[19];
const uint8_t gitversion[19] = "DEV-6a639c86-DEBUG";
const uint8_t gitversion[19] = "DEV-d3b1cc8e-DEBUG";
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -1 +1 @@
DEV-6a639c86-DEBUG
DEV-d3b1cc8e-DEBUG