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] day Change won't work #45

Open AlexanderTonn opened 8 months ago

AlexanderTonn commented 8 months ago

🐛 Describe the bug

 ‼️ To Reproduce**

⁉️ Expected behavior

📷 Screenshots

Additional context

The problem is somewhere here:

auto rtc::rtcCheckDayChange(bool xSettDayChangeActive) -> bool
{
  static uint16_t uiDateOld = 0; // needed for detecting whether day has changed

  if (!xSettDayChangeActive)
  {
    return false;
  }
  // if xSettDayChangeActive is true, check whether day has changed
  else
  {
    uint16_t uiDayActual = getTimeData(timeOption::DAY_OF_YEAR);
    if (uiDayActual != uiDateOld)
    {
      uiDateOld = uiDayActual;
      return true;
    }
    else
      return false;
  }
}

:white_check_mark: Tasks