diff --git a/src/BridgeProps.cpp b/src/BridgeProps.cpp index 00dd7e5..5763c87 100644 --- a/src/BridgeProps.cpp +++ b/src/BridgeProps.cpp @@ -11,7 +11,7 @@ #include "BridgeProps.h" BridgeProps::BridgeProps(const char* client_id, const char* in_box, const char* out_box, const char* broker, const int port) - : Props(client_id, in_box, out_box, broker, port) + : Props(client_id, in_box, out_box, broker, port) { _client.setClient(_bridgeClient); } @@ -23,7 +23,7 @@ void BridgeProps::begin(void(*on_message)(String)) void BridgeProps::setBrokerIpAddress(IPAddress ip, uint16_t port) { - _brokerIpAddress = ip; + _brokerIpAddress = ip; _client.setServer(_brokerIpAddress, port); } diff --git a/src/BridgeProps.h b/src/BridgeProps.h index e8738e3..c72cdff 100644 --- a/src/BridgeProps.h +++ b/src/BridgeProps.h @@ -19,7 +19,7 @@ class BridgeProps : public Props public: BridgeProps(const char*, const char*, const char*, const char*, const int); void begin(void(*)(String) = NULL); - void setBrokerIpAddress(IPAddress, uint16_t port = 1883); + void setBrokerIpAddress(IPAddress, uint16_t port = 1883); private: BridgeClient _bridgeClient; diff --git a/src/EthernetProps.cpp b/src/EthernetProps.cpp index bbf2b7a..f5160ca 100644 --- a/src/EthernetProps.cpp +++ b/src/EthernetProps.cpp @@ -11,12 +11,12 @@ #include "EthernetProps.h" EthernetProps::EthernetProps(const char* client_id, const char* in_box, const char* out_box, const char* broker, const int port) - : Props(client_id, in_box, out_box, broker, port) + : Props(client_id, in_box, out_box, broker, port) { - _client.setClient(_ethernetClient); + _client.setClient(_ethernetClient); } void EthernetProps::begin(void(*on_message)(String)) { - if (on_message) onInboxMessageReceived = on_message; + if (on_message) onInboxMessageReceived = on_message; } diff --git a/src/EthernetProps.h b/src/EthernetProps.h index 332c8d6..d649baa 100644 --- a/src/EthernetProps.h +++ b/src/EthernetProps.h @@ -23,7 +23,7 @@ class EthernetProps : public Props void begin(void(*)(String) = NULL); private: - EthernetClient _ethernetClient; + EthernetClient _ethernetClient; }; #endif diff --git a/src/Props.cpp b/src/Props.cpp index d836453..cdd0b82 100644 --- a/src/Props.cpp +++ b/src/Props.cpp @@ -101,10 +101,10 @@ void Props::checkDataChanges() void Props::resetMcu() { #if defined(ARDUINO_ARCH_SAMD) - NVIC_SystemReset(); + NVIC_SystemReset(); #elif defined(ARDUINO_ARCH_AVR) || defined(__AVR__) - wdt_enable(WDTO_15MS); - while (true); + wdt_enable(WDTO_15MS); + while (true); #endif } @@ -112,8 +112,8 @@ void Props::sendAllData() { String data("DATA "), str; for (int i = 0; i < _dataTable.Count(); i++) { - str = _dataTable[i]->fetch(); - send(&data, &str); + str = _dataTable[i]->fetch(); + send(&data, &str); } if (data.length() > 5) { @@ -125,8 +125,8 @@ void Props::sendDataChanges() { String data("DATA "), str; for (int i = 0; i < _dataTable.Count(); i++) { - str = _dataTable[i]->fetchChange(); - send(&data, &str); + str = _dataTable[i]->fetchChange(); + send(&data, &str); } if (data.length() > 5) { @@ -190,10 +190,10 @@ void Props::sendRequ(String action, char* topic) { void Props::resetIntervals(const int changes, const int silent) { - _nextReconAttempt = 0; - _dataSentCount = 0; - _maximumSilentPeriod = silent; // seconds - _sendDataAction.reset(changes); // milliseconds + _nextReconAttempt = 0; + _dataSentCount = 0; + _maximumSilentPeriod = silent; // seconds + _sendDataAction.reset(changes); // milliseconds } diff --git a/src/Props.h b/src/Props.h index 991af08..3800152 100644 --- a/src/Props.h +++ b/src/Props.h @@ -52,12 +52,12 @@ class Props { public: Props(const char*, const char*, const char*, const char*, const int=1883); - virtual void begin(void(*)(String) = NULL) = 0; + virtual void begin(void(*)(String) = NULL) = 0; void addData(PropsData*); - void loop(); - void resetIntervals(const int changes, const int silent); - void resetMcu(); - void sendAllData(); + void loop(); + void resetIntervals(const int changes, const int silent); + void resetMcu(); + void sendAllData(); void sendDataChanges(); void sendData(String); // only in outbox void sendDone(String); @@ -67,7 +67,7 @@ class Props void sendOver(String); void sendProg(String); void sendRequ(String); - void sendRequ(String, char*); + void sendRequ(String, char*); static void (*onInboxMessageReceived)(String); @@ -87,7 +87,7 @@ class Props unsigned long _nextReconAttempt; uint8_t _payloadMax; PropsAction _sendDataAction; - List _dataTable; + List _dataTable; }; #endif diff --git a/src/WifiProps.cpp b/src/WifiProps.cpp index e37013f..d0aa230 100644 --- a/src/WifiProps.cpp +++ b/src/WifiProps.cpp @@ -17,12 +17,12 @@ WifiProps::WifiProps(const char* client_id, const char* in_box, const char* out_box, const char* broker, const int port) : Props(client_id, in_box, out_box, broker, port) { - _client.setClient(_wifiClient); + _client.setClient(_wifiClient); } void WifiProps::begin(void(*on_message)(String)) { - if (on_message) onInboxMessageReceived = on_message; + if (on_message) onInboxMessageReceived = on_message; } diff --git a/src/WifiProps.h b/src/WifiProps.h index 04e5f37..2c8cd92 100644 --- a/src/WifiProps.h +++ b/src/WifiProps.h @@ -27,7 +27,7 @@ class WifiProps : public Props void begin(void(*)(String) = NULL); private: - WiFiClient _wifiClient; + WiFiClient _wifiClient; }; #endif