summaryrefslogtreecommitdiff
path: root/altosuilib
Commit message (Collapse)AuthorAge
* altosuilib: In display thread, set new state synchronouslyKeith Packard2015-10-13
| | | | | | | | | | | | | | | | | | When replaying telemetry, received_time gets set by both the telemetry reader (when the file is initially read) and by the replay reader (as the telemetry is processed). Because these two events are separated by the time it takes to play the file, the second time is the one we want for figuring out how long since the last telemetry packet. However, if we set the global state when pulling the state out of the telemetry reader, and then the replay reader pauses for a long time, then the voice output thread sees the intermediate time value and thinks that it has been a long time since the last packet was received and reports that the rocket may have crashed. Fix this by just holding the read state until it has been passed by the replay reader and had the received_time set to current time. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Hide 'state' member and use accessor functionKeith Packard2015-10-13
| | | | | | | | Someone was smashing the state to 'landed' when no packets had been received for a while. Found that by making it impossible for anyone outside of AltosState to change the value. Signed-off-by: Keith Packard <keithp@keithp.com>
* 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>
* altosuilib: Receiver battery voltage lives in listener_stateKeith Packard2015-06-25
| | | | | | | | The code to detect whether to show or hide this entry was using functions that weren't given the listener_state and hence returned MISSING all of the time. 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>
* altosuilib: Use AltosMap set_zoom_centre instead of in-line versionKeith Packard2015-06-22
| | | | | | Shares the same function with altosdroid this way. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosuilib: Allow for no transform in map mouse wheel functionKeith Packard2015-06-22
| | | | 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>
* altosuilib: Create grid-bag helper functions in AltosUIFrameKeith Packard2015-06-17
| | | | | | This eases the burden of creating suitable GridBagConstraints values Signed-off-by: Keith Packard <keithp@keithp.com>
* altosuilib: Show state.product if state.device_type isn't setKeith Packard2015-06-17
| | | | | | MonitorIdle doesn't get the device type, only the product. 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>
* altosuilib: Eliminate extra MapCache in AltosUIMapPreloadNewKeith Packard2015-05-28
| | | | | | Use the cache from the map. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosuilib: Get rid of AltosUIMapNew.set_load_paramsKeith Packard2015-05-28
| | | | | | This isn't needed anywhere. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosuilib: Switch to altoslib map loading codeKeith Packard2015-05-27
| | | | | | | Remove the map loading code from the UI bits and use the new altoslib version instead. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosuilib: Use altoslib site list loaderKeith Packard2015-05-27
| | | | | | Removes the custom version and uses the shared code 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>
* altosuilib: Remove old map bitsKeith Packard2015-05-26
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altosuilib: Use new map code for map preload UIKeith Packard2015-05-26
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altosuilib: Add AltosUIImage.javaKeith Packard2015-05-26
| | | | 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: 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>
* altosuilib: Detect pair programming by product name, not USB idKeith Packard2015-02-14
| | | | | | | | With TeleDongle, TeleBT and TeleMetrum coming in both pair- and self- programmable versions, we can't use the USB id to tell them apart. Instead, fetch the device name and use that instead. 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>
* altosuilib: Set the icon and title of the telemetry scanning dialogKeith Packard2015-02-07
| | | | | | Just need to call 'super' to get the window configured correctly. 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>
* altosuilib: Reset telemetry state after processing itKeith Packard2015-02-07
| | | | | | | | This avoids re-using stale state after switching telemetry reception parameters around, which otherwise generates spurious entries for the wrong frequencies in the scan results list. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosuilib: Wait for product data while scanningKeith Packard2015-02-07
| | | | | | | Now that Altos only sends config information once every 5 seconds, we want to keep waiting for that if we're receiving packets successfully. 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>
* 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>
* altosuilib: New teledongle and telebt devices are not pair-programmedKeith Packard2015-02-06
| | | | | | | Only list telebt-v1 and teledongle-v0 as pair-programmed devices so that newer versions go through the self-programming process Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Add getBytes/putBytes interface to AltosPreferencesBackendKeith Packard2014-11-15
| | | | | | This lets us store arbitrary binary data in the preferences database Signed-off-by: Keith Packard <keithp@keithp.com>
* altosuilib: GPS errors are recorded in floating point, not integersKeith Packard2014-11-06
| | | | | | Fix the format used to present them in the info table. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosuilib: Try to detect the architecture when loading JNI libKeith Packard2014-10-24
| | | | | | | Look at sun.arch.data.model and os.arch to try and load the right libaltos file the first time. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Compute tilt angle from eeprom dataKeith Packard2014-10-04
| | | | | | | | | | | | | | | | This copies the computation of tilt angle from the firmware so that post-flight analysis can also show the data. This change also renames all of the imu values to make them easier to understand: accel gyro axis along roll length of the board across pitch across the board through yaw through the board. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosui: Update 'Imperial Units' checkbox when units changeKeith Packard2014-10-04
| | | | | | | If you have two graphs running, make sure the imperial units checkboxes agree. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib/altosuilib: clean all versions of the .jar fileKeith Packard2014-09-09
| | | | | | | When we switch libary versions, we want to remove the old ones; just have 'make clean' remove all versions of the libaries. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib/altosuilib: Add EasyMega supportKeith Packard2014-09-09
| | | | | | | This makes flashing find the right files, and Monitor Idle show all of the state data. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosuilib: Fix minor scan UI nitsKeith Packard2014-07-14
| | | | | | | | | | Wasn't computing geometry correctly and overlapped the 2400 baud entry with the list of scan results. Was not saving the telemetry rate/telemetry style when switching to monitor mode, which caused the new monitor to come up with the wrong values. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosui: Don't show bluetooth UI bits on mac/windowsKeith Packard2014-07-10
| | | | | | | This just confuses people into thinking that bluetooth is supported on those machines. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosuilib: Allow for unitless axes in graphsKeith Packard2014-07-10
| | | | | | DOP values have no units. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosuilib: Add GPS DOP values to info tableKeith Packard2014-07-10
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altosuilib: Add GPS DOP values to graphKeith Packard2014-07-10
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* micropeak/altosui/telegps: Fix icon file namesKeith Packard2014-07-10
| | | | | | | | | | The icon file names are now structured to have an organization name and application name component. This should avoid collisions with other packages when the icon files are installed in a shared directory, as on Linux. Within the Java .jar file, the new names need to be correctly referenced or we won't find them. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosui: Hide inactive altimeter configuration entriesKeith Packard2014-07-09
| | | | | | | Instead of disabling them, just hide them so that entries that do not apply to a particular device won't get shown at all. Signed-off-by: Keith Packard <keithp@keithp.com>