tune cangrow.sh
This commit is contained in:
parent
cf58ef292b
commit
529bd7e556
2 changed files with 8 additions and 6 deletions
|
@ -59,6 +59,7 @@
|
||||||
// https://github.com/PaulStoffregen/Time
|
// https://github.com/PaulStoffregen/Time
|
||||||
#include <TimeLib.h>
|
#include <TimeLib.h>
|
||||||
|
|
||||||
|
#include "LittleFS.h"
|
||||||
|
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
|
|
13
cangrow.sh
13
cangrow.sh
|
@ -4,11 +4,12 @@
|
||||||
test -z $TTY && TTY="/dev/ttyUSB0"
|
test -z $TTY && TTY="/dev/ttyUSB0"
|
||||||
test -z $IP && IP="192.168.30.212"
|
test -z $IP && IP="192.168.30.212"
|
||||||
test -z $VER && VER="0.1-dev"
|
test -z $VER && VER="0.1-dev"
|
||||||
|
test -z $BOARD && BOARD="esp8266:esp8266:d1_mini_clone"
|
||||||
|
|
||||||
BUILD="$(git rev-parse --short HEAD)-$(date '+%Y%m%d%H%M%S')"
|
BUILD="$(git rev-parse --short HEAD)-$(date '+%Y%m%d%H%M%S')"
|
||||||
|
|
||||||
ACLI="$HOME/.local/bin/arduino-cli"
|
ACLI="$HOME/.local/bin/arduino-cli"
|
||||||
ACLI_CMD="$ACLI --config-file arduino-cli.yml"
|
ACLI_CMD="$ACLI --config-file arduino-cli.yml"
|
||||||
BOARD="esp8266:esp8266:d1_mini_clone"
|
|
||||||
|
|
||||||
function help() {
|
function help() {
|
||||||
echo "$0 [setup|build|upload|webupload|monitor]"
|
echo "$0 [setup|build|upload|webupload|monitor]"
|
||||||
|
@ -74,11 +75,11 @@ case $1 in
|
||||||
check_acli
|
check_acli
|
||||||
echo ":: Building firmware $VER $BUILD, target dir: $(pwd)/build/"
|
echo ":: Building firmware $VER $BUILD, target dir: $(pwd)/build/"
|
||||||
test -d build || mkdir build
|
test -d build || mkdir build
|
||||||
echo "/* CanGrow_Version.h gets generated from cangrow.sh */
|
# echo "/* CanGrow_Version.h gets generated from cangrow.sh */
|
||||||
|
#
|
||||||
const char* CanGrowVer = \"${VER}\";
|
#const char* CanGrowVer = \"${VER}\";
|
||||||
const char* CanGrowBuild = \"${BUILD}\";
|
#const char* CanGrowBuild = \"${BUILD}\";
|
||||||
" > Arduino/CanGrow/CanGrow_Version.h
|
#" > Arduino/CanGrow/CanGrow_Version.h
|
||||||
${ACLI_CMD} --no-color compile -b ${BOARD} "Arduino/CanGrow/CanGrow.ino" --output-dir build/ || exit 1
|
${ACLI_CMD} --no-color compile -b ${BOARD} "Arduino/CanGrow/CanGrow.ino" --output-dir build/ || exit 1
|
||||||
cp build/CanGrow.ino.bin build/CanGrow_v${VER}_${BUILD}.bin
|
cp build/CanGrow.ino.bin build/CanGrow_v${VER}_${BUILD}.bin
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in a new issue