You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: extras/TestMadflight/cfg.ino
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -92,9 +92,9 @@ void setup() {
92
92
93
93
voidloop() {
94
94
cfg.begin();
95
-
Serial.printf("crc=%d crcCalc=%d len=%d v=%f i=%f press a key to increase i by 1.1\n", cfg.crc(), cfg.crcCalc(), cfg.len(), cfg.BAT_CAL_V, cfg.BAT_CAL_I);
95
+
Serial.printf("crc=%d crcCalc=%d len=%d v=%f i=%f press a key to increase i by 1.1\n", cfg.crc(), cfg.crcCalc(), cfg.len(), cfg.bat_cal_v, cfg.bat_cal_i);
Copy file name to clipboardExpand all lines: src/madflight/bat/BatteryADC.h
+14-14Lines changed: 14 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -4,8 +4,8 @@ ADC Battery Monitor
4
4
Need to have at least HW_PIN_BAT_V or HW_PIN_BAT_I defined before including this header
5
5
6
6
Also needs cfg for:
7
-
cfg.BAT_CAL_V //BatteryADC voltage conversion factor, set this to 1 and enable print_bat(), then enter here: Actual Volt / bat_v ADC reading (for example: 8.04/13951 -> set BAT_CAL_V 0.0057630 )
8
-
cfg.BAT_CAL_I //BatteryADC current conversion factor, set this to 1 and enable print_bat(), then enter here: Actual Amperes / bat_i ADC reading (for example: 1.0/847 --> set BAT_CAL_I 0.0011806 )
7
+
cfg.bat_cal_v //BatteryADC voltage conversion factor, set this to 1 and enable print_bat(), then enter here: Actual Volt / bat_v ADC reading (for example: 8.04/13951 -> set BAT_CAL_V 0.0057630 )
8
+
cfg.bat_cal_i //BatteryADC current conversion factor, set this to 1 and enable print_bat(), then enter here: Actual Amperes / bat_i ADC reading (for example: 1.0/847 --> set BAT_CAL_I 0.0011806 )
0 commit comments