HEROES-GSFC/SAS — pull request #129 by ayshih (2013-05-07 23:23:06+00:00)
Title: Changes as of Tuesday

Some significant changes:

* There is now a shutdown command (0x?0F0) that can be issued to a SAS, which is especially useful now that we have to adapt to not even having SSH access. It will kill all threads first, wait briefly, and then send a passphrase to a special service that will issue the OS shutdown as root.
* `sunDemo` has many fewer parallel running threads. The camera thread now runs the following steps in series: snap, process, send solution to CTL, and save (which is spawned in a separate thread). All non-snap commands are configured by specifying the number of snaps per such step (e.g., we'll send a solution to CTL every 4 snaps). Since we know exactly which snap we're sending a solution to CTL, the 0x1104 prediction packet is trivial. The mutexing is more straightforward, although there are still problems with fit_keys not being protected properly. It is enforced for there to be only one spawned image-saving thread at a time, so occasionally a frame that should be saved is skipped. Saving is performing much better because there are no longer issues with phasing with other threads and locking: SAS-2 is saving images at nearly 4 Hz in both cameras, or nearly 8 Hz in total.
* Fixes #100 (bad float to string conversions)

Merging immediately