From 83b3af58f7309652407d51bddeb842f7f8cf67ae Mon Sep 17 00:00:00 2001 From: Torrie Fischer Date: Sat, 23 Dec 2023 11:12:02 +0100 Subject: [PATCH] logservice: fix build --- src/LogService.cpp | 55 +--------------------------------------------- src/LogService.h | 1 - 2 files changed, 1 insertion(+), 55 deletions(-) diff --git a/src/LogService.cpp b/src/LogService.cpp index eb22ceb..4750c8b 100644 --- a/src/LogService.cpp +++ b/src/LogService.cpp @@ -4,59 +4,6 @@ static const char* eventValue(const InputEvent& evt); -const char* -LogService::intentName(InputEvent::Intent intent) -{ - switch(intent) { - case InputEvent::BeatDetect: - return "beat-detection"; - case InputEvent::Beat: - return "beat"; - case InputEvent::ReadyToRoll: - return "ready-to-roll"; - case InputEvent::PowerToggle: - return "power-toggle"; - case InputEvent::SetPower: - return "set-power"; - case InputEvent::PreviousPattern: - return "previous-pattern"; - case InputEvent::NextPattern: - return "next-pattern"; - case InputEvent::SetPattern: - return "set-pattern"; - case InputEvent::SetScene: - return "set-scene"; - case InputEvent::SetColor: - return "set-color"; - case InputEvent::Acceleration: - return "acceleration"; - case InputEvent::UserInput: - return "user"; - case InputEvent::SetBrightness: - return "set-brightness"; - case InputEvent::FirmwareUpdate: - return "firmware-update"; - case InputEvent::NetworkStatus: - return "network-status"; - case InputEvent::NetworkActivity: - return "network-activity"; - case InputEvent::StartThing: - return "start-thing"; - case InputEvent::StopThing: - return "stop-thing"; - case InputEvent::SetDisplayOffset: - return "set-display-offset"; - case InputEvent::SetDisplayLength: - return "set-display-length"; - case InputEvent::SaveConfigurationRequest: - return "save-configuration"; - case InputEvent::ConfigurationChanged: - return "configuration-changed"; - default: - return NULL; - } -} - char LogService::s_valueBuf[255]; const char* @@ -86,7 +33,7 @@ LogService::handleEvent(const InputEvent& evt) { if (m_duplicateEvents > 0) { Log.trace("Suppressed reporting %d duplicate events.", m_duplicateEvents); } - const char* sourceName = intentName(evt.intent);; + const char* sourceName = evt.name(); const char* valueBuf = eventValue(evt); if (sourceName == 0) { Log.trace("Event: intent: %d value: %s", evt.intent, valueBuf); diff --git a/src/LogService.h b/src/LogService.h index cdb2c82..e227683 100644 --- a/src/LogService.h +++ b/src/LogService.h @@ -6,7 +6,6 @@ class LogService : public Task { void handleEvent(const InputEvent& event) override; void loop() override {} - static const char* intentName(InputEvent::Intent intent); static const char* eventValue(const InputEvent& evt); private: