Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("back")
- m = peripheral.wrap("right")
- local l,h = m.getSize()
- term.clear()
- term.setCursorPos(1,1)
- shell.run("id")
- term.setBackgroundColor(colors.gray)
- term.clear()
- function prt()
- term.clear()
- term.setCursorPos(1,1)
- print("H:"..h.." L:"..l)
- end
- function initbar()
- m.setCursorPos(2,3)
- m.setBackgroundColor(colors.lightGray)
- for i=1,27 do
- m.write(" ")
- end
- m.setCursorPos(2,7)
- for i=1,27 do
- m.write(" ")
- end
- m.setCursorPos(2,11)
- for i=1,27 do
- m.write(" ")
- end
- end
- while true do
- initbar()
- prt()
- ----- Recevoir les information -----
- local id1,e25,pe25 = rednet.receive("EnPt25")
- local id2,r25,pr25 = rednet.receive("RoSp25")
- print("e25:"..e25.." r25:"..r25)
- local id3,e34,pe34 = rednet.receive("EnPt34")
- local id4,r34,pr34 = rednet.receive("RoSp34")
- print("e34:"..e34.." r34:"..r34)
- local id5,e29,pe29 = rednet.receive("EnPt29")
- local id6,r29,pr29 = rednet.receive("RoSp29")
- print("e29:"..e29.." r29:"..r29)
- sleep(0.1)
- ----- Fin d'attente d'information -----
- ----- Affichage (Bars) -----
- -- 1er (Rotors CoP N27) --
- m.setBackgroundColor(colors.black)
- m.setCursorPos(2,2)
- m.write("Rotors Speed:"..math.floor(r25))
- m.setCursorPos(2,4)
- m.write("RF/t:"..math.floor(e29))
- m.setBackgroundColor(colors.blue)
- m.setCursorPos(2,3)
- --local l1 = 0
- l1 = r25 * (l-2) / 2000
- print(l1)
- for i=1,l1 do
- m.write(" ")
- end
- -- 2eme (RotorsCP N34) --
- m.setBackgroundColor(colors.black)
- m.setCursorPos(2,6)
- m.write("Rotors Speed:"..math.floor(r34))
- m.setCursorPos(2,8)
- m.write("RF/t:"..math.floor(e34))
- m.setBackgroundColor(colors.blue)
- m.setCursorPos(2,7)
- --local l2 = 0
- l2 = r34 * (l-2) / 2000
- print(l2)
- for i=1,l2 do
- m.write(" ")
- end
- -- 3eme (RotorsCP N29) --
- m.setBackgroundColor(colors.black)
- m.setCursorPos(2,10)
- m.write("Rotors Speed:"..math.floor(r29))
- m.setCursorPos(2,12)
- m.write("RF/t:"..math.floor(e29))
- m.setBackgroundColor(colors.blue)
- m.setCursorPos(2,11)
- --local l3 = 0
- l3 = r29 * (l-2) / 2000
- print(l3)
- for i=1,l2 do
- m.write(" ")
- end
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement