diff --git a/platformio.ini b/platformio.ini index 1024041df2..99ae1396c0 100644 --- a/platformio.ini +++ b/platformio.ini @@ -75,7 +75,8 @@ build_flags = build_flags = -DMQTT_MAX_PACKET_SIZE=1024 [extra_scripts_default] -extra_scripts = pre:tools/pio/set-ci-defines.py +extra_scripts = pre:tools/pio/install-requirements.py + pre:tools/pio/set-ci-defines.py pre:tools/pio/generate-compiletime-defines.py tools/pio/copy_files.py diff --git a/platformio_core_defs.ini b/platformio_core_defs.ini index afacd0cfcb..7d1b581d00 100644 --- a/platformio_core_defs.ini +++ b/platformio_core_defs.ini @@ -217,7 +217,7 @@ build_flags = -DESP32_STAGE -DLIBRARIES_NO_LOG=1 -DDISABLE_SC16IS752_SPI -DCONFIG_PM_ENABLE - -DCONFIG_LWIP_L2_TO_L3_COPY +; -DCONFIG_LWIP_L2_TO_L3_COPY -DETH_SPI_SUPPORTS_NO_IRQ=1 -DCONFIG_FREERTOS_USE_TICKLESS_IDLE=1 -DCONFIG_FREERTOS_IDLE_TIME_BEFORE_SLEEP=3 diff --git a/src/src/PluginStructs/P022_data_struct.cpp b/src/src/PluginStructs/P022_data_struct.cpp index e0359870f9..d4c4295736 100644 --- a/src/src/PluginStructs/P022_data_struct.cpp +++ b/src/src/PluginStructs/P022_data_struct.cpp @@ -107,7 +107,7 @@ void P022_data_struct::Plugin_022_initialize(int address) // default mode is open drain output, drive leds connected to VCC Plugin_022_writeRegister(i2cAddress, PLUGIN_022_PCA9685_MODE1, (uint8_t)0x01); // reset the device delay(1); - Plugin_022_writeRegister(i2cAddress, PLUGIN_022_PCA9685_MODE1, (uint8_t)B10100000); // set up for auto increment + Plugin_022_writeRegister(i2cAddress, PLUGIN_022_PCA9685_MODE1, (uint8_t)0b10100000); // set up for auto increment // Plugin_022_writeRegister(i2cAddress, PCA9685_MODE2, (uint8_t)0x10); // set to output p022_set_init(address); } diff --git a/tools/pio/install-requirements.py b/tools/pio/install-requirements.py new file mode 100644 index 0000000000..1ea4839572 --- /dev/null +++ b/tools/pio/install-requirements.py @@ -0,0 +1,10 @@ +Import("env") + + +# ToDo: Use suggested code by Jason2866 +# https://github.com/letscontrolit/ESPEasy/issues/4943#issuecomment-1986831198 + +try: + from pygit2 import Repository +except ImportError: + env.Execute("$PYTHONEXE -m pip install -r requirements.txt")