altoslib: Remember flight list in AltosConfigData Do this instead of having to re-fetch and re-parse in AltosEepromList Signed-off-by: Keith Packard <keithp@keithp.com>
Bump java lib versions in preparation for 1.9.2 Quite a few changes; let's bump the version so we don't end up with the wrong version on some machine. Signed-off-by: Keith Packard <keithp@keithp.com>
altoslib: Stop using deprecated Java functionality new Double(x) -> Double.valueOf(x) c.newInstance() -> c.getDeclaredConstructor().newInstance() Signed-off-by: Keith Packard <keithp@keithp.com>
altoslib: NumberFormat can't be shared between parsers 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>
Bump java lib versions to 13 Signed-off-by: Keith Packard <keithp@keithp.com>
altoslib,altosuilib: Bump library version numbers The API and ABI have changed a bit since 1.7 Signed-off-by: Keith Packard <keithp@keithp.com>
altoslib: Create data file open helper in AltosLib Use InputStream everywhere, instead of Reader. Create private string input stream as java one is deprecated. Signed-off-by: Keith Packard <keithp@keithp.com>
altoslib: Save eeprom data in new .eeprom format A chunk of json for the config values followed by hex numbers for the data. Signed-off-by: Keith Packard <keithp@keithp.com>
altoslib: Hide members from json by prefixing with __ This lets some structures which would otherwise recurse (and crash) get converted to json, assuming the hidden members aren't relevant. Signed-off-by: Keith Packard <keithp@keithp.com>
Switch from GPLv2 to GPLv2+ Signed-off-by: Keith Packard <keithp@keithp.com>
altoslib: Stop reflective JSON class walk at Object instead of null Android has classes above Object which are all tied together which cause the object walking to fail in pretty spectacular ways. As Object has no interesting fields, that serves as a fine barrier to the super class walk and works on both android and real java. Signed-off-by: Keith Packard <keithp@keithp.com>
altoslib: Add back some JSON exception debugging printfs These make it possible to figure out where the JSON code went wrong. Signed-off-by: Keith Packard <keithp@keithp.com>
altoslib: Add construction for remaining primitive array types to JSON AltosCompanion has an array of ints, which was missed until I tried a telemetry file with companion data. Signed-off-by: Keith Packard <keithp@keithp.com>
altoslib: Get rid of manual JSON encoding stuff Now that the reflective JSON stuff is working, we can delete all of the manual code. Signed-off-by: Keith Packard <keithp@keithp.com>
altoslib: Add JSON-based object saving/restoring code This uses Java reflection to construct JSON strings for most Java objects. Signed-off-by: Keith Packard <keithp@keithp.com>