Skip to content

Commit 65e99e8

Browse files
committed
Update binaries and source code for v1.11.1
1 parent 7ceac82 commit 65e99e8

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

Debug/pressboi.bin

16 Bytes
Binary file not shown.

Debug/pressboi.elf

-20 Bytes
Binary file not shown.

Debug/pressboi.uf2

0 Bytes
Binary file not shown.

inc/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
* @name General System Behavior
4747
* @{
4848
*/
49-
#define FIRMWARE_VERSION "1.11.0" ///< Pressboi firmware version
49+
#define FIRMWARE_VERSION "1.11.1" ///< Pressboi firmware version
5050
#define STATUS_MESSAGE_BUFFER_SIZE 256 ///< Standard buffer size for composing status and error messages.
5151
/** @} */
5252

src/pressboi.cpp

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -703,13 +703,8 @@ void Pressboi::dispatchCommand(const Message& msg) {
703703
}
704704

705705
case CMD_DUMP_ERROR_LOG: {
706-
// Temporarily disable watchdog for log dump (diagnostic command only)
707-
// Log dumps can take >100ms for large logs, which exceeds watchdog timeout
708-
#if WATCHDOG_ENABLED
709-
WDT->CTRLA.reg = 0;
710-
while(WDT->SYNCBUSY.reg);
711-
reportEvent(STATUS_PREFIX_INFO, "Watchdog disabled for log dump");
712-
#endif
706+
// Feed watchdog periodically during log dump (don't disable it - causes reboot!)
707+
// Log dumps can take >100ms for large logs, so we need to feed watchdog every few entries
713708

714709
// Send error log entries over network/USB
715710
int entryCount = g_errorLog.getEntryCount();
@@ -738,9 +733,17 @@ void Pressboi::dispatchCommand(const Message& msg) {
738733

739734
// Small delay to allow TX queue to drain (prevent overflow)
740735
Delay_ms(5);
736+
737+
// Feed watchdog every 5 entries to prevent timeout
738+
if ((i + 1) % 5 == 0) {
739+
feedWatchdog();
740+
}
741741
}
742742
}
743743

744+
// Feed watchdog after error log
745+
feedWatchdog();
746+
744747
snprintf(msg, sizeof(msg), "=== END ERROR LOG ===");
745748
reportEvent(STATUS_PREFIX_INFO, msg);
746749

@@ -773,23 +776,20 @@ void Pressboi::dispatchCommand(const Message& msg) {
773776
entry.networkActive, entry.usbAvailable);
774777
reportEvent(STATUS_PREFIX_INFO, msg);
775778

776-
// Every 10 entries, add delay to prevent TX queue overflow
779+
// Every 10 entries, add delay to prevent TX queue overflow and feed watchdog
777780
if ((i + 1) % 10 == 0) {
778781
Delay_ms(50);
782+
feedWatchdog();
779783
}
780784
}
781785
}
782786

787+
// Feed watchdog one final time
788+
feedWatchdog();
789+
783790
snprintf(msg, sizeof(msg), "=== END HEARTBEAT LOG ===");
784791
reportEvent(STATUS_PREFIX_INFO, msg);
785792

786-
// Re-enable watchdog after log dump is complete
787-
#if WATCHDOG_ENABLED
788-
WDT->CTRLA.reg = WDT_CTRLA_ENABLE;
789-
while(WDT->SYNCBUSY.reg);
790-
reportEvent(STATUS_PREFIX_INFO, "Watchdog re-enabled");
791-
#endif
792-
793793
reportEvent(STATUS_PREFIX_DONE, "dump_error_log");
794794
break;
795795
}

0 commit comments

Comments
 (0)