Quellcode durchsuchen

Merge pull request #8 from rkuris/q3-battery-short-bug

Turn on mosfet when switching from OFF to ON.
OpenGreenEnergy vor 9 Jahren
Ursprung
Commit
2895b469b3
1 geänderte Dateien mit 2 neuen und 0 gelöschten Zeilen
  1. 2 0
      MPPT_Code/MPPT_Code.ino

+ 2 - 0
MPPT_Code/MPPT_Code.ino

@@ -368,9 +368,11 @@ void run_charger(void) {
         off_count--;                                        // anything, this is to allow the battery voltage to settle down to see if the  
       }                                                     // battery has been disconnected
       else if ((bat_volts > BATT_FLOAT) && (sol_volts > bat_volts)) {
+        TURN_ON_MOSFETS;
         charger_state = bat_float;                          // if battery voltage is still high and solar volts are high
       }    
       else if ((bat_volts > MIN_BAT_VOLTS) && (bat_volts < BATT_FLOAT) && (sol_volts > bat_volts)) {
+        TURN_ON_MOSFETS;
         charger_state = bulk;
       }
       break;