|
|
@@ -47,8 +47,11 @@ static uint8_t s_comm_lost_rounds = 0;
|
|
|
static uint8_t s_comm_lost_reported = 0;
|
|
|
static uint8_t s_data_fault_reported = 0;
|
|
|
|
|
|
+#if COM_LOG_ENABLE
|
|
|
+/* 仅用于心跳超时日志; 关日志时整表不进镜像, 也免掉"未引用"警告 */
|
|
|
static const char * const s_task_names[GUARD_ID_COUNT] =
|
|
|
{"CPLD", "LVGL", "Preheat", "PID", "PC"};
|
|
|
+#endif
|
|
|
|
|
|
void App_guardian_feed(uint8_t id)
|
|
|
{
|
|
|
@@ -76,6 +79,8 @@ static void App_Guardian_Failsafe(void)
|
|
|
/* 遗言打印 + flush + 软复位 (不返回) */
|
|
|
static void App_Guardian_Reboot(const char *reason)
|
|
|
{
|
|
|
+ (void)reason; /* 本函数内 reason 只进日志; 关日志后须显式引用 */
|
|
|
+
|
|
|
LOG_PRINTF("[ERR] Guard: rebooting (%s)\r\n", reason);
|
|
|
vTaskDelay(pdMS_TO_TICKS(GUARD_REBOOT_FLUSH_MS));
|
|
|
NVIC_SystemReset();
|