summaryrefslogtreecommitdiff
path: root/altoslib
Commit message (Collapse)AuthorAge
* Bump Java library versionsKeith Packard2015-07-15
| | | | | | Avoid problems if you have an old version of the library installed Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Preload maps based on distance rather than number of tilesKeith Packard2015-07-11
| | | | | | | This lets you get the specific area requested at all zoom levels, rather than having further detail only at lower resolution zooms. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Convert longitude from distance in AltosMapTransformKeith Packard2015-07-11
| | | | | | | This computes the longitude cooresponding to a specific distance at a specific latitude. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Limit simultanous map tile downloads to 128Keith Packard2015-07-11
| | | | | | | | | Before this change, every tile requested would get downloaded at the same time. With moving to distance-based offline map loading radius values, the number of tiles at closer zooms was in the thousands, overwhelming the network. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Make earth size constants publicKeith Packard2015-07-11
| | | | | | This lets other code share the values. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Make AltosMap floor/ceil static. Check transform in paintKeith Packard2015-07-11
| | | | | | This avoids crashing in paint when no transform has been set yet. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Support TeleBT v3.0 battery voltage conversionKeith Packard2015-06-25
| | | | | | | TeleBT v3.0 uses an STM32 instead of a cc1111, so it needs a different voltage computation from the raw ADC value. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Don't crash if dragging a map view without any tilesKeith Packard2015-06-25
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Fix replay to run in realtime againKeith Packard2015-06-23
| | | | | | At some point, this got sped up to 10x normal speedx Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Typo slipped into AltosState.javaKeith Packard2015-06-23
| | | | | | Oops. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Use a longer filter for descent valuesKeith Packard2015-06-23
| | | | | | This makes descent speeds almost useful, a huge improvement Signed-off-by: Keith Packard <keithp@keithp.com>
* altosdroid: Select tracker by clicking on mapKeith Packard2015-06-22
| | | | | | | This lets you pick a tracker from the map, rather than having to use the menu. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Add set_zoom_centre to AltosMapKeith Packard2015-06-22
| | | | | | | This zooms around a specific point, keeping it at the same place on the screen. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Clean up map tile removalKeith Packard2015-06-22
| | | | | | | Remove them while walking the hash table, rather than creating a list to remove. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib/altosuilib: Fix equals methods, add hashCodeKeith Packard2015-06-22
| | | | | | | | Whenever we use a class as a HashMap key, that class needs to override the equals(Object) and hashCode() methods. Otherwise, the hash table won't work right. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Remove debug output from AltosMapKeith Packard2015-06-17
| | | | | | It's just annoying now. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Expose public function to set state.productKeith Packard2015-06-17
| | | | | | Just adds a setter function for this value. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Let the application disable the link cancel dialogKeith Packard2015-06-17
| | | | | | | This lets the application control whether to pop up the cancel dialog when the link isn't working. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Set product for idle monitorKeith Packard2015-06-17
| | | | | | This lets the UI show the product name Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Add preferences for saving/restoring multiple flight statesKeith Packard2015-06-06
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Require 'debug' hook in AltosMapInterfaceKeith Packard2015-05-29
| | | | | | This lets the map users redirect debug messages as appropriate Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Pass all map loader params to set_load_paramsKeith Packard2015-05-28
| | | | | | | | Add zoom and map type to the param list so we don't call set_zoom and set_maptype separately, which only causes lots of extra image loads to get started unnecessarily. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Add map loading helper classKeith Packard2015-05-27
| | | | | | | This adds the AltosMapLoader class, which iterates over a sequence of zoom levels and formats to get local copies of a desired launch site. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Provide toString method for AltosLatLonKeith Packard2015-05-27
| | | | | | Makes printing them easier. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Start with map emptyKeith Packard2015-05-27
| | | | | | | Don't load images from 0,0 for no good reason; wait until someone sets a desired lat/lon Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Add AltosLaunchSite bitsKeith Packard2015-05-27
| | | | | | | This asynchronously fetches the list of available launch sites from the standard location and notifies the caller when finished. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosdroid: Place icons on screen instead of drawing pathKeith Packard2015-05-26
| | | | | | This makes drawing a bunch faster, and locating stuff on the screen easier. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosdroid: Add offline map tabKeith Packard2015-05-26
| | | | | | | It's not very fancy yet, but it does zoom and pan, and show the path of the rocket with a line. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosuilib: Get rid of AltosUIVersion.javaKeith Packard2015-05-26
| | | | | | It's been moved to altoslib/AltosVersion.java Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib/altosuilib: Get new Map display code running in altosui and telegpsKeith Packard2015-05-26
| | | | | | | Looks like the display is all hooked up. Still need to replace the preload UIs. 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>
* altoslib: More frobbing with new map bitsKeith Packard2015-05-25
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Get new abstract mapping code compilingKeith Packard2015-05-25
| | | | | | Not useful yet, but at least it compiles now? Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Create display-independent map support codeKeith Packard2015-05-21
| | | | | | This takes the swing-specific map code and creates a generic version. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Expose locale and non-locale floating point parsing functionsKeith Packard2015-05-19
| | | | | | | | | UI bits use locale-specific floating point formats, so parsing those needs to use the locale. Network-based data, like .kml bits need to use non-locale-specific parsing code, so now we've got both APIs available, and each used as appropriate. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Use Locale.ROOT for KML exportKeith Packard2015-05-18
| | | | | | | This avoids locale-specific number formatting, which breaks googleearth when importing the resulting file. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Round frequency when configuring radioKeith Packard2015-03-02
| | | | | | | This makes sure we set the right frequency, instead of being off by 1kHz on a regular basis... Signed-off-by: Keith Packard <keithp@keithp.com>
* altosui/telegps: Add config option for APRS formatKeith Packard2015-03-02
| | | | | | Allow configuration of APRS compressed/uncompressed 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>
* altosuilib: Don't offer to graph some GPS details that TM doesn't logKeith Packard2015-02-07
| | | | | | | | When using a TM eeprom file, various minor GPS details are logged (course, ground speed, climb rate, etc). Make sure these aren't offered up for graphing. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosuilib: Get the Eeprom download progress bar working againKeith Packard2015-02-07
| | | | | | | | | | | | The eeprom download code wasn't computing the start of each state transition correctly, so the progress bar was snapping to the end of the chunk for each state. Invalid state values would snap the bar to the right side. Landed state wasn't ever seen, so the bar would not ever fill. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Clear saved TelemetryReader state instead of resetting in ScanUIKeith Packard2015-02-07
| | | | | | | Instead of attempting to mash the saved state from AltosScanUI, just throw it away in AltosTelemetryReader.reset. Much cleaner, and more reliable. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Drop telemetry packets processed while monitoring is disabledKeith Packard2015-02-07
| | | | | | | | A lag between the thread queuing telemetry packets and one pulling them out can result in stale telemetry data being returned to the reader. Fix this by dropping telemetry read while monitoring is disabled. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Mark listener as 'not running' on EOF.Keith Packard2015-02-07
| | | | | | | | | | | | | | This adds a 'running' member to the AltosListenerState class, and when the replay reader reaches EOF, marks the listener as no longer running. AltosUI and TeleGPS now display 'done' in the 'Age' field when this occurs, to let the user know that the replay is over. Also make sure that the display timers are stopped when this happens, or when the window is closed. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosui: Remove the dregs of AltosDroid load-old-telem codeKeith Packard2015-02-07
| | | | | | | | | | | | AltosDroid used to scan the old .telem file to return to the previous flight state on restart. Now it just loads the old state object instead, a vast improvement in performance. To do that, there were some changes in the altoslib code required. This patch just removes those, fixing replay bugs in TeleGPS along the way. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Initialize GPS data to MISSING for Monitor Idle modeKeith Packard2015-02-06
| | | | | | | Make sure any un-set values are flagged correctly for the Monitor Idle UI by using the init() method. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Use 'stateless' for Monitor IdleKeith Packard2015-02-06
| | | | | | | | This reflects the lack of flight state progression during Monitor Idle and ensures that the GPS 'ready' indicator will light after 10 solid GPS fixes. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Support TeleGPS for Monitor IdleKeith Packard2015-02-06
| | | | | | | TeleGPS has ADC and GPS values, so build the necessary ADC parser and then hook up GPS parsing. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosuilib: Don't show 'Sats in view' for TeleGPS eeprom graphingKeith Packard2015-02-06
| | | | | | | | We don't log the visible sats from TeleGPS, only the basic GPS info. Have AltosFlightStats track whether sat info is present, then use that to elide the Sats In View graph entry as needed. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosuilib: EEProm download from TeleGPS doesn't have statesKeith Packard2015-02-06
| | | | | | | | | | | | | As TeleGPS doesn't have flight states, the EEProm download progress bar shouldn't show 'state invalid', and it should use a different scale for each block. Fix this by having AltosConfigData know which devices have state based on their log format, then mark the progress bar state limits as 'invalid/invalid' instead of 'boost/landed'. Then have the progress bar use that to set a more reasonable scale for each block. Signed-off-by: Keith Packard <keithp@keithp.com>