lower battery low voltage warning
This commit is contained in:
parent
fff665c62f
commit
83453e21e3
17
Inc/config.h
17
Inc/config.h
|
@ -3,9 +3,18 @@
|
|||
#define CONFIG_H
|
||||
|
||||
|
||||
/* on ubuntu install the following
|
||||
sudo apt -y install stlink-tools
|
||||
sudo systemctl restart udev
|
||||
|
||||
flashing:
|
||||
connect power to pcb. Hold down power button. Run:
|
||||
pio run -t upload
|
||||
*/
|
||||
|
||||
//Select the calibration values for the different pcbs
|
||||
#define BOBBYCAR_PCB_FRONT //Green PCB. black programming cable. outer power button
|
||||
//#define BOBBYCAR_PCB_REAR //Blue PCB. with XT60-U, beige programming cable. inner power button
|
||||
//#define BOBBYCAR_PCB_FRONT //Green PCB. black programming cable. outer power button
|
||||
#define BOBBYCAR_PCB_REAR //Blue PCB. with XT60-U, beige programming cable. inner power button
|
||||
//#define HOVERBRETT //Green PCB in Hoverbrett
|
||||
|
||||
#include "stm32f1xx_hal.h"
|
||||
|
@ -104,8 +113,8 @@
|
|||
#define BAT_LVL4 (380 * BAT_CELLS * BAT_CALIB_ADC) / BAT_CALIB_REAL_VOLTAGE // Yellow: no beep
|
||||
#define BAT_LVL3 (370 * BAT_CELLS * BAT_CALIB_ADC) / BAT_CALIB_REAL_VOLTAGE // Yellow blink: no beep
|
||||
#define BAT_LVL2 (360 * BAT_CELLS * BAT_CALIB_ADC) / BAT_CALIB_REAL_VOLTAGE // Red: gently beep at this voltage level. [V*100/cell]. In this case 3.60 V/cell
|
||||
#define BAT_LVL1 (350 * BAT_CELLS * BAT_CALIB_ADC) / BAT_CALIB_REAL_VOLTAGE // Red blink: fast beep. Your battery is almost empty. Charge now! [V*100/cell]. In this case 3.50 V/cell
|
||||
#define BAT_DEAD (337 * BAT_CELLS * BAT_CALIB_ADC) / BAT_CALIB_REAL_VOLTAGE // All leds off: undervoltage poweroff. (while not driving) [V*100/cell]. In this case 3.37 V/cell
|
||||
#define BAT_LVL1 (330 * BAT_CELLS * BAT_CALIB_ADC) / BAT_CALIB_REAL_VOLTAGE // Red blink: fast beep. Your battery is almost empty. Charge now! [V*100/cell]. In this case 3.50 V/cell
|
||||
#define BAT_DEAD (300 * BAT_CELLS * BAT_CALIB_ADC) / BAT_CALIB_REAL_VOLTAGE // All leds off: undervoltage poweroff. (while not driving) [V*100/cell]. In this case 3.37 V/cell
|
||||
// ######################## END OF BATTERY ###############################
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue