summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* | altos: Simplify BT communicationsKeith Packard2011-04-19
| | | | | | | | | | | | Eliminate stdio I/O wrappers Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Solidify BT connectionsKeith Packard2011-04-19
| | | | | | | | | | | | | | | | | | Use delays while sending commands to BT module. Don't use BT for stdio until the module is initialized. Add \r to name setting command Don't require 'connected' signal for command input. Signed-off-by: Keith Packard <keithp@keithp.com>
* | altosui: Wait two seconds after bluetooth connect XXXKeith Packard2011-04-19
| | | | | | | | | | | | | | "something" isn't quite ready to communicate right after the device is connected, so we stick a delay in. There should be a better fix. Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Add delays to bt startup sequenceKeith Packard2011-04-19
| | | | | | | | | | | | | | The BT device takes a few seconds after power-up before it is ready to receive commands. Signed-off-by: Keith Packard <keithp@keithp.com>
* | altosui: Use persistent list of bluetooth devices for device dialogsKeith Packard2011-04-19
| | | | | | | | | | | | | | | | Store a list of known bluetooth devices as preferences. Always include those in device dialogs with an option to go browse for more devices in both the device dialog and the Configure AltosUI dialog. Signed-off-by: Keith Packard <keithp@keithp.com>
* | altosui: Make bluetooth dialog modalKeith Packard2011-04-18
| | | | | | | | | | | | | | This allows it to be displayed correctly while the device dialog box (also modal) is up. Signed-off-by: Keith Packard <keithp@keithp.com>
* | altosui: Make AltosBTDevice implement AltosDevice interfaceKeith Packard2011-04-14
| | | | | | | | | | | | | | This will allow the use of either USB or BT devices through the AltosDevice interface. Signed-off-by: Keith Packard <keithp@keithp.com>
* | altosui: Create abstract AltosDevice classKeith Packard2011-04-14
| | | | | | | | | | | | | | This will wrap either USB or BT devices. The USB device constants have been moved to Altos.java Signed-off-by: Keith Packard <keithp@keithp.com>
* | altosui: Add primitive bluetooth device manager UI.Keith Packard2011-04-14
| | | | | | | | | | | | | | This isn't useful, but does inquire for available bluetooth devices and show them in a list. Signed-off-by: Keith Packard <keithp@keithp.com>
* | altosui: Add low-level Bluetooth APIsKeith Packard2011-04-08
| | | | | | | | | | | | | | | | | | Adds the JNI functions to query and connect to arbitrary bluetooth devices. Adds Java wrappers to construct a list of proximate bluetooth devices. Signed-off-by: Keith Packard <keithp@keithp.com>
* | altosui: Add TeleBT USB device supportKeith Packard2011-04-08
| | | | | | | | | | | | TeleBT can work just like a TeleDongle over USB. Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Use PIO(6) on BTM to monitor BT connection. Fix BTM init.Keith Packard2011-04-07
| | | | | | | | | | | | | | | | PIo(6) appears to be an active-low indication of the Bluetooth connection status. Hook this up using an interrupt to track the link state instead of using in-band status messages. Signed-off-by: Keith Packard <keithp@keithp.com>
* | Merge branch 'telemini' into telebtKeith Packard2011-04-01
|\|
| * altosui: Add missing AltosTelemetryMap.java fileKeith Packard2011-04-01
| | | | | | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Clean up BT serial communcationsKeith Packard2011-04-01
| | | | | | | | | | | | | | | | | | Disable echo on both ends in command mode to eliminate looping error values. Switch to 57600 baud to improve performance. Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Make cmd echo per-connection instead of globalKeith Packard2011-04-01
| | | | | | | | | | | | | | Allow different connections to use different echo values, permitting the packet link to turn off echo while the USB link still has it on. Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Clean up serial initializationKeith Packard2011-04-01
| | | | | | | | | | | | | | Flush serial input buffers when switching speeds. Ensure pin configuration is correct. Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Clean up usage of serial port for stdioKeith Packard2011-04-01
| | | | | | | | | | | | | | Code wanting to use this must invoke ao_add_stdio; that way the link can be configured before command processing starts. Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Make ao_serial_drain publicKeith Packard2011-04-01
| | | | | | | | | | | | Allow external code to discard serial input Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Remove serial monitor commandKeith Packard2011-04-01
| | | | | | | | | | | | This takes up space and isn't that useful these days Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Allow any stdio to be used with packet forwardingKeith Packard2011-04-01
| | | | | | | | | | | | | | There's no reason to restrict packet forwarding to work only from USB. Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Provide for a pre-filter on commandsKeith Packard2011-04-01
| | | | | | | | | | | | | | This allows for external code to see each command line before it is processed and potentially skip it. Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: expose set of available stdio valuesKeith Packard2011-04-01
| | | | | | | | | | | | | | This lets external code manipulate which connection to communicate over. Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Add P2SEL_*_MASK defines to cc1111.hKeith Packard2011-04-01
| | | | | | | | | | | | | | These are used to avoid having the code "know" which selections are 1 and which are 0 bits. Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Add initial TeleBT codeKeith Packard2011-03-31
|/ | | | | | | Prototyping with a TeleMetrum v0.1 board and a serial link to a bluetooth module. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make ao_flight_test show true height but report saturated heightKeith Packard2011-03-31
| | | | | | | | To simulate a saturated baro sensor, clip baro data at a specified altitude. Continue to report the 'true' altitude in the output so that the resulting graphs are useful. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Baro useful ceiling is MSL, not AGLKeith Packard2011-03-31
| | | | | | | Use MSL instead of AGL for detecting over-range baro sensor values. Always trust baro sensor during descent; it'll get there eventually. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Reflect ao_flight split in ao_flight_test dependenciesKeith Packard2011-03-31
| | | | | | Need to rebuild ao_flight_test when any of the flight sources change Signed-off-by: Keith Packard <keithp@keithp.com>
* altosui: Only plot acceleration when present in data fileKeith Packard2011-03-30
| | | | | | | Eliminates a bogus axis and data line for devices which do not have an accelerometer. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosui: Parse and export Max flight log valueKeith Packard2011-03-30
| | | | | | New configuration field might as well get dumped to the .csv files. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Enable logging during nano flightsKeith Packard2011-03-29
| | | | | | Not having logging wasn't very useful. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Run RDF beacon after apogee instead of waiting for landingKeith Packard2011-03-29
| | | | | | This provides tracking when GPS fails, or on TeleMini. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: ao_sample_preflight was exiting preflight mode immediatelyKeith Packard2011-03-29
| | | | | | | | Need to stay in pre-flight mode until we've gotten enough sensor data to calibrate things appropriately. The conversion from a unified ao_flight.c file was just broken here. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosui: Don't display 0000-00-00 for missing flight log datesKeith Packard2011-03-29
| | | | | | | | With Tm/Tn not having GPS to get the current date, it's no longer unusual to have no date for a flight log, so don't show the 0000-00-00 piece in that case. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosui: Display exception messages from swing threadKeith Packard2011-03-29
| | | | | | | Flight log management exceptions were getting displayed from the log serial I/O thread instead of the swing thread. That's a bad plan. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosui: Make deployment testing handle Connecting... dialogKeith Packard2011-03-29
| | | | | | | | Supporting the Connecting... dialog requires moving all serial communication to a separate thread. This was done by creating a worker thread and command queue to communicate between the UI and the serial line. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosui: Make flight log downloading handle 'Connecting...' dialogKeith Packard2011-03-28
| | | | | | | | This required moving all of the serial communication to a separate thread and making the bulk of the download operation run after that has finished. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosui: Clean up packet link connecting dialogKeith Packard2011-03-28
| | | | | | | | | | | | | | Make sure the dialog is destroyed after use (otherwise, it hangs around on the screen sometimes). Switch timeout before showing dialog to 500ms -- that brings the dialog up less often when unnecessary. Use 'timeout_started' boolean to indicate whether the I/O thread has queued the dialog for display and whether it needs to queue a call to close it down. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Create custom nano flight codeKeith Packard2011-03-28
| | | | | | | No igniters, just 'pad/drogue/landed' modes (where 'drogue' == 'flying'). A constant 1Hz telemetry and RDF rate. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Split up flight code into separate flight/sample/kalman bitsKeith Packard2011-03-28
| | | | | | | | | | | | | | | The flight code mashed together data processing, filtering and actual flight managament into one giant pile. Split things up so that we have: ao_sample.c: Sensor data processing. Reads the ring, handles calibration ao_kalman.c: Filter the data to track the accel/speed/height values ao_flight.c: Flight state management, specific to rocketry. The plan is to re-use ao_sample.c and ao_kalman.c for hardware not specifically designed for rocketry, like TeleNano. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosui: Handle serial calls from swing threadKeith Packard2011-03-27
| | | | | | | | Calls from the swing thread cannot be canceled as there's no way to put up the cancel dialog. In this case, simply use the 5 second timeout and fail if no communication occurs within that amount of time. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosui: Tell serial device which frame to use for timeout dialogsKeith Packard2011-03-27
| | | | | | | | | | For the timeout dialog to appear, a frame must be configured for it to appear near. This patch sends the frame from the eeprom download functions to the serial code. That path doesn't yet work as the eeprom download is still trying to talk to the serial device from the swing event thread, which prevents the cancel dialog from working. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosui: Allow radio channel to be configured over the radio linkKeith Packard2011-03-27
| | | | | | | | | | | TeleMini/TeleNano can't be configured via USB, so we need to allow the radio channel to be set over the radio link. This change carefully sets the new radio channel, disables the remote link and then sets the teledongle channel to the new value and brings the link back up. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosui: Off-by-one error in telemetry format configuration UIKeith Packard2011-03-27
| | | | | | | | The telemetry format menu uses 0 for full and 1 for tiny, but the telemetry configuration uses 1 for full and 2 for tiny. One direction (config to UI) was right, the other (UI to config) was wrong. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: full logging must flush pending data before checking stateKeith Packard2011-03-26
| | | | | | | | | | | | Flight state must be checked only after any pending data have been written to the log as the 'current' flight state is only valid when the pending data values have been processed. This ensures that the 'boost' state is not marked until the full ring of data is written. This ensures that the data processing code can find the barometer values from before boost to get an idea of the ground pressure value. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Variable log rate in full logging code tooKeith Packard2011-03-26
| | | | | | | | | | With the fixed ADC rate used to get better data during flight, the logging code now needs to vary the data storage rate so that descent data is recorded at 10 samples/second while ascent data is recorded at 1 sample per second. Having the logging code do this itself eliminates any interaction with the flight code. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosui: Allow TM config connection to be canceled.Keith Packard2011-03-26
| | | | | | | | | This leaves the config UI connection attempt running and pops up a dialog box when it takes 'too long' in the remote case so that users with Tm or Tn devices can bring up the UI, and then boot the Tm/Tn without needing to time things carefully. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosui: swing hide/show methods are deprecatedKeith Packard2011-03-25
| | | | | | | I don't know why, but they are, so just replace them with setVisible calls. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosui: Remove extra AltosEepromBlock layerKeith Packard2011-03-25
| | | | | | | | | | This was interposed between the download layer and the eeprom layer to hold a eeprom block full of flight log records. The addition of the tiny log format required reworking the code to hold chunks full of eeprom data without regard to their content, so this content-specific layer didn't seem useful anymore. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosui: Add support for downloading TeleMini/TeleNano flight logsKeith Packard2011-03-25
| | | | | | | | Splits the eeprom downloading code into eeprom block downloading and separate eeprom data parsing so that the new data logging format can share the data downloading code. Signed-off-by: Keith Packard <keithp@keithp.com>