summaryrefslogtreecommitdiff
path: root/altoslib
Commit message (Collapse)AuthorAge
* altoslib: Don't crash when map flight data is missingKeith Packard2019-09-25
| | | | | | | Just a couple of null pointer checks to allow the map display to come up even when no data are available. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosui: Add speed and gps height to map display dataKeith Packard2019-09-02
| | | | | | | | | And generalize the API so that any other GPS data could be added in the future. This feature was proposed by Mike Beattie Signed-off-by: Keith Packard <keithp@keithp.com>
* altosui: Display data for point nearest cursor in map viewKeith Packard2019-08-31
| | | | | | Include time, lat and lon Signed-off-by: Keith Packard <keithp@keithp.com>
* Use discovered java path for compiler and jni include filesKeith Packard2019-07-17
| | | | | | | | Instead of using the discovered java bits just for jni.h, also use javac from that directory. Add JAVA_VERSION param to set language version for newer compilers. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Stop using deprecated Java functionalityKeith Packard2019-07-17
| | | | | | | new Double(x) -> Double.valueOf(x) c.newInstance() -> c.getDeclaredConstructor().newInstance() Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Add support for MicroPeak v2 eeprom formatKeith Packard2019-06-18
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altosui/telegps: Display error message when attempting to graph unknown filesKeith Packard2019-06-18
| | | | | | Instead of presenting an empty graph window. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Always create an ordered record set for eeprom filesKeith Packard2019-06-18
| | | | | | | | If we can't parse the format, just leave it empty. This makes code handling arbitrary records much easier as it doesn't have to check for the ordered set existing. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Correct monitor idle IMU data for EasyMega v2Keith Packard2019-04-18
| | | | | | The IMU on EasyMega v2 is rotated from the other devices using this sensor. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Fetch correct mag along data for EasyMega v2Keith Packard2019-04-18
| | | | | | Was using the wrong axis (y) instead of the correct one (x) Signed-off-by: Keith Packard <keithp@keithp.com>
* Use strip-nondeterminism to fix JAR timestampsKeith Packard2019-02-03
| | | | | | | | .jar files are just zip files, and contain dates. These will cause the build to be non-reproducible. Use strip-nondeterminism to smash all of these back to a fixed value. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Remove spurious debug printf in AltosCalDataKeith Packard2018-12-30
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: When flashing hardware, pull USB data from device if neededKeith Packard2018-10-20
| | | | | | | | | | | | If we fail to extract USB vid/pid and product values from the device ROM, use the data discovered over USB when the device was originally discovered. Also, use the USB product to select appropriate .ihx files instead of only using the USB vid/pid. This will help people avoid using the wrong file when reflashing devices. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Add support for EasyMega-v2Keith Packard2018-10-20
| | | | | | | adxl375 instead of mma6555. mpu9250 rotated 90° compared with other megas. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Add support for TeleGPS v2Keith Packard2018-10-20
| | | | | | | The battery voltage ADC values are different from TeleGPS v1 (max 4095 instead of 32767). Signed-off-by: Keith Packard <keithp@keithp.com>
* Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altosBdale Garbee2018-10-20
|\
| * altoslib: Add ADXL375 support and EasyMega v2.0 supportKeith Packard2018-10-19
| | | | | | | | | | | | EasyMega v2.0 replaces the MMA655X with an ADXL375 part. Signed-off-by: Keith Packard <keithp@keithp.com>
* | altoslib: fix computation of TeleGPS battery voltageBdale Garbee2018-10-20
|/
* altoslib: Be less chatty about map loadingKeith Packard2018-10-07
| | | | | | Only mention when a new tile is being fetched from the server. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: NumberFormat can't be shared between parsersKeith Packard2018-10-07
| | | | | | | | | AltosJson uses NumberFormat to ensure locale-independent parsing of values. However, NumberFormat appears to have some internal state which means that each thread needs to have an independent NumberFormat object. Create one for each parser as needed. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosui/altosdroid: Disable offline map type selectionsKeith Packard2018-10-07
| | | | | | | Our server only supports hybrid maps for now. If that changes, we can re-add this support easily enough. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Retry map connections 10 times on network failureKeith Packard2018-10-06
| | | | | | This covers a host of problems between the application and google maps. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Change map loading to lat=&lon= from center=Keith Packard2018-10-06
| | | | | | This is easier to parse. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Use https for launch-sites.txtKeith Packard2018-10-06
| | | | | | http causes a redirect, which Java doesn't handle Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Switch to maps.altusmetrum.org when no google map key is availableKeith Packard2018-10-06
| | | | | | | The map key is only usable from maps.altusmetrum.org at this point, and that service will be proxying for everyone in the near future. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Allow launch site URL to be overridden at runtimeKeith Packard2018-10-06
| | | | | | | Expose a public variable, AltosLaunchSites.launch_sites_url, that will be used in place of the environment variable or pre-defined value. Signed-off-by: Keith Packard <keithp@keithp.com>
* Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altosBdale Garbee2018-10-06
|\
| * map-server: Add maps proxy serverKeith Packard2018-10-06
| | | | | | | | | | | | This creates a map proxy server to handle the new Google Maps API requirements Signed-off-by: Keith Packard <keithp@keithp.com>
* | altoslib: update launch-sites.txt location to new home at maps.altusmetrum.orgBdale Garbee2018-10-06
|/
* altoslib: Add missing AltosUnitInfo filesKeith Packard2018-10-04
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Fix gyro headings in CSV filesKeith Packard2018-10-03
| | | | | | Use yaw/pitch/roll instead of x/y/z Signed-off-by: Keith Packard <keithp@keithp.com>
* altosui: Fetch RF calibration value for TBT v4.0 units from webKeith Packard2018-10-02
| | | | | | | | | | We shipped a pile of TBT v4.0 units without programming the RF calibration value into flash. This change checks to see if the target is in the right serial number range and has the default RF calibration value, in which case it fetches the RF calibration value from our web site. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Reduce debug printf spamming during flashing operationKeith Packard2018-10-02
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Use common constants for flash action messagesKeith Packard2018-08-22
| | | | | | | Place messages in AltosFlashListener instead of using the same strings in three different places. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosuilib: Don't show radio parameter when reflashing radioless devicesKeith Packard2018-08-22
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* Bump java lib versions to 13Keith Packard2018-08-15
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add separate 'ao_launch_tick'. Use in pyro and lockout.Keith Packard2018-08-05
| | | | | | | | | | | | | | | | Prior to this, there was only ao_boost_tick, which got reset at each motor burn start. That meant there wasn't any way to measure total flight time for pyro channels and 'apogee lockout' was based on time since most recent motor start instead of total flight time. Now pyro channels and apogee lockout both use total flight time, while motor burn length still uses time since most recent motor burn start (as it should). Docs and UI updated to use 'launch' instead of 'boost' to try and make the change clear. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Make stop_remote delay depend on the data rateKeith Packard2018-07-04
| | | | | | | It takes longer to flush commands at 2400 baud, so wait longer when disabling remote mode. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Revert field name changes for accel cal valuesKeith Packard2018-05-30
| | | | | | | These names get written in the JSON part of all .eeprom files, so we can't change the names or the values won't be read and written correctly. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Fix Idle Monitor on TeleMega v3Keith Packard2018-04-28
| | | | | | | | | | The new IMU includes a mag sensor, and there's no separate mag sensor. Add support for reading the mag sensor values from the IMU, separate out v3 from previous TeleMega versions so that the code can stop trying to read the mag sensor. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Fix data fetching during flashing of cc1111-based devicesKeith Packard2018-04-26
| | | | | | | | | | | We want to get enough information about the target device to verify that the new firmware matches, so fetch 512 bytes instead of just barely enough to cover the romconfig data. Also catch out-of-bounds accesses and handle them, in case even this large array isn't enough. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Keep config data accel cal in antenna up form.Keith Packard2018-04-26
| | | | | | | | | | | | Instead of letting the accel cal data live in whatever form it was fetched in, keep it in antenna up form and provide it in whatever orientation is necessary. This fixes bugs in changing pad configuration where the accel cal values from the old orientation would get used in the new orientation and wreck them. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Flush settings restoration commands after accel calKeith Packard2018-04-26
| | | | | | | | To avoid mangling settings when the user doesn't 'save' things, restore the original accel cal values and orientation after finishing accelerometer calibration. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Clarify terms in Mega pyro configKeith Packard2018-04-26
| | | | | | | | | | Suggestions from Bob Brown et al Speed -> ascent rate Height -> height above ground Acceleration -> Vertical acceleration Signed-off-by: Keith Packard <keithp@keithp.com>
* micropeak: Make reported 'max height' value show filtered max heightKeith Packard2018-04-26
| | | | | | | | | | MicroPeak tries to filter out bogus pressure data so that the value reported on the LED is reasonable. We want to report that same value in the UI, which means replacing the normal mechanism for computing max height from the time series of height data with the value computed from the saved minimum pressure value recorded in the device. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib/altosuilib: Validate rom image is for target deviceKeith Packard2018-01-12
| | | | | | This should avoid mis-programming devices with incorrect firmware. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Keep old GPS values when updating dataKeith Packard2017-12-11
| | | | | | | This way, updating satellite information doesn't drop all of the regular GPS data on the floor. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Fix 8 to 12 bit conversion for Mega pyro voltage dataKeith Packard2017-12-09
| | | | | | | The conversion was losing the replicated top four bits by shifting by the wrong amount. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Add support for TeleMega v3.0 log filesKeith Packard2017-12-02
| | | | | | | | | These look much like TeleMega v2.0 log files, except that the mag sensor data now comes from the mpu9250 instead of an external hmc5883. The gyro and 3-axis accel data from the mpu9250 are the same as the mpu6000. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Improve EEprom downloadKeith Packard2017-11-11
| | | | | | | | | * Catch and report CRC errors * Deal with corrupted flight records * Add ability to immediately graph new data * Check before overwriting existing files Signed-off-by: Keith Packard <keithp@keithp.com>