firmware - change to set version in CanGrow_Version.h, build by cangrow.sh
This commit is contained in:
parent
c80ac2e6f6
commit
abb79ebecc
4 changed files with 18 additions and 11 deletions
|
@ -4,14 +4,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
// set CANGROW_VER and CANGROW_BUILD if not already done as Compiler Flag
|
|
||||||
#ifndef CANGROW_VER
|
|
||||||
#define CANGROW_VER "0.0.0-dev"
|
|
||||||
#endif
|
|
||||||
#ifndef CANGROW_BUILD
|
|
||||||
#define CANGROW_BUILD "1a2b3c4-0000000000000"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Includes
|
* Includes
|
||||||
*
|
*
|
||||||
|
|
13
Arduino/CanGrow/CanGrow_Version.h
Normal file
13
Arduino/CanGrow/CanGrow_Version.h
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Version
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define CANGROW_VER "0.1.4-dev"
|
||||||
|
// CANGROW_BUILD default dummy value if not set as Compiler Flag
|
||||||
|
#ifndef CANGROW_BUILD
|
||||||
|
#define CANGROW_BUILD "1a2b3c4-0000000000000"
|
||||||
|
#endif
|
|
@ -383,7 +383,7 @@ void WEBroot() {
|
||||||
body += returnStrDateFromEpoch(GrowStart);
|
body += returnStrDateFromEpoch(GrowStart);
|
||||||
body += "<br>\n";
|
body += "<br>\n";
|
||||||
body += "<b>Harvest date (est.): 🍂 </b> ";
|
body += "<b>Harvest date (est.): 🍂 </b> ";
|
||||||
body += returnStrDateFromEpoch(GrowStart + (60 * 60 * 24 * (DaysVeg + DaysVeg) ) );
|
body += returnStrDateFromEpoch(GrowStart + (60 * 60 * 24 * (DaysVeg + DaysBloom) ) );
|
||||||
body += "<br>\n";
|
body += "<br>\n";
|
||||||
body += "<b>Day of Grow: </b> ";
|
body += "<b>Day of Grow: </b> ";
|
||||||
if(DayNight == true) {
|
if(DayNight == true) {
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
|
|
||||||
test -z $TTY && TTY="/dev/ttyUSB0"
|
test -z $TTY && TTY="/dev/ttyUSB0"
|
||||||
test -z $IP && IP="192.168.4.20"
|
test -z $IP && IP="192.168.4.20"
|
||||||
test -z $VER && VER="0.1.4-dev"
|
|
||||||
|
VER="$(grep "define CANGROW_VER" Arduino/CanGrow/CanGrow_Version.ino | cut -d \" -f2 |sed -e 's/\"//g')"
|
||||||
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"
|
||||||
|
@ -74,7 +75,8 @@ 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
|
||||||
${ACLI_CMD} --no-color compile -b ${BOARD} "Arduino/CanGrow/CanGrow.ino" --build-property "build.extra_flags=-DCANGROW_VER=\"${VER}\" -DCANGROW_BUILD=\"${BUILD}\"" --output-dir build/ || exit 1
|
${ACLI_CMD} --no-color compile -b ${BOARD} "Arduino/CanGrow/CanGrow.ino" --build-property "build.extra_flags=-DCANGROW_BUILD=\"${BUILD}\"" --output-dir build/ || exit 1
|
||||||
|
#${ACLI_CMD} --no-color compile -b ${BOARD} "Arduino/CanGrow/CanGrow.ino" --build-property "build.extra_flags=-DCANGROW_VER=\"${VER}\" -DCANGROW_BUILD=\"${BUILD}\"" --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
|
||||||
;;
|
;;
|
||||||
u|upload)
|
u|upload)
|
||||||
|
|
Loading…
Reference in a new issue