Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local charts = require("charts")
- local term = require("term")
- local event = require("event")
- local component = require("component")
- local reactor = component.br_reactor
- local turbine = component.br_turbine
- local ctop = charts.Container {
- x = 1,
- y = 1,
- width = 2,
- height = 20,
- payload = charts.ProgressBar {
- direction = charts.sides.TOP,
- min = 0,
- max = 1800,
- value = turbine.getRotorSpeed(),
- colorFunc = function(index, norm, value, self, container)
- return 0xffffff
- end
- }
- }
- for i = 0, turbine.getRotorSpeed() do
- term.clear()
- ctop.gpu.set(5, 10, "RPM: " .. turbine.getRotorSpeed())
- ctop.payload.value = turbine.getRotorSpeed()
- ctop:draw()
- if event.pull(0.05, "interrupted") then
- term.clear()
- os.exit()
- end
- end
- term.clear()
- os.exit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement