Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- API designed for controlling MFFS force manipulators structures.
- --------------------------------------------------
- -- APIs
- os.loadAPI('my_apis/logic')
- --------------------------------------------------
- -- Control Table
- fmsControl = {}
- --------------------------------------------------
- -- Control Functions
- -- While stopCond == true, the structure remains stopped.
- fmsControl.stop = function (stopCond, ...)
- -- Extra arguments.
- extraArgs = {...}
- reverse = extraArgs[1] -- If reverse == true, stopCond must be false for the structure to remain stopped.
- sleepTime = extraArgs[2]; if not sleepTime then sleepTime = 5 end -- sleepTime defaults to 5s.
- while xor(stopCond, reverse) do
- sleep(sleepTime)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement