Skip to content

Commit

Permalink
Changes to acommodate PR899 requirements for main loop call
Browse files Browse the repository at this point in the history
  • Loading branch information
jdgarcia99 committed Aug 30, 2024
1 parent 765252f commit fe8dfa1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions src/LedManagerTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -745,11 +745,11 @@ void LedManagerTask::setBrightness(uint8_t brightness)
MicroTask.wakeTask(this);
}

LedManagerTask ledManager;

#if defined(NEO_PIXEL_PIN) && defined(NEO_PIXEL_LENGTH) && defined(ENABLE_WS2812FX)
extern void ledManager_loop()
void LedManagerTask::service()
{
ws2812fx.service();
}
#endif
#endif

LedManagerTask ledManager;
13 changes: 6 additions & 7 deletions src/LedManagerTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,15 @@ class LedManagerTask : public MicroTasks::Task
int getButtonPressed();

void setBrightness(uint8_t brightness);
};

extern LedManagerTask ledManager;

#if defined(NEO_PIXEL_PIN) && defined(NEO_PIXEL_LENGTH) && defined(ENABLE_WS2812FX)
// -------------------------------------------------------------------
// Perform the background status bar operations. Must be called in the main
// loop function
// -------------------------------------------------------------------
#if defined(NEO_PIXEL_PIN) && defined(NEO_PIXEL_LENGTH) && defined(ENABLE_WS2812FX)
extern void ledManager_loop();
void service();
#endif
};

extern LedManagerTask ledManager;

#endif // LED_MANAGER_TASK_H
#endif // LED_MANAGER_TASK_H
3 changes: 2 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,8 @@ loop() {
Profile_End(MicroTask, 10);

#if defined(NEO_PIXEL_PIN) && defined(NEO_PIXEL_LENGTH) && defined(ENABLE_WS2812FX)
ledManager_loop();
// Call ws2812fx service method to update ledbar effect
ledManager.service();
#endif

if(OpenEVSE.isConnected())
Expand Down

0 comments on commit fe8dfa1

Please sign in to comment.