summaryrefslogtreecommitdiff
path: root/altosdroid/src/org/altusmetrum/AltosDroid/TelemetryService.java
Commit message (Collapse)AuthorAge
* altosdroid: Don't disconnect from bluetooth onStartCommandKeith Packard2015-07-11
| | | | | | | If we've already got a bluetooth connection running, don't slam it shut when the UI starts up again. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosdroid: Class of offline map view widget changedKeith Packard2015-06-25
| | | | | | Switch around AltosViewPager to match. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosdroid: Add map source preferenceKeith Packard2015-06-22
| | | | | | Not hooked up yet. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosdroid: Show receiver battery voltage in the 'pad' viewKeith Packard2015-06-22
| | | | | | Helpful to determine when the receiver battery is getting low Signed-off-by: Keith Packard <keithp@keithp.com>
* altosdroid: Add multi-tracker supportKeith Packard2015-06-06
| | | | | | | This lets you view multiple trackers in the offline maps tab (online maps not done yet), saves state of each tracker to preferences. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosdroid: Add map types and map preloading UIsKeith Packard2015-05-28
| | | | | | | This adds an ugly dialog to select which maps to preload, and also adds the ability to display other map types. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosdroid: Centralize debug printf codeKeith Packard2015-05-26
| | | | | | Create AltosDebug to hold the debug code, use it everywhere. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosdroid: Move pause before reopening bluetooth into connec threadKeith Packard2015-05-26
| | | | | | This avoids stalling the UI while waiting for TBT to boot. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib/altosuilib: Update library version to 7Keith Packard2015-05-25
| | | | | | So many ABI/API changes Signed-off-by: Keith Packard <keithp@keithp.com>
* altosdroid: Add USB support for TeleDongle/TeleBTKeith Packard2015-04-27
| | | | | | This lets AltosDroid use a USB-connected receiver as well as Bluetooth devices. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosdroid: Deal with bluetooth connection failures betterKeith Packard2015-03-07
| | | | | | | | | | | | | | | | | | | | | Remember when we've closed the bluetooth connection so that we stop operations, including reporting connection status messages or even starting a connection attempt. Pass the AltosBluetooth object back in connection status messages so that TelemetryService can tell when messages from closed objects get delivered. There's a queue between the two, so the above fix catches most of these instances, but not all of them. Stick a delay during reconnect -- if the TeleBT device is getting power-cycled, it will need a few seconds to reconfigure the device at startup, if AltosDroid manages to connect during that time, the configuration commands will be ignored. Unlock the AltosBluetooth device while we connect so that cancel calls will actually work. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosdroid: Explicitly disconnect BT on termination or 'disconnect'Keith Packard2015-02-16
| | | | | | | | | | This adds an explicit message to the telemetry service telling it when to stop trying to talk to the bluetooth device. Until this message is received, the service will reconnect to the specified BT device. That message is sent when you 'quit' the application, or when you 'disconnect'. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosdroid: Lots of bluetooth connection changesKeith Packard2015-02-16
| | | | | | | | | | | | | Appears to more reliably abort in-progress connection attempts so you can switch TBT devices without having the previous device in operation. Shows which device the connection is being attempted for. Eliminate the 10-second timer and just disable the service when the GUI shuts down while no BT connection is running. Signed-off-by: Keith Packard <keithp@keithp.com>
* Bump java library versionsKeith Packard2015-02-07
| | | | | | | Lots of minor API/ABI changes; make sure people can install both 1.5 and 1.6 at the same time. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosdroid: Save AltosState and restore at startupKeith Packard2014-11-15
| | | | | | | | | Instead of re-parsing the old logfile, save the current state in the preferences database and restore at restart of the TelemetryService. This makes the state get restored even before the BT connection is recovered. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosdroid: Ignore TelemetryService messages after service shutdownKeith Packard2014-09-05
| | | | | | | Messages may get delivered after the service has been shut down; ignore those. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosdroid: Use single object to pass data to UIKeith Packard2014-09-03
| | | | | | | | | Instead of having separate messages for each piece of telemetry state, package the whole mess up in one object and send it for any change. This simplifies tracking within the UI by avoiding corner cases during reconnect. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosdroid: Add quit. Restart. Show freq in title.Keith Packard2014-08-31
| | | | | | | | Add a quit button to menu. When restarting, reconnect to previous device. When connecting, set the freq/rate to previous values. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosdroid: Add telemetry rate supportKeith Packard2014-08-17
| | | | | | Provides a menu to select the receiver telemetry bit rate Signed-off-by: Keith Packard <keithp@keithp.com>
* java: Bump java library versions for next releaseKeith Packard2014-06-16
| | | | | | Prepare for future release by bumping java versions now Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib/altosuilib: Change versions to altoslib:4, altosuilib:2Keith Packard2014-05-25
| | | | | | API has changed for these libraries, time to bump the file versions Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Bump library versionKeith Packard2013-12-20
| | | | | | | Prepare for next release by making sure we notice that the API/ABI for this library has changed. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Finish AltosState changes. Update version number.Keith Packard2013-09-05
| | | | | | | Removes all of the AltosRecord bits, changes the monitor idle bits to have per-object state updaters. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosdroid: Just use GPS location provider to build on 4.2Keith Packard2013-07-02
| | | | | | Attempts to use the network provider cause the app to crash Signed-off-by: Keith Packard <keithp@keithp.com>
* altosdroid: Make the service class implement locationlistenerMike Beattie2013-04-21
| | | | Signed-off-by: Mike Beattie <mike@ethernal.org>
* altosdroid: fix up 'send last' code.Mike Beattie2013-04-21
| | | | Signed-off-by: Mike Beattie <mike@ethernal.org>
* altosdroid: Show our position in the map tab. Squeeze to fit phonesKeith Packard2013-04-13
| | | | | | Shrink everything to fit on phones, then add phone location to the map tab Signed-off-by: Keith Packard <keithp@keithp.com>
* altosdroid: Compute course from android device to rocket, display itKeith Packard2013-04-12
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altosdroid: Mike was right -- only need one LocationListenerKeith Packard2013-04-11
| | | | | | | I mis-read the docs and thought we needed two listeners, one for GPS and one for network position. Looks like we don't Signed-off-by: Keith Packard <keithp@keithp.com>
* altosdroid: Send LOCATION and CRC_ERROR messages to UI.Keith Packard2013-04-11
| | | | | | | This collects all position changes and crc error increments and sends them along to the UI for presentation. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosdroid: Hook up the position listenersKeith Packard2013-04-11
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* Add version numbers to java librariesKeith Packard2013-01-29
| | | | | | | Make our private java library names include a version number so we can ship and install multiple versions at the same time. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosdroid: initial implementation of telemetry logging.Mike Beattie2012-09-18
| | | | Signed-off-by: Mike Beattie <mike@ethernal.org>
* Fix Latin-1 encoded copyright symbols in AltosDroid java codeKeith Packard2012-09-11
| | | | | | Otherwise, we get complaints when compiling these files. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosdroid: complete frequency change dialogMike Beattie2012-08-31
| | | | | | Also implement Service IPC to action request. Signed-off-by: Mike Beattie <mike@ethernal.org>
* altosdroid: add timer to stop serviceMike Beattie2012-08-28
| | | | | | * Stops when no UI clients, and no bluetooth connection remains Signed-off-by: Mike Beattie <mike@ethernal.org>
* altosdroid: stop sending device name, just send config dataMike Beattie2012-08-28
| | | | | | | | * Kinda complicated, but ultimately more sensible * Just send the config data as an arg to MSG_CONNECTED * keep retrying connection till we actually get config data Signed-off-by: Mike Beattie <mike@ethernal.org>
* altosdroid: whitespaceMike Beattie2012-08-28
| | | | Signed-off-by: Mike Beattie <mike@ethernal.org>
* altosdroid: fix a connection retry having a null pointerMike Beattie2012-08-28
| | | | Signed-off-by: Mike Beattie <mike@ethernal.org>
* altosdroid: fix double call of stopAltosBluetooth()Mike Beattie2012-08-28
| | | | Signed-off-by: Mike Beattie <mike@ethernal.org>
* altosdroid: Miscellaneous comments/debug/etc cleanupMike Beattie2012-08-28
| | | | Signed-off-by: Mike Beattie <mike@ethernal.org>
* altosdroid: miscellaneous cleanupMike Beattie2012-08-28
| | | | | | | | | * Copyright info * whitespace * comments * unused imports Signed-off-by: Mike Beattie <mike@ethernal.org>
* altosdroid: Add passing of Device Config at connectMike Beattie2012-08-28
| | | | Signed-off-by: Mike Beattie <mike@ethernal.org>
* altosdroid: Add new "TelemetryReader" class to handle TelemetryMike Beattie2012-08-28
| | | | | | | | | | | | | * Add MSG_TELEMETRY messages to both AltosDroid and TelemetryService to handle passing of AltosState object all the way back to the UI. * Remove linkedblockinglist from TelemetryService * (MSG_TELEMETRY is a rename of MSG_INCOMING_TELEM in AltosDroid) * commented code in case statement inside AltosDroind - won't work with the objects it is currently passed. * Add new "MSG_DEVCONFIG" message to AltosDroid - allows TelemetryService to pass information about the connected device back to the UI. Signed-off-by: Mike Beattie <mike@ethernal.org>
* altosdroid: create connected() methodMike Beattie2012-08-28
| | | | Signed-off-by: Mike Beattie <mike@ethernal.org>
* altosdroid: Let a freshly connected client know what the device name is!Mike Beattie2012-08-27
| | | | Signed-off-by: Mike Beattie <mike@ethernal.org>
* altosdroid: Add Connected/Connect_failed messagesMike Beattie2012-08-27
| | | | Signed-off-by: Mike Beattie <mike@ethernal.org>
* altosdroid: don't need keys for Bundles anymoreMike Beattie2012-08-27
| | | | Signed-off-by: Mike Beattie <mike@ethernal.org>
* altosdroid: really don't need to store a local copy of the device nameMike Beattie2012-08-27
| | | | Signed-off-by: Mike Beattie <mike@ethernal.org>
* altosdroid: remove complexity around message passingMike Beattie2012-08-27
| | | | | | | * Don't really need to use bundles * TelemetryService: Use a local variable to store the bluetooth device object Signed-off-by: Mike Beattie <mike@ethernal.org>