How do I make the current program abort on my command?
Question about Vizzy: Abort the current program (Question closed)
Tags
Question6 Comments
- Log in to leave a comment
-
Mod sflanker
There is no one command that will abort any running program. The correct way to abort will depend on how your program is structured. You will need to break out of any running loops or
wait until
instructions, including those in event receivers, and stop execution from continuing after those instructions exit. One thing to note is that thebreak
instruction can be used both to exit a while loop, and to exit a thread (a series of instructions connected to either astart
block or areceive
block). This can prevent you from having to have many nestedif
blocks if you have threads that have multiple successive loops. Without seeing your actual program it's hard to say how much of this you will have to worry about.There are also multiple ways to provide input to your program, but as @PointBreak points out, activation groups are a good one.
Also, FYI, I investigated the possibility of simply deactivating the command pod that contains the running program, but unfortunately Flight Programs continue to run on command pods that are deactivated! I think it would be a good suggestion for a Flight Program to terminate when a command pod is deactivated, and when it is reactivated the Flight Program should "reboot" as if the craft just launched.
Update: suggestion added: https://www.simplerockets.com/Feedback/View/yiIo3i/Flight-programs-should-terminate-when-the-command-pod-or-command-chip-they-are-ru
-
8,526 BeamAerospaceIndustries
@PointBreak You can show another example, but without variables
-
1,092 PointBreak
Like, this little program does its thing , but if you activate AG1 it stops.
-
-
1,092 PointBreak
Maybe have a
while(AG1 off)
, and if/when you wanna abort, activate AG1
Understood, the question can be considered closed