mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2026-10-31 13:52:15 +01:00
Merge branch 'main' into feat/eth-framework-independent
Brings in the coredump bounds fix (#74). Utils.h, Utils.cpp and test_utils.cpp conflicted only because both sides added helpers in the same spot; kept otaProven/releaseAssetName and formatBacktrace. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
2c1085ee9b
4 changed files with 53 additions and 7 deletions
|
|
@ -153,6 +153,18 @@ bool otaProven(bool networkUp, unsigned long uptimeMs, unsigned long minUptimeMs
|
|||
void releaseAssetName(char *buf, size_t size, const char *kind, const char *chipModel) {
|
||||
snprintf(buf, size, "SomfyController.%s.esp32%s.bin", kind, chipModel);
|
||||
}
|
||||
void formatBacktrace(char *buf, size_t size, const uint32_t *bt, size_t maxFrames, uint32_t depth) {
|
||||
// depth comes from flash. A half-written dump reads back as 0xa5a5a5a5,
|
||||
// so never trust it past bt[] or the buffer.
|
||||
buf[0] = '\0';
|
||||
size_t pos = 0;
|
||||
size_t frames = depth < maxFrames ? depth : maxFrames;
|
||||
for (size_t i = 0; i < frames && pos < size - 1; i++) {
|
||||
int n = snprintf(buf + pos, size - pos, " 0x%08x", (unsigned int)bt[i]);
|
||||
if (n < 0) break;
|
||||
pos += (size_t)n;
|
||||
}
|
||||
}
|
||||
const char *wifiAuthModeName(uint8_t authMode) {
|
||||
switch(authMode) {
|
||||
case 0: return "OPEN";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue