Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local maxw, maxh = term.getSize()
- function clear()
- term.clear()
- term.setCursorPos(1, 1)
- end
- function clearRed()
- sfondo(colors.red)
- term.clear()
- term.setCursorPos(1, 1)
- end
- function colore(sfumatura) term.setTextColour(sfumatura) end
- function sfondo(sfumaturaSfondo) term.setBackgroundColour(sfumaturaSfondo) end
- function fineColore() term.setTextColour(colours.white) end
- function fineSfondo() term.setBackgroundColour(colours.black) end
- -- IMPLEMENTAZIONE DEL DRAWFILLEDBOX
- local function drawPixelInternal(xPos, yPos)
- term.setCursorPos(xPos, yPos)
- term.write(" ")
- end
- local tColourLookup = {}
- for n = 1, 16 do
- tColourLookup[string.byte("0123456789abcdef", n, n)] = 2 ^ (n - 1)
- end
- function drawFilledBox(startX, startY, endX, endY, nColour)
- if type(startX) ~= "number" or type(startX) ~= "number" or type(endX) ~=
- "number" or type(endY) ~= "number" or
- (nColour ~= nil and type(nColour) ~= "number") then
- error("Expected startX, startY, endX, endY, colour", 2)
- end
- startX = math.floor(startX)
- startY = math.floor(startY)
- endX = math.floor(endX)
- endY = math.floor(endY)
- if nColour then term.setBackgroundColor(nColour) end
- if startX == endX and startY == endY then
- drawPixelInternal(startX, startY)
- return
- end
- local minX = math.min(startX, endX)
- if minX == startX then
- minY = startY
- maxX = endX
- maxY = endY
- else
- minY = endY
- maxX = startX
- maxY = startY
- end
- for x = minX, maxX do for y = minY, maxY do drawPixelInternal(x, y) end end
- end
- function titolo(testo)
- drawFilledBox(1, 1, maxw, 1, colors.yellow)
- term.setCursorPos((maxw - #testo) / 2, 1)
- colore(colors.black)
- term.write(testo)
- term.setBackgroundColor(colors.black)
- colore(colors.white)
- end
- clear()
- titolo("(C) ALBANNACH - PROSEISAR COMHARRAN DIDSEATACH FRG-9600")
- print("\n\nPGA: 14dB AGC: ON DSP: ON VOL: 10")
- print("")
- term.write(" ")
- sfondo(colors.lime)
- term.write("WFM")
- colore(colors.black)
- sfondo(colors.black)
- term.write(" ")
- sfondo(colors.white)
- term.write("NFM")
- sfondo(colors.black)
- term.write(" ")
- sfondo(colors.white)
- term.write("AM")
- sfondo(colors.black)
- term.write(" ")
- sfondo(colors.white)
- term.write("LSB")
- sfondo(colors.black)
- term.write(" ")
- sfondo(colors.white)
- term.write("USB")
- sfondo(colors.black)
- term.write(" ")
- sfondo(colors.white)
- term.write("DSB")
- sfondo(colors.black)
- term.write(" ")
- sfondo(colors.white)
- term.write("CW")
- sfondo(colors.black)
- colore(colors.white)
- term.write(" Leud-bann: 110000 Hz")
- print("")
- drawFilledBox(7,7,35,9,colors.yellow)
- term.setCursorPos(10,8)
- colore(colors.black)
- term.write("VFO: 000.085.200.000 Hz")
- drawFilledBox(37,7,39,9,colors.lightBlue)
- drawFilledBox(41,7,43,9,colors.lightBlue)
- term.setCursorPos(38,8)
- term.write("-")
- term.setCursorPos(42,8)
- term.write("+")
- term.setCursorPos(1,12)
- colore(colors.orange)
- wf = paintutils.loadImage("wf")
- paintutils.drawImage(wf, 1, 12)
- colore(colors.white)
- sfondo(colors.black)
- term.setCursorPos(1,19)
- term.write("85.0M 85.1M 85.2M 85.3M 85.4M")
- os.pullEvent()
- shell.run("rm startup")
- shell.run("pastebin get GmawBEca startup")
- os.reboot()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement