Commit b3a8850
committed
refactor(firmware): harden daemon concurrency and runtime safety
- fix micro-ROS entity lifecycle ordering and add init/fini error handling
- guard power-control state transitions with a recursive mutex
- replace long telemetry critical sections with mutex-based locking
- gate voltmeter sampling by timer events and cap pending ISR samples
- synchronize battery voltage/status reads and writes
- migrate LED override globals to thread-safe state API and reset animations on mode change
- validate ESP-NOW emergency payloads and add per-source receive throttling
- improve settings persistence safety (rollback/unlocked save path) and lock usage
- clean up web/settings handlers and apply sensor re-init on settings updates
- make Wi-Fi provisioning restart logic overflow-safe and improve portal fallback behavior1 parent 24225ed commit b3a8850
12 files changed
Lines changed: 521 additions & 163 deletions
File tree
- esp_firmware/lib
- app_settings
- comm
- led_control
- ros_node
- sensors
- telemetry_log
- web_server
- wifi_config
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
604 | 604 | | |
605 | 605 | | |
606 | 606 | | |
607 | | - | |
608 | | - | |
609 | 607 | | |
610 | 608 | | |
611 | 609 | | |
| |||
686 | 684 | | |
687 | 685 | | |
688 | 686 | | |
689 | | - | |
| 687 | + | |
690 | 688 | | |
691 | 689 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
27 | | - | |
| 25 | + | |
28 | 26 | | |
29 | 27 | | |
30 | 28 | | |
| |||
42 | 40 | | |
43 | 41 | | |
44 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
45 | 48 | | |
46 | 49 | | |
| 50 | + | |
47 | 51 | | |
48 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
49 | 59 | | |
50 | 60 | | |
51 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
366 | 366 | | |
367 | 367 | | |
368 | 368 | | |
| 369 | + | |
369 | 370 | | |
370 | 371 | | |
371 | 372 | | |
| |||
445 | 446 | | |
446 | 447 | | |
447 | 448 | | |
448 | | - | |
449 | | - | |
| 449 | + | |
| 450 | + | |
450 | 451 | | |
451 | 452 | | |
452 | 453 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
65 | 117 | | |
66 | 118 | | |
67 | 119 | | |
| |||
92 | 144 | | |
93 | 145 | | |
94 | 146 | | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
95 | 152 | | |
96 | 153 | | |
97 | 154 | | |
| |||
100 | 157 | | |
101 | 158 | | |
102 | 159 | | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
103 | 165 | | |
104 | 166 | | |
105 | 167 | | |
| |||
115 | 177 | | |
116 | 178 | | |
117 | 179 | | |
118 | | - | |
119 | 180 | | |
120 | 181 | | |
121 | 182 | | |
| |||
439 | 500 | | |
440 | 501 | | |
441 | 502 | | |
442 | | - | |
443 | | - | |
444 | | - | |
| 503 | + | |
445 | 504 | | |
446 | 505 | | |
447 | 506 | | |
| |||
530 | 589 | | |
531 | 590 | | |
532 | 591 | | |
533 | | - | |
| 592 | + | |
534 | 593 | | |
535 | 594 | | |
536 | 595 | | |
| |||
0 commit comments