SHOW:
|
|
- or go back to the newest paste.
| 1 | os.loadAPI "MonAPI" | |
| 2 | local turbine1 | |
| 3 | local reactor1 | |
| 4 | local mon = monAPI.wrapMonitor("right")
| |
| 5 | ||
| 6 | mon.setTextColor(colors.white) | |
| 7 | mon.setBackgroundColor(color.black) | |
| 8 | mon.clear() | |
| 9 | mon.setCursorPos(1,1) | |
| 10 | ||
| 11 | local section1 = mon.createSection(1,1,20,19) | |
| 12 | section1.clear() | |
| 13 | local section2 = mon.createSection(21,1,51,19) | |
| 14 | section2.clear() | |
| 15 | local section3 = mon.createSection(52,1,82,19) | |
| 16 | section3.clear() | |
| 17 | ||
| 18 | ||
| 19 | while true do | |
| 20 | rednet.open("back")
| |
| 21 | id,message = rednet.receive() | |
| 22 | ||
| 23 | if id == 158 then | |
| 24 | section2.clear() | |
| 25 | - | section2.setCursorPos(1,1) |
| 25 | + | section2.drawBorrder(#,#,+) |
| 26 | section2.setCursorPos(2,3) | |
| 27 | - | section2.setCursorPos(1,2) |
| 27 | + | |
| 28 | section2.setCursorPos(2,4) | |
| 29 | - | section2.setCursorPos(1,3) |
| 29 | + | |
| 30 | section2.setCursorPos(2,5) | |
| 31 | - | section2.setCursorPos(1,4) |
| 31 | + | |
| 32 | section2.setCursorPos(2,6) | |
| 33 | - | section2.setCursorPos(1,5) |
| 33 | + | |
| 34 | section2.setCursorPos(2,7) | |
| 35 | - | section2.setCursorPos(1,6) |
| 35 | + | |
| 36 | section2.setCursorPos(2,8) | |
| 37 | - | section2.setCursorPos(1,7) |
| 37 | + | |
| 38 | section2.setCursorPos(2,9) | |
| 39 | - | section2.setCursorPos(1,8) |
| 39 | + | |
| 40 | section2.setCursorPos(2,10) | |
| 41 | - | section2.setCursorPos(1,10) |
| 41 | + | |
| 42 | section2.setCursorPos(2,11) | |
| 43 | - | section2.setCursorPos(1,11) |
| 43 | + | |
| 44 | section2.setCursorPos(2,12) | |
| 45 | - | section2.setCursorPos(1,12) |
| 45 | + | |
| 46 | section2.setCursorPos(2,13) | |
| 47 | - | section2.setCursorPos(1,13) |
| 47 | + | |
| 48 | section2.setCursorPos(2,14) | |
| 49 | section2.write('Fuel Consumption: '..message["reactor1Fuel"]..'')
| |
| 50 | ||
| 51 | elseif id == 159 then | |
| 52 | - | section3.setCursorPos(1,1) |
| 52 | + | |
| 53 | section2.drawBorrder(#,#,+) | |
| 54 | - | section3.setCursorPos(1,2) |
| 54 | + | section3.setCursorPos(2,3) |
| 55 | section3.write('Reactor - Turbine Monitoring')
| |
| 56 | - | section3.setCursorPos(1,3) |
| 56 | + | section3.setCursorPos(2,4) |
| 57 | section3.write('Data Broadcast Received')
| |
| 58 | - | section3.setCursorPos(1,4) |
| 58 | + | section3.setCursorPos(2,5) |
| 59 | section3.write('System Status')
| |
| 60 | - | section3.setCursorPos(1,5) |
| 60 | + | section3.setCursorPos(2,6) |
| 61 | section3.write('Turbine:')
| |
| 62 | - | section3.setCursorPos(1,6) |
| 62 | + | section3.setCursorPos(2,7) |
| 63 | section3.write('RPM: '..message["turbine1rpm"]..'')
| |
| 64 | - | section3.setCursorPos(1,7) |
| 64 | + | section3.setCursorPos(2,8) |
| 65 | section3.write('Flow Rate: '..message["turbine1Flow"]..'mb/t')
| |
| 66 | - | section3.setCursorPos(1,8) |
| 66 | + | section3.setCursorPos(2,9) |
| 67 | section3.write('Generation: '..message["turbine1RFT"]..' rf/t')
| |
| 68 | - | section3.setCursorPos(1,10) |
| 68 | + | section3.setCursorPos(2,10) |
| 69 | section3.write('Capacitor: '..message["turbine1capacitor"]..'')
| |
| 70 | - | section3.setCursorPos(1,11) |
| 70 | + | section3.setCursorPos(2,11) |
| 71 | section3.write('Reactor:')
| |
| 72 | - | section3.setCursorPos(1,12) |
| 72 | + | section3.setCursorPos(2,12) |
| 73 | section3.write('Temp: '..message["reactor1Temp"]..'')
| |
| 74 | - | section3.setCursorPos(1,13) |
| 74 | + | section3.setCursorPos(2,13) |
| 75 | section3.write('Steam Pressure: '..message["reactor1Steam"]..'')
| |
| 76 | section3.setCursorPos(2,14) | |
| 77 | section3.write('Fuel Consumption: '..message["reactor1Fuel"]..'')
| |
| 78 | end | |
| 79 | ||
| 80 | ||
| 81 | end |