Consistency fixes (#167)

Minor consistency fixes from @proddy's comments
This commit is contained in:
rjwats
2020-07-07 00:13:38 +01:00
committed by GitHub
parent 1f07dcdab2
commit f2b53a6d53
14 changed files with 38 additions and 37 deletions

View File

@ -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() {

View File

@ -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