From 0b9e96518f07caae254921da1ef946981a9a07a8 Mon Sep 17 00:00:00 2001 From: Ollo Date: Tue, 9 Feb 2021 19:58:59 +0100 Subject: [PATCH] Clock is booting without mqtt --- main.lua | 3 +- tools/initialDietFlash.sh | 2 +- tools/initialFlash.sh | 63 --------------------------------------- 3 files changed, 3 insertions(+), 65 deletions(-) delete mode 100755 tools/initialFlash.sh 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