sandalle / minecraft_bigreactor_control

Minecraft BigReactor Computercraft Control Program
MIT License
75 stars 41 forks source link

Energy buffer is off on turbine. #1

Closed NolanSyKinsley closed 10 years ago

NolanSyKinsley commented 10 years ago

I was playing around and came across your script. It seems that on my setup, which is one reactor and on turbine, it is saying that the energy buffer is at 10% even though it is full, as you can see on the right. I think something is off by a decimal point somewhere.

imgur-28 03 2014-02 46 26

Also note that it was not shutting down when the buffer was full, I had to manually shut it down.

NolanSyKinsley commented 10 years ago

I took off an extra 0 on line 620, as I would only be needing the buffer of a turbine, and not a reactor. I think there needs to be a conditional change there if on a turbine, rather than reactor.

sandalle commented 10 years ago

Thank you for the bug report and the patch. :) I thought that I already accounted for of it's a Turbine or not, but I may have only corrected the values for the overall display (bottom right picture), which appears to have the correct current and maximum values. I'll take a look tonight.

NolanSyKinsley commented 10 years ago

Well, I don't think that patch will work, or something else is messed up. I tried your script un modified, and just changed the on/off values to 01.0 for on and 08.0 for off (It would not work with 1.0 and 8.0, nor the default values, even with my pull request), It turned on, but will not turn off (It does not turn off no matter what I put the "max" value at). Plus the automatic rod adjustment and flow control for turbine speed do not seem to work at all. I manually set the rods to 50% so the turbine would go to 1900 RPM in the hopes that the automatic flow control would wind it down to 1800 RPM, as at 55% rods it drops to 1775 (I know, not that much of a difference from 1800) and it did not turn down the flow. Manual controls all seem to be in working order.

I love the layout of the displays and this seems to be a very promising control system, thank you for making it. Are you planning on doing an update for CC 1.6? It has some really cool new features that I think would work well with your script (I keep saying script, is this considered a script or a program?).

Edit

Completely forgot about your debug feature, I will play around with that a little bit.

Nother edit

=/ debug does not seem to say much, started it up, drained all power from buffer, and let it fill up again, idk how much the debug is supposed to say, but this is all it gave me(after this image no matter what happens with the turbine/reactor the debug display only displays monitor cursor positions of clicks on the monitors):

(Sorry for the lengthy/kinda spammy posts/pull request)

The server I play on has ~170 mods on it, but I do not believe that to be any issue, as this is a direct connection between APIs and no other mods should be messing with it (but mods messing with other mods is always a possibility).

I really do like the direction this script is headed and I do hope it will become a thing (I love things (respect the thing))

sandalle commented 10 years ago

I know I had fixed this, but I only fixed it for the overall status monitor (the one with the summary for every device) and not for the Turbine displays. Passively cooled Reactors may store up to 10,000,000 RF while Turbines may only store up to 1,000,000 RF. :) I was also lazy and used the same function, getDeviceStoredEnergyBufferPercent(device), for both Reactors and Turbines. I've now split it into getReactorStoredEnergyBufferPercent and getTurbineStoredEnergyBufferPercent and called accordingly.

Sorry for the delay in fixing.