Merge pull request #441 from cyberman54/development
Issue #438 & disable Heltecv2 battery monitoring (ADC2 ./. Wifi conflict)
This commit is contained in:
commit
9b5faf0008
12
build.py
12
build.py
@ -7,15 +7,15 @@ import os.path
|
||||
import requests
|
||||
from os.path import basename
|
||||
from platformio import util
|
||||
from SCons.Script import DefaultEnvironment
|
||||
|
||||
try:
|
||||
import configparser
|
||||
except ImportError:
|
||||
import ConfigParser as configparser
|
||||
|
||||
Import("env")
|
||||
|
||||
# get platformio environment variables
|
||||
env = DefaultEnvironment()
|
||||
config = configparser.ConfigParser()
|
||||
config.read("platformio.ini")
|
||||
|
||||
@ -66,7 +66,15 @@ myboard = mykeys["board"]
|
||||
myuploadspeed = mykeys["upload_speed"]
|
||||
env.Replace(BOARD=myboard)
|
||||
env.Replace(UPLOAD_SPEED=myuploadspeed)
|
||||
|
||||
# re-set partition table
|
||||
mypartitiontable = config.get("env", "board_build.partitions")
|
||||
board = env.BoardConfig(myboard)
|
||||
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')
|
||||
|
||||
# parse ota key file
|
||||
with open(otakeyfile) as myfile:
|
||||
|
@ -43,7 +43,7 @@ description = Paxcounter is a device for metering passenger flows in realtime. I
|
||||
|
||||
[common]
|
||||
; for release_version use max. 10 chars total, use any decimal format like "a.b.c"
|
||||
release_version = 1.8.031
|
||||
release_version = 1.8.11
|
||||
; 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
|
||||
debug_level = 3
|
||||
@ -56,7 +56,7 @@ monitor_speed = 115200
|
||||
upload_speed = 115200
|
||||
lib_deps_lora =
|
||||
;MCCI LoRaWAN LMIC library@2.3.2
|
||||
https://github.com/mcci-catena/arduino-lmic.git#76f7bd5
|
||||
https://github.com/mcci-catena/arduino-lmic.git
|
||||
lib_deps_display =
|
||||
U8g2@>=2.26.13
|
||||
lib_deps_matrix_display =
|
||||
@ -116,7 +116,7 @@ upload_protocol = custom
|
||||
upload_protocol = esptool
|
||||
|
||||
[env:dev]
|
||||
upload_protocol = custom
|
||||
upload_protocol = esptool
|
||||
build_type = debug
|
||||
platform = https://github.com/platformio/platform-espressif32.git#develop
|
||||
platform_packages =
|
||||
|
@ -20,9 +20,13 @@
|
||||
#define HAS_LED LED_BUILTIN // white LED on board
|
||||
#define HAS_BUTTON KEY_BUILTIN // button "PROG" on board
|
||||
|
||||
#define BAT_MEASURE_ADC ADC2_GPIO13_CHANNEL // battery probe GPIO pin
|
||||
#define BAT_MEASURE_ADC_UNIT 2 // ADC 2
|
||||
#define BAT_VOLTAGE_DIVIDER 2 // voltage divider 220k/100k on board
|
||||
// caveat: activating ADC2 conflicts with Wifi in current arduino-esp32
|
||||
// see https://github.com/espressif/arduino-esp32/issues/3222
|
||||
// thus we must waiver of battery monitoring
|
||||
//#define BAT_MEASURE_ADC ADC2_GPIO13_CHANNEL // battery probe GPIO pin
|
||||
//#define BAT_MEASURE_ADC_UNIT 2 // ADC 2
|
||||
//#define BAT_VOLTAGE_DIVIDER 2 // voltage divider 220k/100k on board
|
||||
|
||||
#define EXT_POWER_SW Vext // switches battery power, Vext control 0 = on / 1 = off
|
||||
#define EXT_POWER_ON 0
|
||||
//#define EXT_POWER_OFF 1
|
||||
|
Loading…
Reference in New Issue
Block a user