Nivekk / KOS

Fully programmable autopilot mod for KSP.
Other
80 stars 30 forks source link

Add UNSET command. Passing ALL removes all user-defined vars, can also u... #263

Open a1270 opened 10 years ago

a1270 commented 10 years ago

...nset specific variables. Implements #261. Readme updates are in #203.

a1270 commented 10 years ago

Should a reboot clear locks and user-defined vars?

a1270 commented 10 years ago

I agree that we should fix the underlying issues. I can't think of a good solution thus have been waiting for Nivekk to come back.

I should probably clarify and say the clearing would happen on a manual reboot. I think of the reboot command as a hard cycle where it returns the original state of the machine. Shutdown saves the state as it's safe. I can see issues where you shutdown and then reboot. You want the state after the shutdown and get a stock machine.

Saying all that, the REBOOT and SHUTDOWN commands seem rather useless. I have only used them to test clearing locks/vars. I can't think of a reason you'd ever use them in a script.

a1270 commented 10 years ago

How'd you start it back up? I know that you can toggle power, you could do that to shutdown. A PAUSE/RESUME would be more useful but i haven't fully worked that out yet.

The current issue with the parsing is that it has no idea what the saved vars are thus sends it through Expression. So you save a number as scientific notation "1E-50" and it trues to subtract 50 from E. I had one test branch that added nodes under variables for the types and added all the applicable vars to those. I abandoned that for some reason that i can't recall. I'll try to find it.

a1270 commented 10 years ago

No, only user-defined variables. REMOVE ALL NODES is in planning for removal of nodes and need to think about unlocking TARGET. I am holding off on the non-critical bugs until @Nivekk gets back as to not totally overwhelm him.