From eb9cf6622eeefa4856936934182354af51edcb69 Mon Sep 17 00:00:00 2001 From: myperworld Date: Sun, 30 Nov 2025 19:47:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=94=B5=E9=87=8F=E4=B8=8D?= =?UTF-8?q?=E8=B6=B3=E8=A7=A6=E5=8F=91rgb=E7=BA=A2=E8=89=B2=E9=97=AA?= =?UTF-8?q?=E7=83=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- v1.3/src/VoltageMonitor.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/v1.3/src/VoltageMonitor.cpp b/v1.3/src/VoltageMonitor.cpp index a776457..f093635 100644 --- a/v1.3/src/VoltageMonitor.cpp +++ b/v1.3/src/VoltageMonitor.cpp @@ -1,4 +1,5 @@ #include "VoltageMonitor.h" +#include "RGBController.h" // 初始化电压检测相关全局变量(与头文件声明对应) uint16_t bat_check_num = 0; @@ -36,10 +37,12 @@ void bat_check() double battery = (voltage * 3.97) / 1000.0; // 电量显示(LED_BAT引脚控制) - if (battery >= 7.8) + if (battery >= 7.8){ digitalWrite(LED_BAT, HIGH); - else + }else{ digitalWrite(LED_BAT, LOW); + startLEDBlink(CRGB::Red, 200, 5); + } bat_check_num = 0; } else