diff --git a/main.lua b/main.lua index 63afaf1..6b5a1aa 100644 --- a/main.lua +++ b/main.lua @@ -2,6 +2,7 @@ local looptimer = tmr.create() displayword = {} +rowbgColor= {} function syncTimeFromInternet() if (syncRunning == nil) then @@ -37,7 +38,7 @@ function displayTime() else words.briPercent=nil end - dofile("displayword.lc") + mydofile("displayword") if (displayword ~= nil) then --if lines 4 to 6 are inverted due to hardware-fuckup, unfuck it here local invertRows=false diff --git a/tools/initialDietFlash.sh b/tools/initialDietFlash.sh index 70f8b71..56f8a57 100755 --- a/tools/initialDietFlash.sh +++ b/tools/initialDietFlash.sh @@ -18,7 +18,7 @@ fi # check the serial connection if [ ! -c $DEVICE ]; then - echo "$DEVICE does not exist" + echo "Serial target: $DEVICE does not exist" exit 1 fi diff --git a/tools/initialFlash.sh b/tools/initialFlash.sh deleted file mode 100755 index 565cd83..0000000 --- a/tools/initialFlash.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash - -LUATOOL=./tools/luatool.py - -DEVICE=$1 -BAUD=115200 - -# check environment -if [ ! -f $LUATOOL ]; then - echo "$LUATOOL not found" - echo "is the command prompt at the same level as the tools folder ?" - exit 1 -fi - -# check the serial connection - -if [ ! -c $DEVICE ]; then - echo "$DEVICE does not exist" - exit 1 -fi - -if [ $# -eq 0 ]; then - echo "" - echo "e.g. usage $0 []" - exit 1 -fi - -if [ $# -eq 1 ]; then - FILES="displayword.lua main.lua timecore.lua webpage.html webserver.lua telnet.lua wordclock.lua init.lua" -else - FILES=$2 -fi - - -if [ $# -eq 1 ]; then - # Format filesystem first - echo "Format the complete ESP" - python3 $LUATOOL -p $DEVICE -w -b $BAUD - if [ $? -ne 0 ]; then - echo "STOOOOP" - exit 1 - fi -fi - -echo "Start Flasing ..." -for f in $FILES; do - if [ ! -f $f ]; then - echo "Cannot find $f" - echo "place the terminal into the folder where the lua files are present" - exit 1 - fi - echo "------------- $f ------------" - python3 $LUATOOL -p $DEVICE -f $f -b $BAUD -t $f - if [ $? -ne 0 ]; then - echo "STOOOOP" - exit 1 - fi -done - -echo "Reboot the ESP" -echo "node.restart()" >> $DEVICE - -exit 0