summaryrefslogtreecommitdiff
path: root/altoslib
Commit message (Collapse)AuthorAge
* 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>
* altoslib: Remove spurious semicolon in AltosReplayReader.javaKeith Packard2017-11-11
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Don't write KML record when height data is missingKeith Packard2017-11-11
| | | | | | This avoids a crash dealing with corrupted flight data Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Move temp GPS API from cal_data to data_listenerKeith Packard2017-10-22
| | | | | | | | This makes the API more consistent, and means that the listener is responsible for mangaing the temp gps state. In particular, the AltosDataListener set_gps API now calls the cal_data function. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Save separate config for local and remote. Use in idleKeith Packard2017-10-14
| | | | | | | | | | | When using the remote link, there are two separate configuration data blocks, that for the local device and for remote. Make the link report both versions, depending on whether it is in remote mode or not. Request config data in remote mode when running idle monitoring so that the presented data is for the remote device, not the local one. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Report un-adjusted ground accel in idle IMU monitorKeith Packard2017-10-14
| | | | | | | The ground accel is the basis of the accel adjustment, so it needs to be delivered in un-adjusted form. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Fix time series filter window computationKeith Packard2017-10-12
| | | | | | Small floating point rounding errors could lead to NaNs. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Don't crash if there's no GPS coord to write KMLKeith Packard2017-10-12
| | | | | | Just check for null before writing as a precaution. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Allow gps time later than requested if it's firstKeith Packard2017-10-12
| | | | | | | | | | When generating a KML file, we want to position markers near the start of the flight section. This is done by looking for a GPS coordinate 'before' the starting point of the flight, which doesn't work well when the first GPS coordinate is later than that. Pick the first point after the chosen time if there isn't an earlier one. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Missing file for filter additions.Keith Packard2017-10-04
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Adapt KML output to make TRA record people happierKeith Packard2017-10-04
| | | | | | | | Provide two paths, one using GPS data the other baro. Replace separate path segments for each state with markers so that the path is a single unit, able to be displayed in the elevation profile widget. Signed-off-by: Keith Packard <keithp@keithp.com>
* altoslib: Add user-selectable filter width for data smoothingKeith Packard2017-10-02
| | | | | | | | | Also switch smoothing window to Kaiser and change default accel filter width to 1 second instead of 4 seconds. Now users can play with the filter and see what it does. Signed-off-by: Keith Packard <keithp@keithp.com>