Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -235,13 +235,13 @@ jobs:

- name: Summary
env:
clang-threshold: 68
clang-threshold: 35
run: |
echo "Status: ${{ steps.tidy.outputs.clang-tidy-checks-failed }} checks failed, threshold for success is ${{ env.clang-threshold }}."
echo "Status: ${{ steps.tidy.outputs.checks-failed }} checks failed, threshold for success is ${{ env.clang-threshold }}."
echo "Clang report:"
if [ -n "${{ github.event.pull_request.number }}" ]; then
echo "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}?pr=${{ github.event.pull_request.number }}"
else
echo "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
fi
exit $(( ${{ steps.tidy.outputs.clang-tidy-checks-failed }} > ${{ env.clang-threshold }} ))
exit $(( ${{ steps.tidy.outputs.checks-failed }} > ${{ env.clang-threshold }} ))
10 changes: 5 additions & 5 deletions firmware/include/extensions/ButtonExtension.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@ class ButtonExtension final : public ExtensionModule

#ifdef PIN_SW1
bool brightnessIncrease = false;
inline static bool powerLong = false;
inline static bool powerShort = false;
static inline bool powerLong = false;
static inline bool powerShort = false;
#endif
#ifdef PIN_SW2
inline static bool modeLong = false;
inline static bool modeShort = false;
static inline bool modeLong = false;
static inline bool modeShort = false;
#endif

#ifdef PIN_SW1
static inline volatile bool powerState = false;
#endif
#ifdef PIN_SW2
inline static volatile bool modeState = false;
static inline volatile bool modeState = false;
#endif

#ifdef PIN_SW1
Expand Down
6 changes: 3 additions & 3 deletions firmware/include/extensions/HomeAssistantExtension.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ class HomeAssistantExtension final : public ExtensionModule
private:
static constexpr std::string_view name{"Home Assistant"};

bool pending = false;

inline static const std::string discoveryTopic =
static inline const std::string discoveryTopic =
std::format("homeassistant/device/0x{:x}/config", ESP.getEfuseMac());

static constexpr std::string_view payloadOff = R"({"power":false})";
static constexpr std::string_view payloadOn = R"({"power":true})";

bool pending = false;

void transmit();

public:
Expand Down
10 changes: 5 additions & 5 deletions firmware/include/extensions/RtcExtension.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class RtcExtension final : public ExtensionModule
static constexpr std::string_view name{"RTC"};

#ifdef PIN_INT
inline static bool pending = true;
static inline bool pending = true;
#endif

#if defined(RTC_DS3231) || defined(RTC_DS3232)
Expand All @@ -38,13 +38,13 @@ class RtcExtension final : public ExtensionModule
explicit RtcExtension() : ExtensionModule(name) {};

#ifdef RTC_DS1307
inline static RtcDS1307<TwoWire> rtc{Wire};
static inline RtcDS1307<TwoWire> rtc{Wire};
#elif defined(RTC_DS3231)
inline static RtcDS3231<TwoWire> rtc{Wire};
static inline RtcDS3231<TwoWire> rtc{Wire};
#elif defined(RTC_DS3232)
inline static RtcDS3232<TwoWire> rtc{Wire};
static inline RtcDS3232<TwoWire> rtc{Wire};
#elif defined(RTC_PCF8563)
inline static RtcPCF8563<TwoWire> rtc{Wire};
static inline RtcPCF8563<TwoWire> rtc{Wire};
#endif // RTC_DS1307

void configure() override;
Expand Down
2 changes: 1 addition & 1 deletion firmware/include/middlewares/GoogleWeatherMiddleware.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class GoogleWeatherMiddleware final : public WeatherHandler
}};

// https://developers.google.com/maps/documentation/weather
inline static std::vector<const char *> queries{
static inline std::vector<const char *> queries{
"location.latitude=" LATITUDE "&location.longitude=" LONGITUDE "&key=" GOOGLEWEATHER_KEY,
#if TEMPERATURE_CELSIUS
"location.latitude=" LATITUDE "&location.longitude=" LONGITUDE "&unitsSystem=METRIC&key=" GOOGLEWEATHER_KEY,
Expand Down
2 changes: 1 addition & 1 deletion firmware/include/middlewares/OpenMeteoMiddleware.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class OpenMeteoMiddleware final : public WeatherHandler
}};

// https://open-meteo.com/en/docs#api-documentation
inline static std::vector<std::pair<const char *, const char *>> parts{
static inline std::vector<std::pair<const char *, const char *>> parts{
{
"api.open-meteo.com",
"latitude=" LATITUDE "&longitude=" LONGITUDE "&current=temperature_2m,weather_code",
Expand Down
2 changes: 1 addition & 1 deletion firmware/include/middlewares/OpenWeatherMiddleware.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class OpenWeatherMiddleware final : public WeatherHandler

// https://openweathermap.org/api/one-call-3#current
// https://openweathermap.org/current#one
inline static std::vector<std::pair<const char *, const char *>> parts{
static inline std::vector<std::pair<const char *, const char *>> parts{
{
"/data/3.0/onecall",
"lat=" LATITUDE "&lon=" LONGITUDE "&exclude=alerts,daily,hourly,minutely&appid=" OPENWEATHER_KEY,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class WorldWeatherOnlineMiddleware final : public WeatherHandler
}};

// https://www.worldweatheronline.com/weather-api/api/docs/local-city-town-weather-api.aspx
inline static std::vector<const char *> queries{
static inline std::vector<const char *> queries{
#ifdef LOCATION
"q=" LOCATION "&cc=yes&fx=no&mca=no&format=json&key=" WORLDWEATHERONLINE_KEY,
#endif
Expand Down
2 changes: 1 addition & 1 deletion firmware/include/middlewares/WttrInMiddleware.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class WttrInMiddleware final : public WeatherHandler

// https://wttr.in/:help
// https://github.com/chubin/wttr.in#readme
inline static std::vector<std::pair<const char *, const char *>> parts{
static inline std::vector<std::pair<const char *, const char *>> parts{
{
"/",
"format=j1",
Expand Down
2 changes: 1 addition & 1 deletion firmware/include/middlewares/YrMiddleware.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class YrMiddleware final : public WeatherHandler

// https://api.met.no/weatherapi/locationforecast/2.0/documentation
// https://api.met.no/weatherapi/nowcast/2.0/documentation
inline static std::vector<const char *> paths{
static inline std::vector<const char *> paths{
"/weatherapi/locationforecast/2.0/complete",
"/weatherapi/nowcast/2.0/complete",
};
Expand Down
12 changes: 6 additions & 6 deletions firmware/include/modes/CircleMode.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ class CircleMode final : public ModeModule
static constexpr float x = (GRID_COLUMNS - 1) / 2.0F;
static constexpr float y = (GRID_ROWS - 1) / 2.0F;

inline static const uint8_t maxRadius =
3 + ceilf((max(GRID_COLUMNS * PITCH_HORIZONTAL / static_cast<float>(PITCH_VERTICAL),
GRID_ROWS *PITCH_VERTICAL / static_cast<float>(PITCH_HORIZONTAL)) /
M_SQRT2 +
M_SQRT1_2) /
2.0F);
// NOLINTNEXTLINE(bugprone-throwing-static-initialization,cert-err58-cpp)
static inline const uint8_t maxRadius{static_cast<uint8_t>(ceilf(
hypotf(((GRID_COLUMNS - 1) / 2.0F) *
(static_cast<float>(2 * PITCH_HORIZONTAL) / static_cast<float>(PITCH_HORIZONTAL + PITCH_VERTICAL)),
((GRID_ROWS - 1) / 2.0F) *
(static_cast<float>(2 * PITCH_VERTICAL) / static_cast<float>(PITCH_HORIZONTAL + PITCH_VERTICAL)))))};

bool lit = true;

Expand Down
2 changes: 1 addition & 1 deletion firmware/include/modes/MetaballsMode.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class MetaballsMode final : public ModeModule
GRID_ROWS *PITCH_VERTICAL / static_cast<float>(PITCH_HORIZONTAL)) /
std::numbers::pi;
static constexpr float radiusSq = radius * radius;
static constexpr float speed = 5e-6 * GRID_COLUMNS * GRID_ROWS;
static constexpr float speed = 5e-6F * static_cast<float>(GRID_COLUMNS * GRID_ROWS);

static constexpr uint8_t multiplier = 1U << 3U;

Expand Down
4 changes: 2 additions & 2 deletions firmware/include/modes/PixelSequenceMode.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
class PixelSequenceMode final : public ModeModule
{
private:
static constexpr std::array<uint8_t, GRID_COLUMNS * GRID_ROWS> pixelOrder{LED_MAP};
static constexpr std::array<uint8_t, GRID_COLUMNS * GRID_ROWS> pixels{LED_MAP};

bool lit = true;

uint16_t address = 0;
uint16_t idx = 0;

unsigned long lastMillis = 0;

Expand Down
2 changes: 1 addition & 1 deletion firmware/include/services/DisplayService.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class DisplayService final : public ServiceModule
#ifdef PWM_DEPTH
static constexpr uint8_t depth = min<uint8_t>(PWM_DEPTH, SOC_LEDC_TIMER_BIT_WIDTH);
#else
// NOLINTNEXTLINE(bugprone-throwing-static-initialization)
// NOLINTNEXTLINE(bugprone-throwing-static-initialization,cert-err58-cpp)
static inline const uint8_t depth =
min(max<uint8_t>(
8U, static_cast<uint8_t>(8.0F - (std::numbers::pi_v<float> * log2f(static_cast<float>(fps) / 120.0F)))),
Expand Down
2 changes: 1 addition & 1 deletion firmware/src/extensions/HeapExtension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void HeapExtension::onHomeAssistant(JsonDocument &discovery, std::string topic,
component[HomeAssistantAbbreviations::entity_category].set("diagnostic");
component[HomeAssistantAbbreviations::expire_after].set(UINT8_MAX);
component[HomeAssistantAbbreviations::icon].set("mdi:memory");
component[HomeAssistantAbbreviations::name].set(std::string(Extensions.name.data()).append(" task stack"));
component[HomeAssistantAbbreviations::name].set(std::string(Extensions.name).append(" task stack"));
component[HomeAssistantAbbreviations::object_id].set(HOSTNAME "_" + id);
component[HomeAssistantAbbreviations::platform].set("sensor");
component[HomeAssistantAbbreviations::state_class].set("measurement");
Expand Down
7 changes: 3 additions & 4 deletions firmware/src/extensions/HomeAssistantExtension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

#include <WiFi.h>
#include <array>
#include <regex>

void HomeAssistantExtension::begin()
{
Expand Down Expand Up @@ -103,8 +102,8 @@ void HomeAssistantExtension::onTransmit(JsonObjectConst payload, std::string_vie
{
pending = true;
}
// Remove
else if (payload["action"].is<const char *>() && !strcmp(payload["action"].as<const char *>(), "remove"))
// Action: Remove
else if (payload["action"].is<std::string_view>() && payload["action"].as<std::string_view>() == "remove")
{
undiscover();
}
Expand All @@ -115,7 +114,7 @@ void HomeAssistantExtension::onHomeAssistant(JsonDocument &discovery, std::strin
{
topic.append(name);
{
const std::string id{std::regex_replace(name.data(), std::regex(R"(\s+)"), "").append("_main")};
const std::string id{"HomeAssistant_main"};
const std::string topicDisplay{std::string("frekvens/" HOSTNAME "/").append(Display.name)};
JsonObject component{discovery[HomeAssistantAbbreviations::components][id].to<JsonObject>()};
component[HomeAssistantAbbreviations::brightness_command_template].set(R"({"brightness":{{value}}})");
Expand Down
2 changes: 1 addition & 1 deletion firmware/src/extensions/InfraredExtension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ void InfraredExtension::setActive(bool _active)
nvs_handle_t handle{};
if (nvs_open(std::string(name).c_str(), nvs_open_mode_t::NVS_READWRITE, &handle) == ESP_OK)
{
nvs_set_u8(handle, "active", static_cast<uint8_t>(active));
nvs_set_u8(handle, "active", static_cast<uint8_t>(active)); // NOLINT(readability-implicit-bool-conversion)
nvs_commit(handle);
nvs_close(handle);
}
Expand Down
2 changes: 1 addition & 1 deletion firmware/src/extensions/MicrophoneExtension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
}
}

void MicrophoneExtension::handle()

Check warning on line 36 in firmware/src/extensions/MicrophoneExtension.cpp

View workflow job for this annotation

GitHub Actions / Tidy (IKEA_FREKVENS, esp32-s3-devkitc-1)

firmware/src/extensions/MicrophoneExtension.cpp:36:27 [readability-function-cognitive-complexity]

function 'handle' has cognitive complexity of 26 (threshold 25)

Check warning on line 36 in firmware/src/extensions/MicrophoneExtension.cpp

View workflow job for this annotation

GitHub Actions / Tidy (IKEA_FREKVENS, esp32-c3-devkitm-1)

firmware/src/extensions/MicrophoneExtension.cpp:36:27 [readability-function-cognitive-complexity]

function 'handle' has cognitive complexity of 26 (threshold 25)

Check warning on line 36 in firmware/src/extensions/MicrophoneExtension.cpp

View workflow job for this annotation

GitHub Actions / Tidy (IKEA_OBEGRANSAD, esp32-c5-devkitc-1)

firmware/src/extensions/MicrophoneExtension.cpp:36:27 [readability-function-cognitive-complexity]

function 'handle' has cognitive complexity of 26 (threshold 25)
{
if (pending)
{
Expand Down Expand Up @@ -93,7 +93,7 @@
nvs_handle_t handle{};
if (nvs_open(std::string(name).c_str(), nvs_open_mode_t::NVS_READWRITE, &handle) == ESP_OK)
{
nvs_set_u8(handle, "active", static_cast<uint8_t>(active));
nvs_set_u8(handle, "active", static_cast<uint8_t>(active)); // NOLINT(readability-implicit-bool-conversion)
nvs_commit(handle);
nvs_close(handle);
}
Expand Down
4 changes: 2 additions & 2 deletions firmware/src/extensions/PhotocellExtension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void PhotocellExtension::handle()
direction = !direction;
counter /= 2;
}
counter += _brightness - brightness;
counter = static_cast<int16_t>(counter + _brightness - brightness);
if (abs(counter) > UINT8_MAX)
{
brightness = _brightness;
Expand All @@ -76,7 +76,7 @@ void PhotocellExtension::setActive(bool _active)
nvs_handle_t handle{};
if (nvs_open(std::string(name).c_str(), nvs_open_mode_t::NVS_READWRITE, &handle) == ESP_OK)
{
nvs_set_u8(handle, "active", static_cast<uint8_t>(active));
nvs_set_u8(handle, "active", static_cast<uint8_t>(active)); // NOLINT(readability-implicit-bool-conversion)
nvs_commit(handle);
nvs_close(handle);
}
Expand Down
2 changes: 1 addition & 1 deletion firmware/src/extensions/PlaylistExtension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ void PlaylistExtension::setActive(bool _active)
nvs_handle_t handle{};
if (nvs_open(std::string(name).c_str(), nvs_open_mode_t::NVS_READWRITE, &handle) == ESP_OK)
{
nvs_set_u8(handle, "active", static_cast<uint8_t>(active));
nvs_set_u8(handle, "active", static_cast<uint8_t>(active)); // NOLINT(readability-implicit-bool-conversion)
nvs_commit(handle);
nvs_close(handle);
}
Expand Down
2 changes: 1 addition & 1 deletion firmware/src/extensions/ScreenshotExtension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ void ScreenshotExtension::transmit()
void ScreenshotExtension::onReceive(JsonObjectConst payload,
std::string_view source) // NOLINT(misc-unused-parameters)
{
// Pull
// Action: Pull
if (payload["action"].is<std::string_view>() && payload["action"].as<std::string_view>() == "pull")
{
pending = true;
Expand Down
2 changes: 1 addition & 1 deletion firmware/src/extensions/ServerSentEventsExtension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ void ServerSentEventsExtension::onTransmit(JsonObjectConst payload, std::string_
const size_t length = measureJson(payload);
std::vector<char> message(length + 1);
serializeJson(payload, message.data(), length + 1);
events.send(message.data(), source.data());
events.send(message.data(), std::string(source).c_str());
}

void ServerSentEventsExtension::onConnect(AsyncEventSourceClient *client)
Expand Down
2 changes: 1 addition & 1 deletion firmware/src/extensions/SignalExtension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ void SignalExtension::onReceive(JsonObjectConst payload,
}
}
signals.push_back(sign);
ESP_LOGD("Queue", "received"); // NOLINT(cppcoreguidelines-pro-type-vararg)
ESP_LOGD("Queue", "received"); // NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg)
}
}

Expand Down
2 changes: 1 addition & 1 deletion firmware/src/extensions/StatusLedExtension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include "config/constants.h" // NOLINT(misc-include-cleaner)

#include <WiFi.h>
#include <WiFi.h> // NOLINT(misc-include-cleaner)

void StatusLedExtension::configure() { pinMode(PIN_LED, OUTPUT); }

Expand Down
4 changes: 2 additions & 2 deletions firmware/src/handlers/WeatherHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ std::optional<WeatherHandler::Conditions> WeatherHandler::getCondition(uint8_t c
return codeset.condition;
}
}
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg)
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg,hicpp-vararg)
ESP_LOGD("Response", "unknown condition code %d", code);
return std::nullopt;
}
Expand All @@ -103,7 +103,7 @@ std::optional<WeatherHandler::Conditions> WeatherHandler::getCondition(uint16_t
return codeset.condition;
}
}
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg)
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg,hicpp-vararg)
ESP_LOGD("Response", "unknown condition code %d", code);
return std::nullopt;
}
Expand Down
2 changes: 1 addition & 1 deletion firmware/src/middlewares/GoogleWeatherMiddleware.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void GoogleWeatherMiddleware::update(std::optional<WeatherHandler::Conditions> &
doc["temperature"]["degrees"].is<float>() && doc["weatherCondition"]["type"].is<std::string_view>())
{
condition = getCondition(doc["weatherCondition"]["type"].as<std::string_view>(), codesets);
temperature = static_cast<int16_t>(roundf(doc["temperature"]["degrees"].as<float>()));
temperature = static_cast<int16_t>(lroundf(doc["temperature"]["degrees"].as<float>()));
return;
}
queries.pop_back();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void HomeAssistantWeatherMiddleware::update(std::optional<WeatherHandler::Condit
doc["attributes"]["temperature"].is<float>() && doc["state"].is<std::string_view>())
{
condition = getCondition(doc["state"].as<std::string_view>(), codesets);
temperature = static_cast<int16_t>(roundf(doc["attributes"]["temperature"].as<float>()));
temperature = static_cast<int16_t>(lroundf(doc["attributes"]["temperature"].as<float>()));
return;
}
paths.pop_back();
Expand Down
2 changes: 1 addition & 1 deletion firmware/src/middlewares/OpenMeteoMiddleware.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ void OpenMeteoMiddleware::update(std::optional<WeatherHandler::Conditions> &cond
doc["current"]["temperature_2m"].is<float>() && doc["current"]["weather_code"].is<uint8_t>())
{
condition = getCondition(doc["current"]["weather_code"].as<uint8_t>(), codesets);
temperature = static_cast<int16_t>(roundf(doc["current"]["temperature_2m"].as<float>()));
temperature = static_cast<int16_t>(lroundf(doc["current"]["temperature_2m"].as<float>()));
return;
}
parts.pop_back();
Expand Down
4 changes: 2 additions & 2 deletions firmware/src/middlewares/OpenWeatherMiddleware.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ void OpenWeatherMiddleware::update(std::optional<WeatherHandler::Conditions> &co
{
// API 2.5
condition = getCondition(doc["weather"][0]["id"].as<uint16_t>(), codesets);
temperature = static_cast<int16_t>(roundf(doc["main"]["temp"].as<float>()));
temperature = static_cast<int16_t>(lroundf(doc["main"]["temp"].as<float>()));
return;
}
if (deserialization && doc["current"]["temp"].is<float>() && doc["current"]["weather"]["id"].is<uint16_t>())
{
// API 3.0
condition = getCondition(doc["current"]["weather"]["id"].as<uint16_t>(), codesets);
temperature = static_cast<int16_t>(roundf(doc["current"]["temp"].as<float>()));
temperature = static_cast<int16_t>(lroundf(doc["current"]["temp"].as<float>()));
return;
}
parts.pop_back();
Expand Down
2 changes: 1 addition & 1 deletion firmware/src/middlewares/YrMiddleware.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ void YrMiddleware::update(std::optional<WeatherHandler::Conditions> &condition,
doc["properties"]["timeseries"][0]["data"]["next_1_hours"]["summary"]["symbol_code"].as<std::string_view>(),
codesets);
temperature = static_cast<int16_t>(
roundf(doc["properties"]["timeseries"][0]["data"]["instant"]["details"]["air_temperature"].as<float>()));
lroundf(doc["properties"]["timeseries"][0]["data"]["instant"]["details"]["air_temperature"].as<float>()));
return;
}
paths.pop_back();
Expand Down
4 changes: 2 additions & 2 deletions firmware/src/modes/AnimationMode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ void AnimationMode::transmit(uint8_t index, std::span<const uint8_t> frame)
void AnimationMode::onReceive(JsonObjectConst payload,
std::string_view source) // NOLINT(misc-unused-parameters)
{
// Action: pull
if (payload["action"].is<const char *>() && !strcmp(payload["action"].as<const char *>(), "pull"))
// Action: Pull
if (payload["action"].is<std::string_view>() && payload["action"].as<std::string_view>() == "pull")
{
lastMillis = millis() + (GRID_COLUMNS * GRID_ROWS);
index = 0;
Expand Down
Loading
Loading