AlexanderTonn / SolarPowerhouse

Solar balkony power plant, which includes control logic for switching between micro inverter and battery depending on the state of charge. The repository containing any drawings and manuals.
Apache License 2.0
0 stars 0 forks source link

[BUG] RtcXCheckDayChange not working #38

Closed AlexanderTonn closed 6 months ago

AlexanderTonn commented 6 months ago

🐛 Describe the bug

⁉️ Expected behavior

📷 Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

// .... CORE_M7.ino
// CONTROL LOGIC
  // Set Relays on Mppt if day changed
  if (xCheckDayChange || xFirstCycle)
  {
    Serial.println("xCheckDayChange: " + String(xCheckDayChange));
    auto xDayChanged = ntp.rtcCheckDayChange(settings.xResetDay);
    if (xDayChanged == true && mpptCharger.controllerInformation.fSolarCurr <= settings.fSwitchCurrentTarget || xFirstCycle)
    {
      byModeActual = BATTERY_MODE;
      xPv1OnMppt = true;
      xFirstCycle = false;
    }
  }
// ... 

:white_check_mark: Tasks