Posted 30 August 2014 - 05:47 PM
Hello,
I am currently starting out using ComputerCraft.
At the moment I am trying to set up a computer that monitors my energy storage (Thermal Expansion Energycells) using open peripherals in FTB Monster.
Most of the code I have currently is copied from different tutorials and adjusted to the needs of my System as I don't have good knowledge of lua.
code: http://pastebin.com/7sXChvBD (Will be kept up to date)
The code is supposed to constantly check my energy and if neccessary activate a Netherstar Generator.
The problem I have is, that although I have specified my sleep timers as 2 times 0.25 seconds if the generator is running, to keep my display up to date and 0.5 seconds when it is not running, It takes far longer to execute. (The times were initially doubled, I cut them in half for testing purposes)
As it is now, While the generator is running, It takes 3 seconds to proceed the countdown by 1 second. So it updates my screen every 1.5 seconds. While the generator is not running, it updates roughly every 2 seconds.
I wouldn't care about the long update times, but the countdown should be accurate, as It can only start the generator again once it is finished.
The sleep timer are in lines: 144, 176, 194
The game is running at 20 TPS, so this is not causing the long delays.
I hope someone can help me with the problem, thanks in advance
I am currently starting out using ComputerCraft.
At the moment I am trying to set up a computer that monitors my energy storage (Thermal Expansion Energycells) using open peripherals in FTB Monster.
Most of the code I have currently is copied from different tutorials and adjusted to the needs of my System as I don't have good knowledge of lua.
code: http://pastebin.com/7sXChvBD (Will be kept up to date)
The code is supposed to constantly check my energy and if neccessary activate a Netherstar Generator.
The problem I have is, that although I have specified my sleep timers as 2 times 0.25 seconds if the generator is running, to keep my display up to date and 0.5 seconds when it is not running, It takes far longer to execute. (The times were initially doubled, I cut them in half for testing purposes)
As it is now, While the generator is running, It takes 3 seconds to proceed the countdown by 1 second. So it updates my screen every 1.5 seconds. While the generator is not running, it updates roughly every 2 seconds.
I wouldn't care about the long update times, but the countdown should be accurate, as It can only start the generator again once it is finished.
The sleep timer are in lines: 144, 176, 194
The game is running at 20 TPS, so this is not causing the long delays.
I hope someone can help me with the problem, thanks in advance