Fixed PlatformIO Build on DEV (#4422)

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
Expaso 2023-02-13 03:43:52 +01:00 committed by GitHub
parent 78f5c417a4
commit 7a2d7fdd19
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 32 additions and 12 deletions

View file

@ -1,3 +1,5 @@
#ifdef USE_ESP32
#include "bedjet_hub.h" #include "bedjet_hub.h"
#include "bedjet_child.h" #include "bedjet_child.h"
#include "bedjet_const.h" #include "bedjet_const.h"
@ -541,3 +543,5 @@ void BedJetHub::register_child(BedJetClient *obj) {
} // namespace bedjet } // namespace bedjet
} // namespace esphome } // namespace esphome
#endif

View file

@ -1,4 +1,5 @@
#pragma once #pragma once
#ifdef USE_ESP32
#include "esphome/components/ble_client/ble_client.h" #include "esphome/components/ble_client/ble_client.h"
#include "esphome/components/esp32_ble_tracker/esp32_ble_tracker.h" #include "esphome/components/esp32_ble_tracker/esp32_ble_tracker.h"
@ -14,8 +15,6 @@
#include "esphome/components/time/real_time_clock.h" #include "esphome/components/time/real_time_clock.h"
#endif #endif
#ifdef USE_ESP32
#include <esp_gattc_api.h> #include <esp_gattc_api.h>
namespace esphome { namespace esphome {

View file

@ -1,3 +1,5 @@
#ifdef USE_ESP32
#include "automation.h" #include "automation.h"
#include <esp_bt_defs.h> #include <esp_bt_defs.h>
@ -73,3 +75,5 @@ void BLEWriterClientNode::gattc_event_handler(esp_gattc_cb_event_t event, esp_ga
} // namespace ble_client } // namespace ble_client
} // namespace esphome } // namespace esphome
#endif

View file

@ -1,13 +1,13 @@
#pragma once #pragma once
#ifdef USE_ESP32
#include <utility> #include <utility>
#include <vector> #include <vector>
#include "esphome/core/automation.h" #include "esphome/core/automation.h"
#include "esphome/components/ble_client/ble_client.h" #include "esphome/components/ble_client/ble_client.h"
#ifdef USE_ESP32
namespace esphome { namespace esphome {
namespace ble_client { namespace ble_client {
class BLEClientConnectTrigger : public Trigger<>, public BLEClientNode { class BLEClientConnectTrigger : public Trigger<>, public BLEClientNode {

View file

@ -1,15 +1,25 @@
# Source https://github.com/letscontrolit/ESPEasy/pull/3845#issuecomment-1005864664 # Source https://github.com/letscontrolit/ESPEasy/pull/3845#issuecomment-1005864664
import os
if os.environ.get("ESPHOME_USE_SUBPROCESS") is None:
import esptool
else:
import subprocess
from SCons.Script import ARGUMENTS
# pylint: disable=E0602 # pylint: disable=E0602
Import("env") # noqa Import("env") # noqa
import os
import shutil
if os.environ.get("ESPHOME_USE_SUBPROCESS") is None:
try:
import esptool
except ImportError:
env.Execute("$PYTHONEXE -m pip install esptool")
else:
import subprocess
from SCons.Script import ARGUMENTS
# Copy over the default sdkconfig.
from os import path
if path.exists("./sdkconfig.defaults"):
os.makedirs(".temp", exist_ok=True)
shutil.copy("./sdkconfig.defaults", "./.temp/sdkconfig-esp32-idf")
def esp32_create_combined_bin(source, target, env): def esp32_create_combined_bin(source, target, env):
verbose = bool(int(ARGUMENTS.get("PIOVERBOSE", "0"))) verbose = bool(int(ARGUMENTS.get("PIOVERBOSE", "0")))

View file

@ -3,6 +3,7 @@
#include "mqtt_const.h" #include "mqtt_const.h"
#ifdef USE_JSON
#ifdef USE_MQTT #ifdef USE_MQTT
#ifdef USE_LIGHT #ifdef USE_LIGHT
@ -83,3 +84,4 @@ void MQTTJSONLightComponent::dump_config() {
#endif #endif
#endif // USE_MQTT #endif // USE_MQTT
#endif // USE_JSON

View file

@ -25,6 +25,7 @@
#define USE_FAN #define USE_FAN
#define USE_GRAPH #define USE_GRAPH
#define USE_HOMEASSISTANT_TIME #define USE_HOMEASSISTANT_TIME
#define USE_JSON
#define USE_LIGHT #define USE_LIGHT
#define USE_LOCK #define USE_LOCK
#define USE_LOGGER #define USE_LOGGER
@ -50,7 +51,6 @@
// Arduino-specific feature flags // Arduino-specific feature flags
#ifdef USE_ARDUINO #ifdef USE_ARDUINO
#define USE_CAPTIVE_PORTAL #define USE_CAPTIVE_PORTAL
#define USE_JSON
#define USE_NEXTION_TFT_UPLOAD #define USE_NEXTION_TFT_UPLOAD
#define USE_PROMETHEUS #define USE_PROMETHEUS
#define USE_WEBSERVER #define USE_WEBSERVER

View file

@ -185,6 +185,7 @@ build_flags =
[env:esp32-arduino] [env:esp32-arduino]
extends = common:esp32-arduino extends = common:esp32-arduino
board = esp32dev board = esp32dev
board_build.partitions = huge_app.csv
build_flags = build_flags =
${common:esp32-arduino.build_flags} ${common:esp32-arduino.build_flags}
${flags:runtime.build_flags} ${flags:runtime.build_flags}