; PlatformIO Project Configuration File
;
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[env]
framework = arduino
monitor_speed = 115200
board_build.partitions = partitions.csv
board_build.embed_files = 
	data_embed/index.html.out
	data_embed/style.css.out
	data_embed/js.js.out
extra_scripts = 
	pre:tools/buildscript_versioning.py
	pre:tools/compress_assets.py
lib_deps = 
	RadioHead
	TinyGPSPlus
	Adafruit SSD1306
	Adafruit GFX Library
	Adafruit Unified Sensor
	Adafruit BusIO
	https://github.com/SQ9MDD/AXP202X_Library.git
	SparkFun u-blox Arduino Library
	bblanchon/ArduinoJson
	arcao/Syslog
build_flags =
			-Wl,--gc-sections,--relax
			-D 'KISS_PROTOCOL'				; leave enabled
			-D 'CALLSIGN="N0CALL"'			; can be set from www interface
			; -D 'DIGI_PATH="WIDE1-1"'			; can be set from www interface
			-D 'DIGI_PATH="1"'				; can be set from www interface
			; -D 'FIXED_BEACON_EN'			; can be set from www interface
			-D 'SB_ALGO_KENWOOD'				; Kenwood skales better on lower speed.
			-D 'LATITUDE_PRESET="0000.00N"'			; can be set from www interface
			-D 'LONGITUDE_PRESET="00000.00W"'		; can be set from www interface
			-D 'APRS_SYMBOL_TABLE="/"'			; can be set from www interface. Hint: if you need Symbol "&", you need to escape: "\&"
			-D 'APRS_SYMBOL="["'				; can be set from www interface. Hint: if you need Symbol "&", you need to escape: "\&"
			-D 'APRS_OBJECT_NAME=""'			; can be set from www interface
			-D 'MY_COMMENT="Lora Tracker/iGate"'		; can be set from www interface
			-D 'SHOW_ALT'					; can be set from www interface
			; -D 'SHOW_BATT'				; can be set from www interface
			-D 'SHOW_RX_PACKET'				; can be set from www interface
			-D 'SHOW_RX_TIME=10000' 			; can be set from www interface
			-D 'TXFREQ=433.775'			; set operating frequency
			; -D 'LORA_SPEED_1200'			; comment out to set 300baud
			;-D 'TXDISABLE'					; can be set from www interface
			;-D 'RXDISABLE'					; can be set from www interface
			-D 'TXdbmW=23'				; set power
			-D 'ENABLE_OLED'				; can be set from www interface
			-D 'ENABLE_LED_SIGNALING'			; can be set from www interface
			-D 'NETWORK_TNC_PORT=8001'		; default KISS TCP port
			; -D 'MAX_TIME_TO_NEXT_TX=120000L'		; can be set from www interface -- not implemented
			-D 'FIX_BEACON_INTERVAL=1800000L'		; can be set from www interface
			-D 'NETWORK_GPS_PORT=10110'		; GPS NMEA Port
			-D 'ENABLE_TNC_SELF_TELEMETRY'		; can be set from www interface. if not defined, telemetry code will not compiled in
			-D 'TNC_SELF_TELEMETRY_INTERVAL=3600L'		; can be set from www interface (seconds)
			-D 'SHOW_OLED_TIME=15000'			; can be set from www interface (OLED Timeout)

[env:ttgo-t-beam-v1_0]
platform = espressif32 @ 3.5.0
board = ttgo-t-beam
build_flags = 
			${env.build_flags} 
			-D T_BEAM_V1_0
			-D ENABLE_WIFI
			-D ENABLE_SYSLOG
			-D ENABLE_BLUETOOTH

[env:ttgo-t-beam-v1_2]
platform = espressif32 @ 3.5.0
board = ttgo-t-beam
build_flags =
			${env.build_flags}
			-D T_BEAM_V1_2
			-D ENABLE_WIFI
			-D ENABLE_SYSLOG
			-D ENABLE_BLUETOOTH
lib_deps =
	${env.lib_deps}
	https://github.com/lewisxhe/XPowersLib


[env:ttgo-t-beam-v0_7]
platform = espressif32 @ 3.5.0
board = ttgo-t-beam
build_flags = 
			${env.build_flags} 
			-D ENABLE_WIFI
			-D ENABLE_SYSLOG
			-D T_BEAM_V0_7

[env:ttgo-lora32-v2_1]
platform = espressif32 @ 3.5.0
board = ttgo-lora32-v21
build_flags = 
			${env.build_flags} 
			-D LORA32_21
			-D ENABLE_WIFI
			-D ENABLE_SYSLOG
			-D ENABLE_BLUETOOTH

[env:ttgo-lora32-v2]
platform = espressif32 @ 3.5.0
board = ttgo-lora32-v2
build_flags = 
			${env.build_flags} 
			-D ENABLE_WIFI
			-D ENABLE_SYSLOG
			-D LORA32_2

[env:ttgo-lora32-v1]
platform = espressif32 @ 3.5.0
board = ttgo-lora32-v1
build_flags = 
			${env.build_flags} 
			-D ENABLE_WIFI
			-D ENABLE_SYSLOG
			-D LORA32_1

[env:Heltec-WiFi-v1]
platform = espressif32 @ 3.5.0
board = heltec_wifi_kit_32
build_flags = 
			${env.build_flags} 
			-D ENABLE_WIFI
			-D ENABLE_SYSLOG
			-D HELTEC_V1

[env:Heltec-WiFi-v2]
platform = espressif32 @ 3.5.0
board = heltec_wifi_kit_32_v2
build_flags = 
			${env.build_flags} 
			-D ENABLE_WIFI
			-D ENABLE_SYSLOG
			-D HELTEC_V2

[env:ttgo-t-beam-v1_0-development]
platform = espressif32 @ 3.5.0
board = ttgo-t-beam
build_flags =
	${env.build_flags}
	-D T_BEAM_V1_0
	-D ENABLE_WIFI
	-D ENABLE_BLUETOOTH
	-D ENABLE_SYSLOG
	-D 'SYSLOG_IP="255.255.255.255"'
    -D DEVELOPMENT_DEBUG
#lib_deps =
	#${env.lib_deps}
