logservice: fix build

This commit is contained in:
Torrie Fischer 2023-12-23 11:12:02 +01:00
parent 0d3bcb4267
commit 83b3af58f7
2 changed files with 1 additions and 55 deletions

View File

@ -4,59 +4,6 @@
static const char* eventValue(const InputEvent& evt); 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]; char LogService::s_valueBuf[255];
const char* const char*
@ -86,7 +33,7 @@ LogService::handleEvent(const InputEvent& evt) {
if (m_duplicateEvents > 0) { if (m_duplicateEvents > 0) {
Log.trace("Suppressed reporting %d duplicate events.", m_duplicateEvents); 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); const char* valueBuf = eventValue(evt);
if (sourceName == 0) { if (sourceName == 0) {
Log.trace("Event: intent: %d value: %s", evt.intent, valueBuf); Log.trace("Event: intent: %d value: %s", evt.intent, valueBuf);

View File

@ -6,7 +6,6 @@ class LogService : public Task {
void handleEvent(const InputEvent& event) override; void handleEvent(const InputEvent& event) override;
void loop() override {} void loop() override {}
static const char* intentName(InputEvent::Intent intent);
static const char* eventValue(const InputEvent& evt); static const char* eventValue(const InputEvent& evt);
private: private: