Posted 04 November 2012 - 04:18 PM
Hello everyone,
i am trying to write a program that will detect how many mfsu's are near a sensor and add all the stored energy and max energy and output the ammount, i have most iof it written the only problem is
im getting confused on how to make it do it for every target instead of coding each target manually
Basically i have 100 mfsu's set up around a sensor and im trying to add all the euStorage and max together and output the value every like 1 second without having to hard code each mfsu like this
Any help would be appreciated
Thankyou
i am trying to write a program that will detect how many mfsu's are near a sensor and add all the stored energy and max energy and output the ammount, i have most iof it written the only problem is
im getting confused on how to make it do it for every target instead of coding each target manually
Basically i have 100 mfsu's set up around a sensor and im trying to add all the euStorage and max together and output the value every like 1 second without having to hard code each mfsu like this
Targets = sensors.getAvailableTargetsforProbe("right", "EUSensor", "EUStorage")
if #Targets ~= 0 then
Reading1 = sensors.getSensorReadingAsDict("right", "EUSensor", Targets[1], "EUStorage")
Reading2 = sensors.getSensorReadingAsDict("right", "EUSensor", Targets[2], "EUStorage")
Any help would be appreciated
Thankyou