diff --git a/Arduino/CanGrow/CanGrow.ino b/Arduino/CanGrow/CanGrow.ino index 00a03e1..f42b4d0 100644 --- a/Arduino/CanGrow/CanGrow.ino +++ b/Arduino/CanGrow/CanGrow.ino @@ -63,6 +63,18 @@ void setup() { + // Start Serial + Serial.begin(115200); + + // Write a line before doing serious output, because before there is some garbage in serial + // whats get the cursor somewhere over the place + Serial.println("420"); + Serial.print(".:: CanGrow firmware v"); + Serial.print(CanGrowVer); + Serial.print(" build "); + Serial.print(CanGrowBuild); + Serial.println(" starting ::."); + } diff --git a/Arduino/CanGrow/include/CanGrow.h b/Arduino/CanGrow/include/CanGrow.h index f6dbf7f..beb7853 100644 --- a/Arduino/CanGrow/include/CanGrow.h +++ b/Arduino/CanGrow/include/CanGrow.h @@ -27,3 +27,4 @@ * */ +#include "CanGrow_Version.h" diff --git a/cangrow.sh b/cangrow.sh index d5162ce..f3183ed 100755 --- a/cangrow.sh +++ b/cangrow.sh @@ -3,7 +3,7 @@ test -z $TTY && TTY="/dev/ttyUSB0" test -z $IP && IP="192.168.30.212" -test -z $VER && VER="0.1-dev" +test -z $VER && VER="0.2-dev" test -z $BOARD && BOARD="esp8266:esp8266:d1_mini_clone" BUILD="$(git rev-parse --short HEAD)-$(date '+%Y%m%d%H%M%S')" @@ -75,11 +75,11 @@ case $1 in check_acli echo ":: Building firmware $VER $BUILD, target dir: $(pwd)/build/" test -d build || mkdir build -# echo "/* CanGrow_Version.h gets generated from cangrow.sh */ -# -#const char* CanGrowVer = \"${VER}\"; -#const char* CanGrowBuild = \"${BUILD}\"; -#" > Arduino/CanGrow/CanGrow_Version.h + echo "/* CanGrow_Version.h gets generated from cangrow.sh */ + +const char* CanGrowVer = \"${VER}\"; +const char* CanGrowBuild = \"${BUILD}\"; +" > Arduino/CanGrow/include/CanGrow_Version.h ${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 ;;