More or less consistent .editorconfig

master
informatic 2016-10-04 21:06:45 +02:00
parent 21750d32d7
commit 81306827ad
6 changed files with 34 additions and 24 deletions

12
.editorconfig Normal file
View File

@ -0,0 +1,12 @@
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
[*.{c,h,cpp}]
indent_style = spaces
indent_size = 4

View File

@ -48,8 +48,8 @@ private:
bool currentValue; bool currentValue;
public: public:
OutputEndpoint(int _pin, bool _inverted = false) : OutputEndpoint(int _pin, bool _inverted = false) : Endpoint("output"),
Endpoint("output"), pin(_pin), inverted(_inverted), currentValue(inverted) { pin(_pin), inverted(_inverted), currentValue(inverted) {
pinMode(pin, OUTPUT); pinMode(pin, OUTPUT);
digitalWrite(pin, currentValue); digitalWrite(pin, currentValue);
} }

View File

@ -21,8 +21,7 @@ void SpejsNode::init() {
WifiStation.config(WIFI_SSID, WIFI_PWD); WifiStation.config(WIFI_SSID, WIFI_PWD);
WifiStation.waitConnection( WifiStation.waitConnection(
ConnectionDelegate(&SpejsNode::onConnected, this), ConnectionDelegate(&SpejsNode::onConnected, this), 20, *[] {
20, *[] {
Serial.println("Connection failed"); Serial.println("Connection failed");
}); });

View File

@ -30,8 +30,7 @@ protected:
public: public:
SpejsNode(String _deviceType) : SpejsNode(String _deviceType) :
mqtt(MQTT_BROKER, MQTT_PORT, MqttStringSubscriptionCallback(&SpejsNode::mqttCallback, this)), mqtt(MQTT_BROKER, MQTT_PORT, MqttStringSubscriptionCallback(&SpejsNode::mqttCallback, this)),
deviceType(_deviceType) deviceType(_deviceType) {};
{};
void init(); void init();