Commit 112d5e4
committed
fix(crow_alarm_panel): address Copilot review comments on PR #10
- Refresh arm_disarm_state_enter_ms_ before keypress() in the retry
block, not after: keypress()->send_packet() can yield and re-enter
loop(), so the watchdog could otherwise fire again on the stale
timestamp and send extra keypresses (same fix already applied to the
output-select retry).
- Gate the ISR's bit-trace buffer swap on !bit_trace_ready_ so it can't
overwrite bit_trace_buffer2_ while loop() (other core) is still
copying it out.
- Mark bit_trace_enabled_ volatile, matching ack_pending_/
is_transmitting_.
- Reset bit_trace_len_/bit_trace_ready_ on every toggle so disabling
mid-buffer and re-enabling can't mix stale bits into a trace chunk.1 parent 3879100 commit 112d5e4
2 files changed
Lines changed: 27 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | | - | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
154 | 159 | | |
155 | 160 | | |
156 | 161 | | |
| |||
898 | 903 | | |
899 | 904 | | |
900 | 905 | | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
901 | 911 | | |
902 | 912 | | |
903 | 913 | | |
| |||
917 | 927 | | |
918 | 928 | | |
919 | 929 | | |
920 | | - | |
921 | 930 | | |
922 | 931 | | |
923 | 932 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | | - | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
176 | 178 | | |
177 | 179 | | |
178 | 180 | | |
| |||
264 | 266 | | |
265 | 267 | | |
266 | 268 | | |
267 | | - | |
268 | | - | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
269 | 282 | | |
270 | 283 | | |
271 | 284 | | |
| |||
0 commit comments