Posted 22 September 2013 - 05:08 AM
Title: OpenCCSensor Reactor Data readout problem
Hi I'm quite new to Computercraft and I'm trying to visualize the State of my Nuclear Reactor. I Installed openCCSensors because It doesn't seem to be possible to get useful data out of a Reactor with Chambers connected to each side via cable Modems and openperipheral.
To get to now the sensordata I've written a small Program to read the data
I'm expecting this to show useful data from the reactor. All I'm getting though is the following:
According to http://www.computerc...__1#entry140125 the reactordetails should have a Heat attribute.
Can someone tell me what I'm doing wrong?
Thank you in advance.
BB
Hi I'm quite new to Computercraft and I'm trying to visualize the State of my Nuclear Reactor. I Installed openCCSensors because It doesn't seem to be possible to get useful data out of a Reactor with Chambers connected to each side via cable Modems and openperipheral.
To get to now the sensordata I've written a small Program to read the data
local sensor_side = "front"
os.loadAPI("ocs/apis/sensor")
targetNames = sensor.call(sensor_side, "getSensorName") and sensor.call(sensor_side, "getTargets")
if targetNames then
for position, target in pairs(targetNames) do
for i,j in pairs(target) do
if i == "Name" then
if j == "Nuclear Reactor" then
detail = sensor.call(sensor_side, "getTargetDetails", position)
for d1,d2 in pairs(detail) do
print(d1)
print(d2)
end
else
end
end
end
end
end
I'm expecting this to show useful data from the reactor. All I'm getting though is the following:
EnergySunken
0
EnergyEmitted
0
DamageValue
5
Position
table : ...
RawName
ic2.blocknuclearreactor
Name
Nuclear Reactor
According to http://www.computerc...__1#entry140125 the reactordetails should have a Heat attribute.
Can someone tell me what I'm doing wrong?
Thank you in advance.
BB