Adjust voltage thresholds

replace/38df55d7061755c108c6f88350ba0a6753d80514
Niccolò Izzo 2020-12-18 17:46:04 +01:00
rodzic 431d445c77
commit 98cd741c88
1 zmienionych plików z 4 dodań i 4 usunięć

Wyświetl plik

@ -22,19 +22,19 @@
#include <math.h> #include <math.h>
/* This array acts as a lookup table for converting Li-Po voltage into /* This array acts as a lookup table for converting Li-Po voltage into
* charge percentage, elements range from 0% to 100% (included) with 5% steps. * charge percentage, elements range from 5% to 95% (included) with 5% steps.
* Data is taken from (https://blog.ampow.com/lipo-voltage-chart/). * Data is taken from (https://blog.ampow.com/lipo-voltage-chart/).
*/ */
#define V_LUT_STEPS 21 #define V_LUT_STEPS 21
#if defined BAT_LIPO_1S #if defined BAT_LIPO_1S
float bat_v_min = 3.61f; float bat_v_min = 3.61f;
float bat_v_max = 4.20f; float bat_v_max = 4.15f;
#elif defined BAT_LIPO_2S #elif defined BAT_LIPO_2S
float bat_v_min = 7.22f; float bat_v_min = 7.22f;
float bat_v_max = 8.40f; float bat_v_max = 8.30f;
#elif defined BAT_LIPO_3S #elif defined BAT_LIPO_3S
float bat_v_min = 10.83; float bat_v_min = 10.83;
float bat_v_max = 12.60; float bat_v_max = 12.45;
#else #else
#error Please define a battery type into platform/targets/.../hwconfig.h #error Please define a battery type into platform/targets/.../hwconfig.h
#endif #endif