Skip to content

Commit

Permalink
Update battery divider for NB4+
Browse files Browse the repository at this point in the history
  • Loading branch information
richardclli committed Jul 29, 2024
1 parent 2c25628 commit ad40efb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion radio/src/targets/pl18/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,12 @@ extern "C" void SDRAM_Init();
#define BATTERY_WARN 37 // 3.7V
#define BATTERY_MIN 35 // 3.4V
#define BATTERY_MAX 43 // 4.3V
#define BATTERY_DIVIDER 962

#if defined(RADIO_NB4P)
#define BATTERY_DIVIDER 3102 // = 2047 * (10k / 10k + 10k) * 10 / 3.3V
#else
#define BATTERY_DIVIDER 962 // = 2047 * (22k / 120k + 22k) * 10 / 3.3V
#endif

#if defined(__cplusplus) && !defined(SIMU)
extern "C" {
Expand Down

0 comments on commit ad40efb

Please sign in to comment.