More or less consistent .editorconfig
parent
21750d32d7
commit
81306827ad
|
@ -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
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue