display library select added

This commit is contained in:
Klaus K Wilting 2020-05-09 22:49:00 +02:00
parent 62d28c54b6
commit c7441ad58a
18 changed files with 57 additions and 17 deletions

View File

@ -66,16 +66,20 @@ myboard = mykeys["board"]
myuploadspeed = mykeys["upload_speed"] myuploadspeed = mykeys["upload_speed"]
env.Replace(BOARD=myboard) env.Replace(BOARD=myboard)
env.Replace(UPLOAD_SPEED=myuploadspeed) env.Replace(UPLOAD_SPEED=myuploadspeed)
print('\033[94m' + "Target board: " + myboard + " @ " + myuploadspeed + "bps" + '\033[0m')
# re-set partition table # re-set partition table
mypartitiontable = config.get("env", "board_build.partitions") mypartitiontable = config.get("env", "board_build.partitions")
board = env.BoardConfig(myboard) board = env.BoardConfig(myboard)
board.manifest['build']['partitions'] = mypartitiontable board.manifest['build']['partitions'] = mypartitiontable
# display target
print('\033[94m' + "TARGET BOARD: " + myboard + " @ " + myuploadspeed + "bps" + '\033[0m')
print('\033[94m' + "Partition table: " + mypartitiontable + '\033[0m') print('\033[94m' + "Partition table: " + mypartitiontable + '\033[0m')
# set display library
if "display_library" in mykeys:
mydisplay = mykeys["display_library"]
env.Append(display_library=mydisplay)
print('\033[94m' + "Display library: " + mydisplay + '\033[0m')
# parse ota key file # parse ota key file
with open(otakeyfile) as myfile: with open(otakeyfile) as myfile:
for line in myfile: for line in myfile:

View File

@ -45,7 +45,7 @@ description = Paxcounter is a device for metering passenger flows in realtime. I
[common] [common]
; for release_version use max. 10 chars total, use any decimal format like "a.b.c" ; for release_version use max. 10 chars total, use any decimal format like "a.b.c"
release_version = 1.9.991 release_version = 1.9.992
; DEBUG LEVEL: For production run set to 0, otherwise device will leak RAM while running! ; DEBUG LEVEL: For production run set to 0, otherwise device will leak RAM while running!
; 0=None, 1=Error, 2=Warn, 3=Info, 4=Debug, 5=Verbose ; 0=None, 1=Error, 2=Warn, 3=Info, 4=Debug, 5=Verbose
debug_level = 3 debug_level = 3
@ -55,15 +55,18 @@ lorakeyfile = loraconf.h
lmicconfigfile = lmic_config.h lmicconfigfile = lmic_config.h
platform_espressif32 = espressif32@1.12.1 platform_espressif32 = espressif32@1.12.1
monitor_speed = 115200 monitor_speed = 115200
upload_speed = 115200 upload_speed = 115200 ; set by build.py and taken from hal file
display_library = ; set by build.py and taken from hal file
lib_deps_lora = lib_deps_lora =
MCCI LoRaWAN LMIC library@3.1.0 ; MCCI LMIC by Terrill Moore MCCI LoRaWAN LMIC library@3.1.0 ; MCCI LMIC by Terrill Moore
lib_deps_display = lib_deps_display =
QRCode@0.0.1
lib_deps_oled_display =
ss_oled@4.1.3 ; fast and small OLED lib by Larry Bank ss_oled@4.1.3 ; fast and small OLED lib by Larry Bank
BitBang_I2C@2.1.1 BitBang_I2C@2.1.1
QRCode@0.0.1 lib_deps_tft_display =
TFT_eSPI@2.2.2 TFT_eSPI@2.2.4
lib_deps_matrix_display = lib_deps_ledmatrix =
Ultrathin_LED_Matrix@>=1.0.0 Ultrathin_LED_Matrix@>=1.0.0
lib_deps_rgbled = lib_deps_rgbled =
SmartLeds@>=1.2.0 SmartLeds@>=1.2.0
@ -80,16 +83,18 @@ lib_deps_basic =
76@>=1.2.4 ; #76 Timezone by Jack Christensen 76@>=1.2.4 ; #76 Timezone by Jack Christensen
274@>=2.3.4 ; #274 RTC by Michael Miller 274@>=2.3.4 ; #274 RTC by Michael Miller
SimpleButton SimpleButton
AXP202X_Library@>=1.1.0 ; AXP202 PMU lib by Lewis He ;AXP202X_Library@>=1.1.0 ; AXP202 PMU lib by Lewis He
https://github.com/lewisxhe/AXP202X_Library.git
esp32-micro-sdcard esp32-micro-sdcard
lib_deps_all = lib_deps_all =
${common.lib_deps_basic} ${common.lib_deps_basic}
${common.lib_deps_lora} ${common.lib_deps_lora}
${common.lib_deps_display} ${common.lib_deps_display}
${common.display_library}
${common.lib_deps_rgbled} ${common.lib_deps_rgbled}
${common.lib_deps_gps} ${common.lib_deps_gps}
${common.lib_deps_sensors} ${common.lib_deps_sensors}
${common.lib_deps_matrix_display} ${common.lib_deps_ledmatrix}
build_flags_basic = build_flags_basic =
-include "src/hal/${board.halfile}" -include "src/hal/${board.halfile}"
-include "src/paxcounter.conf" -include "src/paxcounter.conf"

View File

@ -1,6 +1,7 @@
// clang-format off // clang-format off
// upload_speed 921600 // upload_speed 921600
// board esp32dev // board esp32dev
// display_library lib_deps_oled_display
#ifndef _GENERIC_H #ifndef _GENERIC_H
#define _GENERIC_H #define _GENERIC_H

View File

@ -1,6 +1,7 @@
// clang-format off // clang-format off
// upload_speed 115200 // upload_speed 115200
// board esp32dev // board esp32dev
// display_library lib_deps_oled_display
#ifndef _GENERIC_H #ifndef _GENERIC_H
#define _GENERIC_H #define _GENERIC_H

View File

@ -1,6 +1,7 @@
// clang-format off // clang-format off
// upload_speed 921600 // upload_speed 921600
// board heltec_wifi_lora_32 // board heltec_wifi_lora_32
// display_library lib_deps_oled_display
#ifndef _HELTEC_H #ifndef _HELTEC_H
#define _HELTEC_H #define _HELTEC_H

View File

@ -1,6 +1,7 @@
// clang-format off // clang-format off
// upload_speed 921600 // upload_speed 921600
// board heltec_wifi_lora_32_V2 // board heltec_wifi_lora_32_V2
// display_library lib_deps_oled_display
#ifndef _HELTECV2_H #ifndef _HELTECV2_H
#define _HELTECV2_H #define _HELTECV2_H

View File

@ -1,6 +1,7 @@
// clang-format off // clang-format off
// upload_speed 921600 // upload_speed 921600
// board lolin32 // board lolin32
// display_library lib_deps_oled_display
#ifndef _LOLINLORA_H #ifndef _LOLINLORA_H
#define _LOLINLORA_H #define _LOLINLORA_H

View File

@ -1,6 +1,7 @@
// clang-format off // clang-format off
// upload_speed 921600 // upload_speed 921600
// board m5stack-core-esp32 // board m5stack-core-esp32
// display_library lib_deps_tft_display
#ifndef _M5CORE_H #ifndef _M5CORE_H
#define _M5CORE_H #define _M5CORE_H
@ -38,7 +39,12 @@
#define HAS_LED NOT_A_PIN // no on board LED (?) #define HAS_LED NOT_A_PIN // no on board LED (?)
#define HAS_BUTTON (39) // on board button A #define HAS_BUTTON (39) // on board button A
#define HAS_IP5306 1 // power management settings
#define HAS_IP5306 1 // has IP5306 chip
#define PMU_CHG_CURRENT 2 // battery charge current
// possible values: 0:200mA, 1:400mA, *2:500mA, 3:600mA
#define PMU_CHG_CUTOFF 0 // battery charge cutoff
// possible values: *0:4.2V, 1:4.3V, 2:4.35V, 3:4.4V
// GPS settings // GPS settings
#define HAS_GPS 1 // use on board GPS #define HAS_GPS 1 // use on board GPS

View File

@ -1,6 +1,7 @@
// clang-format off // clang-format off
// upload_speed 921600 // upload_speed 921600
// board m5stack-fire // board m5stack-fire
// display_library lib_deps_tft_display
#ifndef _M5FIRE_H #ifndef _M5FIRE_H
#define _M5FIRE_H #define _M5FIRE_H
@ -41,7 +42,12 @@
#define HAS_RGB_LED SmartLed rgb_led(LED_SK6812, RGB_LED_COUNT, GPIO_NUM_15) // LED_SK6812 RGB LED on GPIO15 #define HAS_RGB_LED SmartLed rgb_led(LED_SK6812, RGB_LED_COUNT, GPIO_NUM_15) // LED_SK6812 RGB LED on GPIO15
#define HAS_BUTTON (39) // on board button A #define HAS_BUTTON (39) // on board button A
#define HAS_IP5306 1 // power management settings
#define HAS_IP5306 1 // has IP5306 chip
#define PMU_CHG_CURRENT 2 // battery charge current
// possible values: 0:200mA, 1:400mA, *2:500mA, 3:600mA
#define PMU_CHG_CUTOFF 0 // battery charge cutoff
// possible values: *0:4.2V, 1:4.3V, 2:4.35V, 3:4.4V
// GPS settings // GPS settings
#define HAS_GPS 0 // use on board GPS #define HAS_GPS 0 // use on board GPS

View File

@ -1,6 +1,7 @@
// clang-format off // clang-format off
// upload_speed 921600 // upload_speed 921600
// board featheresp32 // board featheresp32
// display_library lib_deps_oled_display
#ifndef _OCTOPUS_H #ifndef _OCTOPUS_H
#define _OCTOPUS_H #define _OCTOPUS_H

View File

@ -1,6 +1,7 @@
// clang-format off // clang-format off
// upload_speed 921600 // upload_speed 921600
// board ttgo-t-beam // board ttgo-t-beam
// display_library lib_deps_oled_display
#ifndef _TTGOBEAM_H #ifndef _TTGOBEAM_H
#define _TTGOBEAM_H #define _TTGOBEAM_H

View File

@ -1,6 +1,7 @@
// clang-format off // clang-format off
// upload_speed 921600 // upload_speed 921600
// board ttgo-t-beam // board ttgo-t-beam
// display_library lib_deps_oled_display
#ifndef _TTGOBEAM_H #ifndef _TTGOBEAM_H
#define _TTGOBEAM_H #define _TTGOBEAM_H
@ -29,13 +30,18 @@ Reset -> reset device
#define HAS_LORA 1 // comment out if device shall not send data via LoRa #define HAS_LORA 1 // comment out if device shall not send data via LoRa
#define CFG_sx1276_radio 1 // HPD13A LoRa SoC #define CFG_sx1276_radio 1 // HPD13A LoRa SoC
#define HAS_BUTTON GPIO_NUM_38 // middle on board button #define HAS_BUTTON GPIO_NUM_38 // middle on board button
#define HAS_PMU 1 // AXP192 power management chip
#define PMU_INT GPIO_NUM_35 // AXP192 interrupt
#define PMU_CHGC AXP1XX_CHARGE_CUR_1000MA // AXP102 battery charge current
// possible AXP192 battery charge current values (mA):
// 100/190/280/360/450/550/630/700/780/880/960/1000/1080/1160/1240/1320
#define HAS_LED NOT_A_PIN #define HAS_LED NOT_A_PIN
// power management settings
#define HAS_PMU 1 // has AXP192 chip
#define PMU_INT GPIO_NUM_35 // battery interrupt
#define PMU_CHG_CURRENT AXP1XX_CHARGE_CUR_1000MA // battery charge current
// possible values (mA):
// 100/190/280/360/450/550/630/700/780/880/960/1000/1080/1160/1240/1320
#define PMU_CHG_CUTOFF AXP202_TARGET_VOL_4_2V // battery charge cutoff
// possible values (V):
// 4_1/4_15/4_2/4_36
// GPS settings // GPS settings
#define HAS_GPS 1 // use on board GPS #define HAS_GPS 1 // use on board GPS
#define GPS_SERIAL 9600, SERIAL_8N1, GPIO_NUM_34, GPIO_NUM_12 // UBlox NEO 6M #define GPS_SERIAL 9600, SERIAL_8N1, GPIO_NUM_34, GPIO_NUM_12 // UBlox NEO 6M

View File

@ -1,6 +1,7 @@
// clang-format off // clang-format off
// upload_speed 921600 // upload_speed 921600
// board esp32dev // board esp32dev
// display_library lib_deps_oled_display
#ifndef _TTGOFOX_H #ifndef _TTGOFOX_H
#define _TTGOFOX_H #define _TTGOFOX_H

View File

@ -1,6 +1,7 @@
// clang-format off // clang-format off
// upload_speed 115200 // upload_speed 115200
// board ttgo-lora32-v1 // board ttgo-lora32-v1
// display_library lib_deps_oled_display
#ifndef _TTGOV1_H #ifndef _TTGOV1_H
#define _TTGOV1_H #define _TTGOV1_H

View File

@ -1,6 +1,7 @@
// clang-format off // clang-format off
// upload_speed 921600 // upload_speed 921600
// board ttgo-lora32-v1 // board ttgo-lora32-v1
// display_library lib_deps_oled_display
#ifndef _TTGOV2_H #ifndef _TTGOV2_H
#define _TTGOV2_H #define _TTGOV2_H

View File

@ -1,6 +1,7 @@
// clang-format off // clang-format off
// upload_speed 921600 // upload_speed 921600
// board esp32dev // board esp32dev
// display_library lib_deps_oled_display
#ifndef _TTGOV21NEW_H #ifndef _TTGOV21NEW_H
#define _TTGOV21NEW_H #define _TTGOV21NEW_H

View File

@ -1,6 +1,7 @@
// clang-format off // clang-format off
// upload_speed 921600 // upload_speed 921600
// board esp32dev // board esp32dev
// display_library lib_deps_oled_display
#ifndef _TTGOV21OLD_H #ifndef _TTGOV21OLD_H
#define _TTGOV21OLD_H #define _TTGOV21OLD_H

View File

@ -1,6 +1,7 @@
// clang-format off // clang-format off
// upload_speed 921600 // upload_speed 921600
// board lolin32 // board lolin32
// display_library lib_deps_oled_display
#ifndef _WEMOS32OLED_H #ifndef _WEMOS32OLED_H
#define _WEMOS32OLED_H #define _WEMOS32OLED_H