Skip to content

Commit

Permalink
Merge pull request letscontrolit#5002 from TD-er/bugfix/install_pygit2
Browse files Browse the repository at this point in the history
[PlatformIO] Fix installing pygit2
  • Loading branch information
TD-er authored Mar 9, 2024
2 parents 87c1d6a + 92383a8 commit 8cf9050
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
3 changes: 2 additions & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion platformio_core_defs.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/src/PluginStructs/P022_data_struct.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
10 changes: 10 additions & 0 deletions tools/pio/install-requirements.py
Original file line number Diff line number Diff line change
@@ -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")

0 comments on commit 8cf9050

Please sign in to comment.