added '#ifdef USE_ARDUINO' for clang-tidy check with IDF framework

This commit is contained in:
jota29 2023-03-15 15:55:20 +00:00
parent 8e1d40877c
commit b49e5b575a
17 changed files with 68 additions and 1 deletions

View file

@ -1,3 +1,5 @@
#ifdef USE_ARDUINO
#include "esphome/core/defines.h" #include "esphome/core/defines.h"
#include "optolink.h" #include "optolink.h"
#include "VitoWiFi.h" #include "VitoWiFi.h"
@ -76,3 +78,5 @@ size_t Optolink::write(uint8_t ch) {
} // namespace optolink } // namespace optolink
} // namespace esphome } // namespace esphome
#endif

View file

@ -1,5 +1,7 @@
#pragma once #pragma once
#ifdef USE_ARDUINO
#include "esphome/core/component.h" #include "esphome/core/component.h"
#include "esphome/components/sensor/sensor.h" #include "esphome/components/sensor/sensor.h"
#include "esphome/components/binary_sensor/binary_sensor.h" #include "esphome/components/binary_sensor/binary_sensor.h"
@ -39,3 +41,5 @@ class Optolink : public esphome::Component, public Print {
} // namespace optolink } // namespace optolink
} // namespace esphome } // namespace esphome
#endif

View file

@ -1,5 +1,7 @@
#pragma once #pragma once
#ifdef USE_ARDUINO
#include "esphome/components/binary_sensor/binary_sensor.h" #include "esphome/components/binary_sensor/binary_sensor.h"
#include "optolink.h" #include "optolink.h"
#include "optolink_sensor_base.h" #include "optolink_sensor_base.h"
@ -26,3 +28,5 @@ class OptolinkBinarySensor : public OptolinkSensorBase,
}; };
} // namespace optolink } // namespace optolink
} // namespace esphome } // namespace esphome
#endif

View file

@ -1,3 +1,5 @@
#ifdef USE_ARDUINO
#include "esphome/core/log.h" #include "esphome/core/log.h"
#include "optolink_device_info_sensor.h" #include "optolink_device_info_sensor.h"
@ -20,3 +22,5 @@ void OptolinkDeviceInfoSensor::setup() {
} }
} // namespace optolink } // namespace optolink
} // namespace esphome } // namespace esphome
#endif

View file

@ -1,5 +1,7 @@
#pragma once #pragma once
#ifdef USE_ARDUINO
#include "esphome/components/text_sensor/text_sensor.h" #include "esphome/components/text_sensor/text_sensor.h"
#include "optolink.h" #include "optolink.h"
#include "optolink_sensor_base.h" #include "optolink_sensor_base.h"
@ -28,3 +30,5 @@ class OptolinkDeviceInfoSensor : public esphome::text_sensor::TextSensor, public
} // namespace optolink } // namespace optolink
} // namespace esphome } // namespace esphome
#endif

View file

@ -1,3 +1,5 @@
#ifdef USE_ARDUINO
#include "optolink_number.h" #include "optolink_number.h"
#include "optolink.h" #include "optolink.h"
#include "VitoWiFi.h" #include "VitoWiFi.h"
@ -18,3 +20,5 @@ void OptolinkNumber::control(float value) {
} // namespace optolink } // namespace optolink
} // namespace esphome } // namespace esphome
#endif

View file

@ -1,5 +1,7 @@
#pragma once #pragma once
#ifdef USE_ARDUINO
#include "esphome/components/number/number.h" #include "esphome/components/number/number.h"
#include "optolink_sensor_base.h" #include "optolink_sensor_base.h"
#include "optolink.h" #include "optolink.h"
@ -24,3 +26,5 @@ class OptolinkNumber : public OptolinkSensorBase, public esphome::number::Number
} // namespace optolink } // namespace optolink
} // namespace esphome } // namespace esphome
#endif

View file

@ -1,3 +1,5 @@
#ifdef USE_ARDUINO
#include "optolink_select.h" #include "optolink_select.h"
#include "optolink.h" #include "optolink.h"
#include "VitoWiFi.h" #include "VitoWiFi.h"
@ -39,3 +41,5 @@ void OptolinkSelect::value_changed(float state) {
} // namespace optolink } // namespace optolink
} // namespace esphome } // namespace esphome
#endif

View file

@ -1,5 +1,7 @@
#pragma once #pragma once
#ifdef USE_ARDUINO
#include <map> #include <map>
#include "esphome/components/select/select.h" #include "esphome/components/select/select.h"
#include "optolink.h" #include "optolink.h"
@ -37,3 +39,5 @@ class OptolinkSelect : public OptolinkSensorBase, public esphome::select::Select
} // namespace optolink } // namespace optolink
} // namespace esphome } // namespace esphome
#endif

View file

@ -1,5 +1,7 @@
#pragma once #pragma once
#ifdef USE_ARDUINO
#include "esphome/components/sensor/sensor.h" #include "esphome/components/sensor/sensor.h"
#include "optolink.h" #include "optolink.h"
#include "optolink_sensor_base.h" #include "optolink_sensor_base.h"
@ -23,3 +25,5 @@ class OptolinkSensor : public OptolinkSensorBase, public esphome::sensor::Sensor
}; };
} // namespace optolink } // namespace optolink
} // namespace esphome } // namespace esphome
#endif

View file

@ -1,3 +1,5 @@
#ifdef USE_ARDUINO
#include "optolink_sensor_base.h" #include "optolink_sensor_base.h"
#include "optolink.h" #include "optolink.h"
@ -160,3 +162,5 @@ DPValue conv2_100_F::decode(const uint8_t *in) {
} // namespace optolink } // namespace optolink
} // namespace esphome } // namespace esphome
#endif

View file

@ -1,6 +1,7 @@
#pragma once #pragma once
#ifdef USE_ARDUINO
#include "esphome/core/log.h" #include "esphome/core/log.h"
#include "VitoWiFi.h" #include "VitoWiFi.h"
@ -46,3 +47,5 @@ class conv2_100_F : public DPType {
} // namespace optolink } // namespace optolink
} // namespace esphome } // namespace esphome
#endif

View file

@ -1,5 +1,7 @@
#pragma once #pragma once
#ifdef USE_ARDUINO
#include "esphome/components/text_sensor/text_sensor.h" #include "esphome/components/text_sensor/text_sensor.h"
#include "optolink.h" #include "optolink.h"
#include "optolink_sensor_base.h" #include "optolink_sensor_base.h"
@ -26,3 +28,5 @@ class OptolinkStateSensor : public esphome::text_sensor::TextSensor, public esph
}; };
} // namespace optolink } // namespace optolink
} // namespace esphome } // namespace esphome
#endif

View file

@ -1,3 +1,5 @@
#ifdef USE_ARDUINO
#include "optolink_switch.h" #include "optolink_switch.h"
#include "optolink.h" #include "optolink.h"
#include "VitoWiFi.h" #include "VitoWiFi.h"
@ -18,3 +20,5 @@ void OptolinkSwitch::write_state(bool value) {
} // namespace optolink } // namespace optolink
} // namespace esphome } // namespace esphome
#endif

View file

@ -1,5 +1,7 @@
#pragma once #pragma once
#ifdef USE_ARDUINO
#include "esphome/components/switch/switch.h" #include "esphome/components/switch/switch.h"
#include "optolink_sensor_base.h" #include "optolink_sensor_base.h"
#include "optolink.h" #include "optolink.h"
@ -27,3 +29,5 @@ class OptolinkSwitch : public OptolinkSensorBase, public esphome::switch_::Switc
} // namespace optolink } // namespace optolink
} // namespace esphome } // namespace esphome
#endif

View file

@ -1,3 +1,5 @@
#ifdef USE_ARDUINO
#include "optolink_text_sensor.h" #include "optolink_text_sensor.h"
#include "optolink.h" #include "optolink.h"
#include "VitoWiFi.h" #include "VitoWiFi.h"
@ -23,3 +25,5 @@ void OptolinkTextSensor::setup() {
} // namespace optolink } // namespace optolink
} // namespace esphome } // namespace esphome
#endif

View file

@ -1,5 +1,7 @@
#pragma once #pragma once
#ifdef USE_ARDUINO
#include "esphome/components/text_sensor/text_sensor.h" #include "esphome/components/text_sensor/text_sensor.h"
#include "optolink.h" #include "optolink.h"
#include "optolink_sensor_base.h" #include "optolink_sensor_base.h"
@ -29,3 +31,5 @@ class OptolinkTextSensor : public OptolinkSensorBase,
} // namespace optolink } // namespace optolink
} // namespace esphome } // namespace esphome
#endif