Include Makefile.env in Makefile for local configuration

This commit is contained in:
Lexi / Zoe 2024-01-26 17:52:05 +01:00
parent 5c7b10c7b1
commit aa0a04b76f
Signed by: binaryDiv
GPG Key ID: F8D4956E224DA232
3 changed files with 22 additions and 7 deletions

1
.gitignore vendored
View File

@ -20,6 +20,7 @@ __pycache__
*.mpy
# Configuration files
/Makefile.env
/src/webrepl_cfg.py
/src/wlan_cfg.py

View File

@ -1,10 +1,13 @@
# Configuration
LIGHTBAR_HOST ?= 192.168.17.22
LIGHTBAR_URL := http://$(LIGHTBAR_HOST)
WEBREPL_CLI := webrepl_cli.py
WEBREPL_HOST := $(LIGHTBAR_HOST)
WEBREPL_PASSWORD ?= acab
REPL_TTY_PATH ?= /dev/ttyUSB0
# Configuration defaults (please use Makefile.env to override these, see Makefile.env.example)
LIGHTBAR_HOST = 192.168.13.12
LIGHTBAR_URL = http://$(LIGHTBAR_HOST)
WEBREPL_CLI = webrepl_cli.py
WEBREPL_HOST = $(LIGHTBAR_HOST)
WEBREPL_PASSWORD = ultra-secret-webrepl-password
REPL_TTY_PATH = /dev/ttyUSB0
# Include local config
-include Makefile.env
# Directory for saving timestamps of when files were last uploaded
UPLOAD_CACHE_DIR := .upload_cache

11
Makefile.env.example Normal file
View File

@ -0,0 +1,11 @@
# This is an example file.
# Copy this to Makefile.env and adjust it to the IP and password of your lightbar.
# IP address or hostname of your lightbar
LIGHTBAR_HOST := 192.168.13.12
# Password for WebREPL as set in webrepl_cfg.py (used to transfer files to the ESP32)
WEBREPL_PASSWORD := ultra-secret-webrepl-password
# Device path to the serial port of the ESP32 when connected via USB
REPL_TTY_PATH := /dev/ttyUSB0