diff --git a/openrtx/src/core/battery.c b/openrtx/src/core/battery.c index f7a2e54f..2bc62821 100644 --- a/openrtx/src/core/battery.c +++ b/openrtx/src/core/battery.c @@ -29,6 +29,9 @@ #if defined(CONFIG_BAT_LIPO) static const uint16_t vcell_max = 0x0414; // 4.08V static const uint16_t vcell_min = 0x039C; // 3.61V +#elif defined (CONFIG_BAT_LIION) +static const uint16_t vcell_max = 0x0433; // 4.15V +static const uint16_t vcell_min = 0x0333; // 3.2V #elif defined(CONFIG_BAT_NONE) #else #error Please define a battery type into platform/targets/.../hwconfig.h diff --git a/platform/targets/CS7000-PLUS/hwconfig.h b/platform/targets/CS7000-PLUS/hwconfig.h index abd0a8d1..e00ba713 100644 --- a/platform/targets/CS7000-PLUS/hwconfig.h +++ b/platform/targets/CS7000-PLUS/hwconfig.h @@ -62,7 +62,7 @@ extern const struct sky73210 pll; #define CONFIG_SCREEN_BRIGHTNESS /* Battery type */ -#define CONFIG_BAT_LIPO +#define CONFIG_BAT_LIION #define CONFIG_BAT_NCELLS 2 /* Device supports M17 mode */ diff --git a/platform/targets/CS7000/hwconfig.h b/platform/targets/CS7000/hwconfig.h index a50cf881..c774bc53 100644 --- a/platform/targets/CS7000/hwconfig.h +++ b/platform/targets/CS7000/hwconfig.h @@ -62,7 +62,7 @@ extern const struct sky73210 pll; #define CONFIG_SCREEN_BRIGHTNESS /* Battery type */ -#define CONFIG_BAT_LIPO +#define CONFIG_BAT_LIION #define CONFIG_BAT_NCELLS 2 /* Device supports M17 mode */ diff --git a/platform/targets/DM-1701/hwconfig.h b/platform/targets/DM-1701/hwconfig.h index 56b6cbbd..cb3f35e9 100644 --- a/platform/targets/DM-1701/hwconfig.h +++ b/platform/targets/DM-1701/hwconfig.h @@ -56,7 +56,7 @@ extern const struct Adc adc1; #define CONFIG_PIX_FMT_RGB565 /* Battery type */ -#define CONFIG_BAT_LIPO +#define CONFIG_BAT_LIION #define CONFIG_BAT_NCELLS 2 /* Device supports M17 mode */ diff --git a/platform/targets/GDx/hwconfig.h b/platform/targets/GDx/hwconfig.h index d5c5bf5f..c1b9ff26 100644 --- a/platform/targets/GDx/hwconfig.h +++ b/platform/targets/GDx/hwconfig.h @@ -51,7 +51,7 @@ extern const struct spiDevice c6000_spi; #define CONFIG_SCREEN_BRIGHTNESS /* Battery type */ -#define CONFIG_BAT_LIPO +#define CONFIG_BAT_LIION #define CONFIG_BAT_NCELLS 2 #ifdef __cplusplus diff --git a/platform/targets/MD-3x0/hwconfig.h b/platform/targets/MD-3x0/hwconfig.h index d4a80ec1..199cb371 100644 --- a/platform/targets/MD-3x0/hwconfig.h +++ b/platform/targets/MD-3x0/hwconfig.h @@ -61,7 +61,7 @@ extern const struct Adc adc1; #define CONFIG_SCREEN_BRIGHTNESS /* Battery type */ -#define CONFIG_BAT_LIPO +#define CONFIG_BAT_LIION #define CONFIG_BAT_NCELLS 2 /* Device supports M17 mode */ diff --git a/platform/targets/MD-UV3x0/hwconfig.h b/platform/targets/MD-UV3x0/hwconfig.h index 0f1a8354..2d48011b 100644 --- a/platform/targets/MD-UV3x0/hwconfig.h +++ b/platform/targets/MD-UV3x0/hwconfig.h @@ -58,7 +58,7 @@ extern const struct Adc adc1; #define CONFIG_PIX_FMT_RGB565 /* Battery type */ -#define CONFIG_BAT_LIPO +#define CONFIG_BAT_LIION #define CONFIG_BAT_NCELLS 2 /* Device supports M17 mode */