Consistency fixes (#167)
Minor consistency fixes from @proddy's comments
This commit is contained in:
@ -21,8 +21,8 @@ LightStateService::LightStateService(AsyncWebServer* server,
|
||||
AuthenticationPredicates::IS_AUTHENTICATED),
|
||||
_mqttClient(mqttClient),
|
||||
_lightMqttSettingsService(lightMqttSettingsService) {
|
||||
// configure blink led to be output
|
||||
pinMode(BLINK_LED, OUTPUT);
|
||||
// configure led to be output
|
||||
pinMode(LED_PIN, OUTPUT);
|
||||
|
||||
// configure MQTT callback
|
||||
_mqttClient->onConnect(std::bind(&LightStateService::registerConfig, this));
|
||||
@ -40,7 +40,7 @@ void LightStateService::begin() {
|
||||
}
|
||||
|
||||
void LightStateService::onConfigUpdated() {
|
||||
digitalWrite(BLINK_LED, _state.ledOn ? LED_ON : LED_OFF);
|
||||
digitalWrite(LED_PIN, _state.ledOn ? LED_ON : LED_OFF);
|
||||
}
|
||||
|
||||
void LightStateService::registerConfig() {
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include <MqttPubSub.h>
|
||||
#include <WebSocketTxRx.h>
|
||||
|
||||
#define BLINK_LED 2
|
||||
#define LED_PIN 2
|
||||
#define PRINT_DELAY 5000
|
||||
|
||||
#define DEFAULT_LED_STATE false
|
||||
|
Reference in New Issue
Block a user