Several small fixes for MPPT-2410-LC

- Battery temperature set to 25 degC if no external sensor connected
- EEPROM selection added to PCB config file
- UEXT power supply enable added to UEXT init functions

Firmware still gets stuck when OLED display is enabled... Error still to be found!
This commit is contained in:
Martin Jaeger
2019-06-16 15:50:01 +02:00
parent 96d26b5c34
commit ead6f2bffb
7 changed files with 34 additions and 9 deletions
+10 -3
View File
@@ -63,7 +63,14 @@ const unsigned char bmp_disconnected [] = {
I2C i2c(PIN_UEXT_SDA, PIN_UEXT_SCL);
Adafruit_SSD1306_I2c oled(i2c, PIN_UEXT_SSEL, 0x78, 64, 128);
void uext_init() {;} // no need for initialization
void uext_init()
{
#ifdef PIN_UEXT_DIS
DigitalOut uext_dis(PIN_UEXT_DIS);
uext_dis = 0;
#endif
}
void uext_process_asap() {;}
void uext_process_1s()
@@ -135,9 +142,9 @@ void uext_process_1s()
oled.setTextCursor(0, 56);
#ifdef CHARGER_TYPE_PWM
oled.printf("T %.0fC PWM %.0f%% SOC %d%%", dcdc.temp_mosfets, pwm_switch_get_duty_cycle() * 100.0, charger.soc);
oled.printf("T %.0fC PWM %.0f%% SOC %d%%", charger.bat_temperature, pwm_switch_get_duty_cycle() * 100.0, charger.soc);
#else
oled.printf("T %.0fC PWM %.0f%% SOC %d%%", dcdc.temp_mosfets, half_bridge_get_duty_cycle() * 100.0, charger.soc);
oled.printf("T %.0fC PWM %.0f%% SOC %d%%", charger.bat_temperature, half_bridge_get_duty_cycle() * 100.0, charger.soc);
#endif
oled.display();