add lock mode for thermal printer when battery is low

This commit is contained in:
cuu
2021-05-29 17:14:43 +08:00
parent 4e06a6e213
commit ddd21b4d62
2 changed files with 33 additions and 12 deletions

View File

@@ -121,9 +121,10 @@
#define ADC_FILE_PAT "/sys/bus/iio/devices/iio:device*/in_voltage_raw"
#define HEAT_TIME 100 // heat time,better not greater than 1000,300-1000 0-f
#define HEAT_TIME 100 // heat time + (0-f)*46
#define BAT_CAP "/sys/class/power_supply/axp20x-battery/capacity"
#define BAT_THRESHOLD 14 // %14 battery = low power
#define int16 uint16_t
#define int8 uint8_t