altoslib: Document how to add a new product
authorKeith Packard <keithp@keithp.com>
Tue, 21 Sep 2021 02:58:30 +0000 (19:58 -0700)
committerKeith Packard <keithp@keithp.com>
Tue, 21 Sep 2021 02:58:56 +0000 (19:58 -0700)
Avoid missing some steps

Signed-off-by: Keith Packard <keithp@keithp.com>
altoslib/NewProduct [new file with mode: 0644]

diff --git a/altoslib/NewProduct b/altoslib/NewProduct
new file mode 100644 (file)
index 0000000..e275cce
--- /dev/null
@@ -0,0 +1,52 @@
+When adding a new product to the java code, there are a number of
+places that might need adjustment:
+
+altoslib/
+
+ 1. AltosLib.java
+
+       Declare new log format
+       Declare new USB ids
+       Declare new Product name
+       Add item to product_name function
+
+ 2. AltosIdleFetch.java
+
+       Declare any new sensors, create new sensor class
+       Create new sensor class for ADC values
+       Add new AltosIdler entry to idlers array
+
+ 3. AltosEepromRecordSet.java
+
+       Map new log format to new log record decode class
+
+ 4. AltosIMU.java
+
+       Map new imu_type (which includes orientation) correctly
+
+ 5. AltosConfigData.java
+
+       Adjust invert_accel_value for new log format or product name
+       Adjust use_flash_for_config as needed
+       Adjust various accel_inverted functions
+       Adjust adxl375_axis
+
+ 6. AltosTelemetry.java
+
+       Define new telemetry packet types
+
+
+ 7. AltosTelemetryStandard.java
+
+       Map telemetry packet type to new decoder class
+
+ 8. AltosTelemetry*.java
+
+       Adjust existing telemetry decoders for new sensors
+
+
+altosuilib/
+
+ 1. AltosUSBDevice.java
+
+       Add new product ID as appropriate to matchProduct