Posted 30 September 2012 - 11:20 PM
Ok, so what I want to be able to do is to see if my reactor contains a depleted uranium cell. I have the auto reloader and everything setup, but I can't seem to get the readings from the reactor. Can someone point me in the right direction?
Thanks.
Code:
Thanks.
Code:
os.unloadAPI("sensors")
os.loadAPI("/rom/apis/sensors")
ctrl=sensors.getController()
data=sensors.getSensors(ctrl)
sensor=data[1]
data=sensors.getSensorInfo(ctrl,sensor)
sensors.setSensorRange(ctrl,sensor,"3")
data=sensors.getProbes(ctrl,sensor)
--|
--V is ReactorContent, right?
probe=data[5]
--|
--V This returns nil?
data=sensors.getAvaliabeTargetsforProbe(ctrl,sensor,probe)
--|
--V And this sould be the only target inside of it?
target=data[1]
data=sensors.getSensorReadingAsDict(ctrl,sensor,target)
--|
--V Would I do that?
--print(data)