Commit fce96e6e authored by 957dd's avatar 957dd

更新了电压检测

parent 6cba0a8b
log
loghttp
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
No preview for this file type
......@@ -2,7 +2,7 @@
CC = gcc
# 编译选项-Ilib
CFLAGS = -Wall -g -Iinclude -Isystem/gpio -Isystem/sensor -Iusr -Idevice_judg/judg \
-Idevice_judg/device
-Idevice_judg/device
# 链接库
LDFLAGS = -lwiringPi -lmosquitto -lcjson -lm
# 目标可执行文件
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
......@@ -27,13 +27,14 @@ int alarm_low(int index) {//比较小警报
int alarm_control(float voltage) {//关闭警报
if(gPwmCount >= 5) {
if( voltage >= 10.1 ) {
if( voltage >= 10.5 ) {
alarm_highest(0);
alarm_low(0);
}else if(voltage >= 9.1&&voltage <= 10.1) {
}else if(voltage >= 9.5&&voltage <= 10.5) {
alarm_low(1);
alarm_highest(0);
printf("电压警告");
}else if(voltage < 9.1) {
}else if(voltage < 9.5) {
alarm_highest(1);
alarm_low(1);
printf("换电警告");
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment