Skip to content

Commit

Permalink
chore: improve VBAT measurement definition
Browse files Browse the repository at this point in the history
  • Loading branch information
3djc committed Oct 23, 2024
1 parent 0166198 commit bc04ed4
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions radio/src/targets/taranis/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -408,27 +408,26 @@ void setTopBatteryValue(uint32_t volts);

#define INTMODULE_FIFO_SIZE 128

#if defined(MANUFACTURER_RADIOMASTER)
#if defined(MANUFACTURER_RADIOMASTER) || defined(MANUFACTURER_JUMPER)
// --- MOSFET ---- R2 --- MCU
// |__ R1 --- GND
//
#define VBAT_DIV_R1 160 // kOhms
#define VBAT_DIV_R2 499 // kOhms
#define VBAT_MOSFET_DROP 20 // * 10mV
#if defined(MANUFACTURER_JUMPER)
#define VBAT_MOSFET_DROP 50 // * 10mV
#else
#define VBAT_MOSFET_DROP 20 // * 10mV
#endif
#else //--- MOSFET ---- R2 --- MCU
#if defined (RADIO_T8) || defined(RADIO_COMMANDO8)
#define BATTERY_DIVIDER 50000
#elif defined (RADIO_LR3PRO)
#define BATTERY_DIVIDER 39500
#else
#define BATTERY_DIVIDER 26214
#endif

#if defined(RADIO_TPROV2) || defined(RADIO_TPROS) || defined(RADIO_FAMILY_T20)
#define VOLTAGE_DROP 60
#else
#define VOLTAGE_DROP 20
#endif
#define VOLTAGE_DROP 20
#endif //--- MOSFET ---- R2 --- MCU

#if defined(RADIO_FAMILY_T20)
Expand Down

0 comments on commit bc04ed4

Please sign in to comment.