From 55748516ca24395656192dc25f53c2ff9a3884cb Mon Sep 17 00:00:00 2001 From: Pavels Veretennikovs Date: Sun, 26 Feb 2023 10:06:32 +0200 Subject: [PATCH] feat(firmware): add build for 0.11, identical to 0.10 --- .github/workflows/ci.yaml | 9 +++++ Firmware/LowLevel/platformio.ini | 56 +++++++++++++++++++------------- Firmware/LowLevel/src/pins.h | 4 +-- 3 files changed, 45 insertions(+), 24 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 11c9c404..66c8d9b1 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -48,12 +48,21 @@ jobs: - name: Copy Artifacts run: | mkdir artifacts + + mkdir ./artifacts/0_11_X_MPU9250 + cp Firmware/LowLevel/.pio/build/0_11_X_MPU9250/firmware.elf ./artifacts/0_11_X_MPU9250 + cp Firmware/LowLevel/.pio/build/0_11_X_MPU9250/firmware.uf2 ./artifacts/0_11_X_MPU9250 + mkdir ./artifacts/0_11_X_WT901 + cp Firmware/LowLevel/.pio/build/0_11_X_WT901/firmware.elf ./artifacts/0_11_X_WT901 + cp Firmware/LowLevel/.pio/build/0_11_X_WT901/firmware.uf2 ./artifacts/0_11_X_WT901 + mkdir ./artifacts/0_10_X_MPU9250 cp Firmware/LowLevel/.pio/build/0_10_X_MPU9250/firmware.elf ./artifacts/0_10_X_MPU9250 cp Firmware/LowLevel/.pio/build/0_10_X_MPU9250/firmware.uf2 ./artifacts/0_10_X_MPU9250 mkdir ./artifacts/0_10_X_WT901 cp Firmware/LowLevel/.pio/build/0_10_X_WT901/firmware.elf ./artifacts/0_10_X_WT901 cp Firmware/LowLevel/.pio/build/0_10_X_WT901/firmware.uf2 ./artifacts/0_10_X_WT901 + mkdir ./artifacts/0_9_X_MPU9250 cp Firmware/LowLevel/.pio/build/0_9_X_MPU9250/firmware.elf ./artifacts/0_9_X_MPU9250 cp Firmware/LowLevel/.pio/build/0_9_X_MPU9250/firmware.uf2 ./artifacts/0_9_X_MPU9250 diff --git a/Firmware/LowLevel/platformio.ini b/Firmware/LowLevel/platformio.ini index 0eaa13cd..f2f4beea 100644 --- a/Firmware/LowLevel/platformio.ini +++ b/Firmware/LowLevel/platformio.ini @@ -10,8 +10,8 @@ [common] ; common sources here -default_src_filter = +<*> - - +default_src_filter = +<*> + - [env] platform = https://github.com/maxgerhardt/platform-raspberrypi.git @@ -43,46 +43,58 @@ debug_build_flags = -O0 -g -ggdb build_src_filter = +<*> -<.git/> -<.svn/> - - +[env:0_11_X_MPU9250] +lib_ignore = JY901_SERIAL,JY901_I2C +lib_deps = ${env.lib_deps} + bolderflight/Bolder Flight Systems MPU9250@^1.0.2 + powerbroker2/DFPlayerMini_Fast@^1.2.4 +build_src_filter = ${env.build_src_filter} + + +build_flags = ${env.build_flags} -DHW_0_11_X -DENABLE_SOUND_MODULE + +[env:0_11_X_WT901] +build_src_filter = ${env.build_src_filter} + + +lib_ignore = JY901_SERIAL +lib_deps = ${env.lib_deps} + powerbroker2/DFPlayerMini_Fast@^1.2.4 + JY901_I2C +build_flags = ${env.build_flags} -DWT901_I2C -DHW_0_11_X -DENABLE_SOUND_MODULE [env:0_10_X_MPU9250] lib_ignore = JY901_SERIAL,JY901_I2C -lib_deps = ${env.lib_deps} - bolderflight/Bolder Flight Systems MPU9250@^1.0.2 - powerbroker2/DFPlayerMini_Fast@^1.2.4 +lib_deps = ${env.lib_deps} + bolderflight/Bolder Flight Systems MPU9250@^1.0.2 + powerbroker2/DFPlayerMini_Fast@^1.2.4 build_src_filter = ${env.build_src_filter} + + build_flags = ${env.build_flags} -DHW_0_10_X -DENABLE_SOUND_MODULE [env:0_10_X_WT901] build_src_filter = ${env.build_src_filter} + + lib_ignore = JY901_SERIAL -lib_deps = ${env.lib_deps} - powerbroker2/DFPlayerMini_Fast@^1.2.4 - JY901_I2C -build_flags = - ${env.build_flags} -DWT901_I2C -DHW_0_10_X -DENABLE_SOUND_MODULE +lib_deps = ${env.lib_deps} + powerbroker2/DFPlayerMini_Fast@^1.2.4 + JY901_I2C +build_flags = ${env.build_flags} -DWT901_I2C -DHW_0_10_X -DENABLE_SOUND_MODULE [env:0_9_X_MPU9250] lib_ignore = JY901_SERIAL,JY901_I2C -lib_deps = ${env.lib_deps} - bolderflight/Bolder Flight Systems MPU9250@^1.0.2 - powerbroker2/DFPlayerMini_Fast@^1.2.4 +lib_deps = ${env.lib_deps} + bolderflight/Bolder Flight Systems MPU9250@^1.0.2 + powerbroker2/DFPlayerMini_Fast@^1.2.4 build_src_filter = ${env.build_src_filter} + + build_flags = ${env.build_flags} -DHW_0_9_X -DENABLE_SOUND_MODULE [env:0_9_X_WT901_INSTEAD_OF_SOUND] lib_ignore = JY901_I2C build_src_filter = ${env.build_src_filter} + -lib_deps = ${env.lib_deps} - JY901_SERIAL -build_flags = - ${env.build_flags} -DWT901_INSTEAD_OF_SOUND -DHW_0_9_X +lib_deps = ${env.lib_deps} + JY901_SERIAL +build_flags = ${env.build_flags} -DWT901_INSTEAD_OF_SOUND -DHW_0_9_X [env:0_9_X_WT901] lib_ignore = JY901_I2C build_src_filter = ${env.build_src_filter} + + -lib_deps = ${env.lib_deps} - JY901_SERIAL - powerbroker2/DFPlayerMini_Fast@^1.2.4 -build_flags = - ${env.build_flags} -DWT901 -DHW_0_9_X -DENABLE_SOUND_MODULE \ No newline at end of file +lib_deps = ${env.lib_deps} + JY901_SERIAL + powerbroker2/DFPlayerMini_Fast@^1.2.4 +build_flags = ${env.build_flags} -DWT901 -DHW_0_9_X -DENABLE_SOUND_MODULE diff --git a/Firmware/LowLevel/src/pins.h b/Firmware/LowLevel/src/pins.h index e7f717c9..38b0aff7 100644 --- a/Firmware/LowLevel/src/pins.h +++ b/Firmware/LowLevel/src/pins.h @@ -43,7 +43,7 @@ #define PIN_WT901_RX 16 #endif -#elif HW_0_10_X +#elif HW_0_10_X || HW_0_11_X #define WT901_WIRE Wire #define PIN_WT901_SDA 8 @@ -82,4 +82,4 @@ #else #error No hardware version defined -#endif \ No newline at end of file +#endif