]> hydra-www.ietfng.org Git - acmetensortoys-esp-lua_ctfws/commitdiff
ctfws-lcd: update no-game message banners
authorNathaniel Wesley Filardo <nwf@cs.jhu.edu>
Fri, 10 Nov 2017 23:43:46 +0000 (18:43 -0500)
committerNathaniel Wesley Filardo <nwf@cs.jhu.edu>
Fri, 10 Nov 2017 23:43:46 +0000 (18:43 -0500)
Display "CMUKGB CTFS TIMER" on top line, message on bottom line.

ctfws-lcd.lua

index c89bcdb3cb5b31bb98c6b113f2d3d9373f0f6956..6aa206f8ac52cb97fe369fc48542dbb58f4d6ead 100644 (file)
@@ -30,10 +30,9 @@ local function drawDS(lcd, row, col, max, last, decisec)
 end
 
 local function drawNoGame(lcd, msg)
-  local k,r; for k,r in pairs({0,3}) do
-    lcd:put(lcd:locate(r,0), "                    ")
-    lcd:put(lcd:locate(r,(20-#msg)/2), msg)
-  end
+  lcd:put(lcd:locate(0,0), " CMUKGB CTFWS TIMER ")
+  lcd:put(lcd:locate(3,0), "                    ")
+  lcd:put(lcd:locate(3,(20-#msg)/2), msg)
 end
 
 local function drawSteadyTopLine(self,rix,maxt,ela)
@@ -45,8 +44,8 @@ local function drawSteadyTopLine(self,rix,maxt,ela)
       lcd:put(lcd:locate(0,0), "SETUP    :")
     else
       if ctfws.rounds >= 10
-       then lcd:put(lcd:locate(0,0), string.format("RND %2d/%2d :",rix,ctfws.rounds))
-       else lcd:put(lcd:locate(0,0), string.format("ROUND %d/%d :",rix,ctfws.rounds))
+       then lcd:put(lcd:locate(0,0), string.format("JB# %2d/%2d :",rix,ctfws.rounds))
+       else lcd:put(lcd:locate(0,0), string.format("JB#   %d/%d :",rix,ctfws.rounds))
       end
     end
   end