Skip to content

Commit 236060d

Browse files
Cleanup
1 parent d9f7590 commit 236060d

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

src/dimmerTask.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ void dimmerTask(void *parameter)
3434
#ifdef LGFX_M5STACK
3535
static constexpr const int BACKLIGHT_PIN = 32;
3636
if (!ledcChangeFrequency(BACKLIGHT_PIN, freq, PWM_BITDEPTH) ||
37-
!ledcWrite(BACKLIGHT_PIN, LEDC_MAX_VALUE >> 6))
37+
!ledcWrite(BACKLIGHT_PIN, LEDC_MAX_VALUE >> 5))
3838
log_w("Could not capture M5Stack backlight");
3939
#endif
4040

@@ -66,7 +66,7 @@ void dimmerTask(void *parameter)
6666
vTaskDelayUntil(&xLastWakeTime, ticksToWait);
6767
const auto msElapsedToday = msSinceMidnight();
6868

69-
if (msElapsedToday) /* to solve flashing at 00:00:000 due to the fact that the first timer has no predecessor at this time */
69+
if (msElapsedToday) /* to prevent flashing at 00:00:000 due to the fact that the first timer has no predecessor at this time */
7070
{
7171
std::lock_guard<std::mutex> lock(channelMutex);
7272

src/lcdTask.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#ifndef _DISPLAY_TASK_
22
#define _DISPLAY_TASK_
33

4-
#include <LovyanGFX.hpp>
4+
#define LGFX_AUTODETECT
55
#include <LGFX_AUTODETECT.hpp>
66

77
#include "lcdMessage_t.h"

src/main.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,8 @@ static void startDimmerTask()
4040

4141
static void ntpCb(void *cb_arg)
4242
{
43-
sntp_set_time_sync_notification_cb(NULL);
44-
messageOnLcd("");
4543
log_i("NTP synced");
44+
sntp_set_time_sync_notification_cb(NULL);
4645
startDimmerTask();
4746
}
4847
static void parseTimerFile(File &file)
@@ -170,7 +169,7 @@ void setup(void)
170169
Serial.begin(115200);
171170

172171
#ifdef LGFX_M5STACK
173-
pinMode(DAC1, OUTPUT); // prevents high pitched noise on the builtin speaker which is connected to DAC1
172+
pinMode(DAC1, OUTPUT); // prevents high pitched noise on the builtin speaker which is connected to the first DAC
174173
#endif
175174

176175
log_i("aquacontrol v2");

0 commit comments

Comments
 (0)