feat: logging service
This commit is contained in:
@@ -82,7 +82,8 @@ void NeoPatternService::handleControlRequest(AsyncWebServerRequest* request) {
|
||||
|
||||
if (request->hasParam("brightness", true)) {
|
||||
int b = request->getParam("brightness", true)->value().toInt();
|
||||
if (b < 0) b = 0; if (b > 255) b = 255;
|
||||
if (b < 0) b = 0;
|
||||
if (b > 255) b = 255;
|
||||
setBrightness((uint8_t)b);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include <Arduino.h>
|
||||
#include "spore/Spore.h"
|
||||
#include "spore/services/LoggingService.h"
|
||||
#include "NeoPatternService.h"
|
||||
|
||||
#ifndef LED_STRIP_PIN
|
||||
@@ -36,7 +37,7 @@ void setup() {
|
||||
// Start the API server and complete initialization
|
||||
spore.begin();
|
||||
|
||||
Serial.println("[Main] NeoPattern service registered and ready!");
|
||||
LOG_INFO(spore.getContext(), "Main", "NeoPattern service registered and ready!");
|
||||
}
|
||||
|
||||
void loop() {
|
||||
|
||||
Reference in New Issue
Block a user