Merge branch 'master' into branch-1.9
authorBdale Garbee <bdale@gag.com>
Mon, 20 Feb 2023 01:24:56 +0000 (18:24 -0700)
committerBdale Garbee <bdale@gag.com>
Mon, 20 Feb 2023 01:24:56 +0000 (18:24 -0700)
35 files changed:
Makefile.am
Releasing
altoslib/AltosIMU.java
altosui/Makefile.am
altosui/altos-windows.nsi.in
ao-bringup/test-telemega [deleted file]
ao-bringup/test-telemega-v5.0 [new file with mode: 0755]
ao-bringup/test-telemega-v6.0 [new file with mode: 0755]
ao-bringup/test-telemetrum [deleted file]
ao-bringup/test-telemetrum-v3.0 [new file with mode: 0755]
ao-bringup/test-telemetrum-v4.0 [new file with mode: 0755]
ao-bringup/turnon_telemega
ao-bringup/turnon_telemega_v5.0 [new file with mode: 0755]
ao-bringup/turnon_telemetrum
ao-bringup/turnon_telemetrum_v3.0 [new file with mode: 0755]
ao-tools/ao-flash/ao-flash-samd21
ao-tools/ao-test-pressure/.gitignore [new file with mode: 0644]
configure.ac
doc/Makefile.am
doc/easymini-release-notes.inc
doc/release-notes-1.9.15.inc [new file with mode: 0644]
doc/release-notes.inc
doc/specs.inc
doc/telegps-release-notes.inc
src/Makefile
src/csm84clio-v0.1/Makefile [new file with mode: 0644]
src/csm84clio-v0.1/ao_csm84clio.c [new file with mode: 0644]
src/csm84clio-v0.1/ao_pins.h [new file with mode: 0644]
src/csm84clio-v0.1/flash-loader/Makefile [new file with mode: 0644]
src/csm84clio-v0.1/flash-loader/ao_pins.h [new file with mode: 0644]
src/easymega-v3.0/ao_pins.h
src/telemega-v5.0/ao_pins.h
src/telemega-v6.0/.gitignore [new file with mode: 0644]
src/telemega-v6.0/ao_pins.h
src/telemetrum-v4.0/.gitignore [new file with mode: 0644]

index 9fe615cc392b812ccb9ef3d91896b086be60b88e..08765810d76c14d6fd0564f390140b42e07bd912 100644 (file)
@@ -67,8 +67,10 @@ fat_altos = \
        src/telemega-v3.0/telemega-v3.0-$(VERSION).ihx \
        src/telemega-v4.0/telemega-v4.0-$(VERSION).ihx \
        src/telemega-v5.0/telemega-v5.0-$(VERSION).ihx \
+       src/telemega-v6.0/telemega-v6.0-$(VERSION).ihx \
        src/telemetrum-v2.0/telemetrum-v2.0-$(VERSION).ihx \
        src/telemetrum-v3.0/telemetrum-v3.0-$(VERSION).ihx \
+       src/telemetrum-v4.0/telemetrum-v4.0-$(VERSION).ihx \
        src/telelco-v2.0/telelco-v2.0-$(VERSION).ihx \
        src/telefireeight-v1.0/telefireeight-v1.0-$(VERSION).ihx \
        src/telefireeight-v2.0/telefireeight-v2.0-$(VERSION).ihx
index 939b10b71eb7872e01f8d8542e51fa1675d41c3c..34ac514c1ab582998e3b737a1d25532819a886f5 100644 (file)
--- a/Releasing
+++ b/Releasing
@@ -118,7 +118,7 @@ These are Bdale's notes on how to do a release.
           src/telebt-v[3-4].0/{*.elf,*.ihx,*.map} \
           src/teledongle-v3.0/{*.elf,*.ihx,*.map} \
           src/telegps-v[1-2].0/{*.elf,*.ihx,*.map} \
-          src/telemega-v[1-5].0/{*.elf,*.ihx,*.map} \
+          src/telemega-v[1-6].0/{*.elf,*.ihx,*.map} \
           src/telemetrum-v[2-4].0/{*.elf,*.ihx,*.map} \
           src/telemini-v3.0/{*.elf,*.ihx,*.map} \
           src/telelco-v2.0/{*.elf,*.ihx,*.map} \
@@ -132,7 +132,7 @@ These are Bdale's notes on how to do a release.
           src/telebt-v[3-4].0/flash-loader/{*.elf,*.bin,*.map} \
           src/teledongle-v3.0/flash-loader/*.elf \
           src/telegps-v[1-2].0/flash-loader/{*.elf,*.bin,*.map} \
-          src/telemega-v[1-5].0/flash-loader/*.elf \
+          src/telemega-v[1-6].0/flash-loader/*.elf \
           src/telemetrum-v[2-4].0/flash-loader/*.elf \
           src/telemini-v3.0/flash-loader/{*.elf,*.bin,*.map} \
           src/telelco-v2.0/flash-loader/*.elf \
index 87570a79a5458ec580198c714f56d3c92c39e78a..b4ba5a563e08c3b3f768dd9cad3b837eae4249db 100644 (file)
@@ -22,37 +22,37 @@ import java.util.concurrent.*;
 import java.io.*;
 
 public class AltosIMU implements Cloneable {
-       public int              accel_x = AltosLib.MISSING;
-       public int              accel_y = AltosLib.MISSING;
-       public int              accel_z = AltosLib.MISSING;
+       private int             accel_x = AltosLib.MISSING;
+       private int             accel_y = AltosLib.MISSING;
+       private int             accel_z = AltosLib.MISSING;
 
-       public int              accel_along = AltosLib.MISSING;
-       public int              accel_across = AltosLib.MISSING;
-       public int              accel_through = AltosLib.MISSING;
+       private int             accel_along = AltosLib.MISSING;
+       private int             accel_across = AltosLib.MISSING;
+       private int             accel_through = AltosLib.MISSING;
 
-       public int              gyro_x = AltosLib.MISSING;
-       public int              gyro_y = AltosLib.MISSING;
-       public int              gyro_z = AltosLib.MISSING;
+       private int             gyro_x = AltosLib.MISSING;
+       private int             gyro_y = AltosLib.MISSING;
+       private int             gyro_z = AltosLib.MISSING;
 
-       public int              gyro_roll = AltosLib.MISSING;
-       public int              gyro_pitch = AltosLib.MISSING;
-       public int              gyro_yaw = AltosLib.MISSING;
+       private int             gyro_roll = AltosLib.MISSING;
+       private int             gyro_pitch = AltosLib.MISSING;
+       private int             gyro_yaw = AltosLib.MISSING;
 
-       public int              mag_x = AltosLib.MISSING;
-       public int              mag_y = AltosLib.MISSING;
-       public int              mag_z = AltosLib.MISSING;
+       private int             mag_x = AltosLib.MISSING;
+       private int             mag_y = AltosLib.MISSING;
+       private int             mag_z = AltosLib.MISSING;
 
-       public int              mag_along = AltosLib.MISSING;
-       public int              mag_across = AltosLib.MISSING;
-       public int              mag_through = AltosLib.MISSING;
+       private int             mag_along = AltosLib.MISSING;
+       private int             mag_across = AltosLib.MISSING;
+       private int             mag_through = AltosLib.MISSING;
 
-       public int              imu_model = AltosLib.MISSING;
-       public int              mag_model = AltosLib.MISSING;
+       private int             imu_model = AltosLib.MISSING;
+       private int             mag_model = AltosLib.MISSING;
 
-       public static final double      counts_per_g_mpu = 2048.0;
-       public static final double      counts_per_g_bmx = 2048.0;
-       public static final double      counts_per_g_adxl = 20.5;
-       public static final double      counts_per_g_bmi088 = 1365.0;
+       private static final double     counts_per_g_mpu = 2048.0;
+       private static final double     counts_per_g_bmx = 2048.0;
+       private static final double     counts_per_g_adxl = 20.5;
+       private static final double     counts_per_g_bmi088 = 1365.0;
 
        private static double counts_per_g(int imu_type, int imu_model) {
                switch (imu_model) {
@@ -90,13 +90,13 @@ public class AltosIMU implements Cloneable {
                return counts / cpg * AltosConvert.gravity;
        }
 
-       public static final double      GYRO_FULLSCALE_DEGREES_MPU = 2000.0;
-       public static final double      GYRO_COUNTS_MPU = 32767.0;
-       public static final double      counts_per_degree_mpu = GYRO_COUNTS_MPU / GYRO_FULLSCALE_DEGREES_MPU;
-       public static final double      GYRO_FULLSCALE_DEGREES_BMX = 2000.0;
-       public static final double      GYRO_COUNTS_BMX = 32767.0;
-       public static final double      counts_per_degree_bmx = GYRO_COUNTS_BMX / GYRO_FULLSCALE_DEGREES_BMX;
-       public static final double      counts_per_degree_bmi088 = 16.384;
+       private static final double     GYRO_FULLSCALE_DEGREES_MPU = 2000.0;
+       private static final double     GYRO_COUNTS_MPU = 32767.0;
+       private static final double     counts_per_degree_mpu = GYRO_COUNTS_MPU / GYRO_FULLSCALE_DEGREES_MPU;
+       private static final double     GYRO_FULLSCALE_DEGREES_BMX = 2000.0;
+       private static final double     GYRO_COUNTS_BMX = 32767.0;
+       private static final double     counts_per_degree_bmx = GYRO_COUNTS_BMX / GYRO_FULLSCALE_DEGREES_BMX;
+       private static final double     counts_per_degree_bmi088 = 16.384;
 
        private static double counts_per_degree(int imu_type, int imu_model) {
                switch (imu_model) {
@@ -131,11 +131,11 @@ public class AltosIMU implements Cloneable {
                return counts / cpd;
        }
 
-       public static final double MAG_FULLSCALE_GAUSS_MPU = 48.00;     /* 4800µT */
-       public static final double MAG_COUNTS_MPU = 32767.0;
-       public static final double counts_per_gauss_mpu = MAG_COUNTS_MPU / MAG_FULLSCALE_GAUSS_MPU;
+       private static final double MAG_FULLSCALE_GAUSS_MPU = 48.00;    /* 4800µT */
+       private static final double MAG_COUNTS_MPU = 32767.0;
+       private static final double counts_per_gauss_mpu = MAG_COUNTS_MPU / MAG_FULLSCALE_GAUSS_MPU;
 
-       public static final double counts_per_gauss_bmx = 100.0;        /* BMX driver converts to µT */
+       private static final double counts_per_gauss_bmx = 100.0;       /* BMX driver converts to µT */
 
        public static double counts_per_gauss(int imu_type, int imu_model) {
                switch (imu_model) {
@@ -156,7 +156,7 @@ public class AltosIMU implements Cloneable {
                return AltosLib.MISSING;
        }
 
-       public boolean parse_string(String line) {
+       private boolean parse_string(String line) {
                if (line.startsWith("Accel:")) {
 
                        String[] items = line.split("\\s+");
index e61dd3a82c9947ab5703709758c2eb0820c98c9e..312f4f520ac4deb46ff10ff971683e6c77ed22d9 100644 (file)
@@ -124,7 +124,7 @@ FIRMWARE_TD=$(FIRMWARE_TD_3_0)
 
 FIRMWARE_TM_2_0=$(top_srcdir)/src/telemetrum-v2.0/telemetrum-v2.0-$(VERSION).ihx
 FIRMWARE_TM_3_0=$(top_srcdir)/src/telemetrum-v3.0/telemetrum-v3.0-$(VERSION).ihx
-#FIRMWARE_TM_4_0=$(top_srcdir)/src/telemetrum-v4.0/telemetrum-v4.0-$(VERSION).ihx
+FIRMWARE_TM_4_0=$(top_srcdir)/src/telemetrum-v4.0/telemetrum-v4.0-$(VERSION).ihx
 FIRMWARE_TM=$(FIRMWARE_TM_2_0) $(FIRMWARE_TM_3_0) $(FIRMWARE_TM_4_0)
 
 FIRMWARE_TELEMINI_3_0=$(top_srcdir)/src/telemini-v3.0/telemini-v3.0-$(VERSION).ihx
@@ -139,7 +139,8 @@ FIRMWARE_TMEGA_2_0=$(top_srcdir)/src/telemega-v2.0/telemega-v2.0-$(VERSION).ihx
 FIRMWARE_TMEGA_3_0=$(top_srcdir)/src/telemega-v3.0/telemega-v3.0-$(VERSION).ihx
 FIRMWARE_TMEGA_4_0=$(top_srcdir)/src/telemega-v4.0/telemega-v4.0-$(VERSION).ihx
 FIRMWARE_TMEGA_5_0=$(top_srcdir)/src/telemega-v5.0/telemega-v5.0-$(VERSION).ihx
-FIRMWARE_TMEGA=$(FIRMWARE_TMEGA_1_0) $(FIRMWARE_TMEGA_2_0) $(FIRMWARE_TMEGA_3_0) $(FIRMWARE_TMEGA_4_0) $(FIRMWARE_TMEGA_5_0)
+FIRMWARE_TMEGA_6_0=$(top_srcdir)/src/telemega-v6.0/telemega-v6.0-$(VERSION).ihx
+FIRMWARE_TMEGA=$(FIRMWARE_TMEGA_1_0) $(FIRMWARE_TMEGA_2_0) $(FIRMWARE_TMEGA_3_0) $(FIRMWARE_TMEGA_4_0) $(FIRMWARE_TMEGA_5_0) $(FIRMWARE_TMEGA_6_0)
 
 FIRMWARE_EMINI_1_0=$(top_srcdir)/src/easymini-v1.0/easymini-v1.0-$(VERSION).ihx
 FIRMWARE_EMINI_2_0=$(top_srcdir)/src/easymini-v2.0/easymini-v2.0-$(VERSION).ihx
index 620a5cefea5185a4c7ec9785f4e4dc2570380fe4..d35ad69ffc9de38dc084613cd3bf507835328795 100644 (file)
@@ -122,7 +122,7 @@ Section "Firmware"
 
        File "../src/telemetrum-v2.0/telemetrum-v2.0-${VERSION}.ihx"
        File "../src/telemetrum-v3.0/telemetrum-v3.0-${VERSION}.ihx"
-;      File "../src/telemetrum-v4.0/telemetrum-v4.0-${VERSION}.ihx"
+       File "../src/telemetrum-v4.0/telemetrum-v4.0-${VERSION}.ihx"
        File "../src/telemini-v3.0/telemini-v3.0-${VERSION}.ihx"
        File "../src/telegps-v1.0/telegps-v1.0-${VERSION}.ihx"
        File "../src/telegps-v2.0/telegps-v2.0-${VERSION}.ihx"
@@ -134,6 +134,7 @@ Section "Firmware"
        File "../src/telemega-v3.0/telemega-v3.0-${VERSION}.ihx"
        File "../src/telemega-v4.0/telemega-v4.0-${VERSION}.ihx"
        File "../src/telemega-v5.0/telemega-v5.0-${VERSION}.ihx"
+       File "../src/telemega-v6.0/telemega-v6.0-${VERSION}.ihx"
        File "../src/easymini-v1.0/easymini-v1.0-${VERSION}.ihx"
        File "../src/easymini-v2.0/easymini-v2.0-${VERSION}.ihx"
        File "../src/easymini-v3.0/easymini-v3.0-${VERSION}.ihx"
diff --git a/ao-bringup/test-telemega b/ao-bringup/test-telemega
deleted file mode 100755 (executable)
index 14e4a45..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/bin/sh
-
-VERSION=5.0
-PRODUCT=TeleMega
-BASE=`echo $PRODUCT | tr 'A-Z' 'a-z'`
-
-echo "$PRODUCT-v$VERSION Test Program"
-echo "Copyright 2021 by Bdale Garbee.  Released under GPL v3"
-echo
-echo "Expectations:"
-echo "\t$PRODUCT v$VERSION powered from USB"
-echo
-
-ret=1
-ao-list | while read product serial dev; do
-    case "$product" in
-       "$PRODUCT-v$VERSION")
-
-           echo "Testing $product $serial $dev"
-
-           ./test-igniters $dev --rplus=100 --rminus=27 --adcmax=4095 main drogue 3 0 1 2
-           echo""
-
-           echo "Testing baro sensor"
-           ../ao-tools/ao-test-baro/ao-test-baro --tty="$dev"
-
-           case $? in
-               0)
-                   ;;
-               *)
-                   echo "failed"
-                   exit 1
-           esac
-           echo""
-
-           FLASHSIZE=8388608
-
-           echo "Testing flash"
-           ../ao-tools/ao-test-flash/ao-test-flash --tty="$dev" "$FLASHSIZE"
-
-           case $? in
-               0)
-                   ;;
-               *)
-                   echo "failed"
-                   exit 1
-           esac
-           echo""
-
-           echo "Testing GPS"
-           ../ao-tools/ao-test-gps/ao-test-gps --tty="$dev"
-
-           case $? in
-               0)
-                   ;;
-               *)
-                   echo "failed"
-                   exit 1
-           esac
-           echo""
-
-           echo "$PRODUCT-v$VERSION" serial "$serial" is ready to ship
-           echo "\007"
-           ret=0
-           ;;
-    esac
-done
diff --git a/ao-bringup/test-telemega-v5.0 b/ao-bringup/test-telemega-v5.0
new file mode 100755 (executable)
index 0000000..14e4a45
--- /dev/null
@@ -0,0 +1,67 @@
+#!/bin/sh
+
+VERSION=5.0
+PRODUCT=TeleMega
+BASE=`echo $PRODUCT | tr 'A-Z' 'a-z'`
+
+echo "$PRODUCT-v$VERSION Test Program"
+echo "Copyright 2021 by Bdale Garbee.  Released under GPL v3"
+echo
+echo "Expectations:"
+echo "\t$PRODUCT v$VERSION powered from USB"
+echo
+
+ret=1
+ao-list | while read product serial dev; do
+    case "$product" in
+       "$PRODUCT-v$VERSION")
+
+           echo "Testing $product $serial $dev"
+
+           ./test-igniters $dev --rplus=100 --rminus=27 --adcmax=4095 main drogue 3 0 1 2
+           echo""
+
+           echo "Testing baro sensor"
+           ../ao-tools/ao-test-baro/ao-test-baro --tty="$dev"
+
+           case $? in
+               0)
+                   ;;
+               *)
+                   echo "failed"
+                   exit 1
+           esac
+           echo""
+
+           FLASHSIZE=8388608
+
+           echo "Testing flash"
+           ../ao-tools/ao-test-flash/ao-test-flash --tty="$dev" "$FLASHSIZE"
+
+           case $? in
+               0)
+                   ;;
+               *)
+                   echo "failed"
+                   exit 1
+           esac
+           echo""
+
+           echo "Testing GPS"
+           ../ao-tools/ao-test-gps/ao-test-gps --tty="$dev"
+
+           case $? in
+               0)
+                   ;;
+               *)
+                   echo "failed"
+                   exit 1
+           esac
+           echo""
+
+           echo "$PRODUCT-v$VERSION" serial "$serial" is ready to ship
+           echo "\007"
+           ret=0
+           ;;
+    esac
+done
diff --git a/ao-bringup/test-telemega-v6.0 b/ao-bringup/test-telemega-v6.0
new file mode 100755 (executable)
index 0000000..881a74b
--- /dev/null
@@ -0,0 +1,67 @@
+#!/bin/sh
+
+VERSION=6.0
+PRODUCT=TeleMega
+BASE=`echo $PRODUCT | tr 'A-Z' 'a-z'`
+
+echo "$PRODUCT-v$VERSION Test Program"
+echo "Copyright 2023 by Bdale Garbee.  Released under GPL v3"
+echo
+echo "Expectations:"
+echo "\t$PRODUCT v$VERSION powered from USB"
+echo
+
+ret=1
+ao-list | while read product serial dev; do
+    case "$product" in
+       "$PRODUCT-v$VERSION")
+
+           echo "Testing $product $serial $dev"
+
+           ./test-igniters $dev --rplus=100 --rminus=27 --adcmax=4095 main drogue 3 0 1 2
+           echo""
+
+           echo "Testing baro sensor"
+           ../ao-tools/ao-test-baro/ao-test-baro --tty="$dev"
+
+           case $? in
+               0)
+                   ;;
+               *)
+                   echo "failed"
+                   exit 1
+           esac
+           echo""
+
+           FLASHSIZE=8388608
+
+           echo "Testing flash"
+           ../ao-tools/ao-test-flash/ao-test-flash --tty="$dev" "$FLASHSIZE"
+
+           case $? in
+               0)
+                   ;;
+               *)
+                   echo "failed"
+                   exit 1
+           esac
+           echo""
+
+           echo "Testing GPS"
+           ../ao-tools/ao-test-gps/ao-test-gps --tty="$dev"
+
+           case $? in
+               0)
+                   ;;
+               *)
+                   echo "failed"
+                   exit 1
+           esac
+           echo""
+
+           echo "$PRODUCT-v$VERSION" serial "$serial" is ready to ship
+           echo "\007"
+           ret=0
+           ;;
+    esac
+done
diff --git a/ao-bringup/test-telemetrum b/ao-bringup/test-telemetrum
deleted file mode 100755 (executable)
index 9142718..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/bin/sh
-
-VERSION=3.0
-PRODUCT=TeleMetrum
-BASE=`echo $PRODUCT | tr 'A-Z' 'a-z'`
-
-echo "$PRODUCT-v$VERSION Test Program"
-echo "Copyright 2019 by Bdale Garbee.  Released under GPL v2"
-echo
-echo "Expectations:"
-echo "\t$PRODUCT v$VERSION powered from USB"
-echo
-
-ret=1
-ao-list | while read product serial dev; do
-    case "$product" in
-       "$PRODUCT-v$VERSION")
-
-           echo "Testing $product $serial $dev"
-           echo ""
-
-           ./test-igniters "$dev" --rplus=100 --rminus=27 --adcmax=4095 drogue main
-           echo ""
-
-           echo "Testing baro sensor"
-           ../ao-tools/ao-test-baro/ao-test-baro --tty="$dev"
-
-           case $? in
-               0)
-                   ;;
-               *)
-                   echo "failed"
-                   exit 1
-           esac
-           echo""
-
-           FLASHSIZE=8388608
-
-           echo "Testing flash"
-           ../ao-tools/ao-test-flash/ao-test-flash --tty="$dev" "$FLASHSIZE"
-
-           case $? in
-               0)
-                   ;;
-               *)
-                   echo "failed"
-                   exit 1
-           esac
-           echo""
-
-           echo "Testing GPS"
-           ../ao-tools/ao-test-gps/ao-test-gps --tty="$dev"
-
-           case $? in
-               0)
-                   ;;
-               *)
-                   echo "failed"
-                   exit 1
-           esac
-           echo""
-
-           echo "$PRODUCT-v$VERSION" serial "$serial" is ready to ship
-           echo "\007"
-           ret=0
-           ;;
-    esac
-done
diff --git a/ao-bringup/test-telemetrum-v3.0 b/ao-bringup/test-telemetrum-v3.0
new file mode 100755 (executable)
index 0000000..9142718
--- /dev/null
@@ -0,0 +1,68 @@
+#!/bin/sh
+
+VERSION=3.0
+PRODUCT=TeleMetrum
+BASE=`echo $PRODUCT | tr 'A-Z' 'a-z'`
+
+echo "$PRODUCT-v$VERSION Test Program"
+echo "Copyright 2019 by Bdale Garbee.  Released under GPL v2"
+echo
+echo "Expectations:"
+echo "\t$PRODUCT v$VERSION powered from USB"
+echo
+
+ret=1
+ao-list | while read product serial dev; do
+    case "$product" in
+       "$PRODUCT-v$VERSION")
+
+           echo "Testing $product $serial $dev"
+           echo ""
+
+           ./test-igniters "$dev" --rplus=100 --rminus=27 --adcmax=4095 drogue main
+           echo ""
+
+           echo "Testing baro sensor"
+           ../ao-tools/ao-test-baro/ao-test-baro --tty="$dev"
+
+           case $? in
+               0)
+                   ;;
+               *)
+                   echo "failed"
+                   exit 1
+           esac
+           echo""
+
+           FLASHSIZE=8388608
+
+           echo "Testing flash"
+           ../ao-tools/ao-test-flash/ao-test-flash --tty="$dev" "$FLASHSIZE"
+
+           case $? in
+               0)
+                   ;;
+               *)
+                   echo "failed"
+                   exit 1
+           esac
+           echo""
+
+           echo "Testing GPS"
+           ../ao-tools/ao-test-gps/ao-test-gps --tty="$dev"
+
+           case $? in
+               0)
+                   ;;
+               *)
+                   echo "failed"
+                   exit 1
+           esac
+           echo""
+
+           echo "$PRODUCT-v$VERSION" serial "$serial" is ready to ship
+           echo "\007"
+           ret=0
+           ;;
+    esac
+done
diff --git a/ao-bringup/test-telemetrum-v4.0 b/ao-bringup/test-telemetrum-v4.0
new file mode 100755 (executable)
index 0000000..9fbacb5
--- /dev/null
@@ -0,0 +1,68 @@
+#!/bin/sh
+
+VERSION=4.0
+PRODUCT=TeleMetrum
+BASE=`echo $PRODUCT | tr 'A-Z' 'a-z'`
+
+echo "$PRODUCT-v$VERSION Test Program"
+echo "Copyright 2023 by Bdale Garbee.  Released under GPL v2"
+echo
+echo "Expectations:"
+echo "\t$PRODUCT v$VERSION powered from USB"
+echo
+
+ret=1
+ao-list | while read product serial dev; do
+    case "$product" in
+       "$PRODUCT-v$VERSION")
+
+           echo "Testing $product $serial $dev"
+           echo ""
+
+           ./test-igniters "$dev" --rplus=100 --rminus=27 --adcmax=4095 drogue main
+           echo ""
+
+           echo "Testing baro sensor"
+           ../ao-tools/ao-test-baro/ao-test-baro --tty="$dev"
+
+           case $? in
+               0)
+                   ;;
+               *)
+                   echo "failed"
+                   exit 1
+           esac
+           echo""
+
+           FLASHSIZE=8388608
+
+           echo "Testing flash"
+           ../ao-tools/ao-test-flash/ao-test-flash --tty="$dev" "$FLASHSIZE"
+
+           case $? in
+               0)
+                   ;;
+               *)
+                   echo "failed"
+                   exit 1
+           esac
+           echo""
+
+           echo "Testing GPS"
+           ../ao-tools/ao-test-gps/ao-test-gps --tty="$dev"
+
+           case $? in
+               0)
+                   ;;
+               *)
+                   echo "failed"
+                   exit 1
+           esac
+           echo""
+
+           echo "$PRODUCT-v$VERSION" serial "$serial" is ready to ship
+           echo "\007"
+           ret=0
+           ;;
+    esac
+done
index 2e8b7492a9dae31bb588ed086286b90f92e807f0..b433133b6d5911842ab25e57d37c05c94f103011 100755 (executable)
@@ -14,12 +14,12 @@ else
        exit 1
 fi
 
-VERSION=5.0
+VERSION=6.0
 REPO=~/altusmetrumllc/Binaries
 PRODUCT=TeleMega
 
 echo "$PRODUCT v$VERSION Turn-On and Calibration Program"
-echo "Copyright 2021 by Bdale Garbee.  Released under GPL v3"
+echo "Copyright 2023 by Bdale Garbee.  Released under GPL v3"
 echo
 echo "Expectations:"
 echo "\t$PRODUCT v$VERSION powered from USB"
@@ -76,6 +76,6 @@ done
 
 echo 'E 1' > $dev
 
-./test-telemega
+./test-telemega-v6.0
 
 exit $?
diff --git a/ao-bringup/turnon_telemega_v5.0 b/ao-bringup/turnon_telemega_v5.0
new file mode 100755 (executable)
index 0000000..eb26090
--- /dev/null
@@ -0,0 +1,81 @@
+#!/bin/sh
+
+if [ -x /usr/bin/ao-flash-stm ]; then
+       FLASH_STM=/usr/bin/ao-flash-stm
+else
+       echo "Can't find ao-flash-stm!  Aborting."
+       exit 1
+fi
+
+if [ -x /usr/bin/ao-usbload ]; then
+       USBLOAD=/usr/bin/ao-usbload
+else
+       echo "Can't find ao-usbload!  Aborting."
+       exit 1
+fi
+
+VERSION=5.0
+REPO=~/altusmetrumllc/Binaries
+PRODUCT=TeleMega
+
+echo "$PRODUCT v$VERSION Turn-On and Calibration Program"
+echo "Copyright 2021 by Bdale Garbee.  Released under GPL v3"
+echo
+echo "Expectations:"
+echo "\t$PRODUCT v$VERSION powered from USB"
+echo "\t\twith ST-Link-V2 cabled to debug header"
+echo "\t\twith coax from UHF to frequency counter"
+echo
+
+case $# in
+    1)
+       SERIAL="$1"
+       echo "$PRODUCT-$VERSION serial number: $SERIAL" 
+       ;;
+    0)
+       echo -n "$PRODUCT-$VERSION serial number: "
+       read SERIAL
+       ;;
+    *)
+       echo "Usage: $0 <serial-number>" 1>&2
+       exit 1;
+       ;;
+esac
+
+echo $FLASH_STM
+
+$FLASH_STM $REPO/loaders/telemega-v$VERSION*.elf 
+
+sleep 3
+
+$USBLOAD --serial=$SERIAL --force $REPO/telemega-v$VERSION*.elf || exit 1
+
+sleep 5
+
+dev=`ao-list | awk '/TeleMega-v'"$VERSION"'/ { print $3; exit(0); }'`
+
+case "$dev" in
+/dev/tty*)
+       echo "TeleMega found on $dev"
+       ;;
+*)
+       echo 'No TeleMega-v'"$VERSION"' found'
+       exit 1
+       ;;
+esac
+
+echo 'E 0' > $dev
+
+SERIAL=$SERIAL ./cal-freq $dev
+
+failed=1
+while [ $failed = 1 ]; do
+    ../ao-tools/ao-cal-accel/ao-cal-accel $dev
+    failed=$?
+done
+
+echo 'E 1' > $dev
+
+./test-telemega-v5.0
+
+exit $?
index 9d8f18964968ca9f2a4e885a34c44ac44d80938d..bb455c988d6bd8991e61734435ba5bba2f35f08f 100755 (executable)
@@ -1,9 +1,9 @@
 #!/bin/sh
 
-if [ -x /usr/bin/ao-flash-stm ]; then
-       FLASH_STM=/usr/bin/ao-flash-stm
+if [ -x /usr/bin/ao-flash-samd21 ]; then
+       FLASH_STM=/usr/bin/ao-flash-samd21
 else
-       echo "Can't find ao-flash-stm!  Aborting."
+       echo "Can't find ao-flash-samd21!  Aborting."
        exit 1
 fi
 
@@ -14,11 +14,11 @@ else
        exit 1
 fi
 
-VERSION=3.0
+VERSION=4.0
 PRODUCT=TeleMetrum
 
 echo "$PRODUCT v$VERSION Turn-On and Calibration Program"
-echo "Copyright 2014 by Bdale Garbee.  Released under GPL v2"
+echo "Copyright 2023 by Bdale Garbee.  Released under GPL v2"
 echo
 echo "Expectations:"
 echo "\t$PRODUCT v$VERSION powered from USB"
@@ -76,6 +76,6 @@ done
 
 echo 'E 1' > $dev
 
-./test-telemetrum
+./test-telemetrum-v4.0
 
 exit $?
diff --git a/ao-bringup/turnon_telemetrum_v3.0 b/ao-bringup/turnon_telemetrum_v3.0
new file mode 100755 (executable)
index 0000000..96de4ad
--- /dev/null
@@ -0,0 +1,81 @@
+#!/bin/sh
+
+if [ -x /usr/bin/ao-flash-stm ]; then
+       FLASH_STM=/usr/bin/ao-flash-stm
+else
+       echo "Can't find ao-flash-stm!  Aborting."
+       exit 1
+fi
+
+if [ -x /usr/bin/ao-usbload ]; then
+       USBLOAD=/usr/bin/ao-usbload
+else
+       echo "Can't find ao-usbload!  Aborting."
+       exit 1
+fi
+
+VERSION=3.0
+PRODUCT=TeleMetrum
+
+echo "$PRODUCT v$VERSION Turn-On and Calibration Program"
+echo "Copyright 2014 by Bdale Garbee.  Released under GPL v2"
+echo
+echo "Expectations:"
+echo "\t$PRODUCT v$VERSION powered from USB"
+echo "\t\twith ST-Link-V2 cabled to debug header"
+echo "\t\twith coax from UHF to frequency counter"
+echo
+echo -n "$PRODUCT-$VERSION serial number: "
+
+case $# in
+    1)
+       SERIAL="$1"
+       echo "$PRODUCT-$VERSION serial number: $SERIAL" 
+       ;;
+    0)
+       echo -n "$PRODUCT-$VERSION serial number: "
+       read SERIAL
+       ;;
+    *)
+       echo "Usage: $0 <serial-number>" 1>&2
+       exit 1;
+       ;;
+esac
+
+echo $FLASH_STM
+
+$FLASH_STM ~/altusmetrumllc/Binaries/loaders/telemetrum-v$VERSION-*.elf || exit 1
+
+sleep 3
+
+$USBLOAD --serial=$SERIAL ~/altusmetrumllc/Binaries/telemetrum-v$VERSION-*.elf || exit 1
+
+sleep 5
+
+dev=`ao-list | awk '/TeleMetrum-v'"$VERSION"'/ { print $3; exit(0); }'`
+
+case "$dev" in
+/dev/tty*)
+       echo "TeleMetrum found on $dev"
+       ;;
+*)
+       echo 'No TeleMetrum-v'"$VERSION"' found'
+       exit 1
+       ;;
+esac
+
+echo 'E 0' > $dev
+
+SERIAL=$SERIAL ./cal-freq $dev
+
+failed=1
+while [ $failed = 1 ]; do
+    ../ao-tools/ao-cal-accel/ao-cal-accel $dev
+    failed=$?
+done
+
+echo 'E 1' > $dev
+
+./test-telemetrum-v3.0
+
+exit $?
index f20d526db81e37bcfe7236cb935ab4d238d1480b..af51ab7a46f21eb6981bd0a7cf81da336e787974 100755 (executable)
@@ -15,5 +15,5 @@ openocd -f interface/stlink.cfg \
        -c init \
        -c 'reset halt' \
        -c 'at91samd bootloader 0' \
-       -c "flash write_image erase unlock $1" \
+       -c "program $1 verify reset" \
        -c "shutdown"
diff --git a/ao-tools/ao-test-pressure/.gitignore b/ao-tools/ao-test-pressure/.gitignore
new file mode 100644 (file)
index 0000000..1f011ed
--- /dev/null
@@ -0,0 +1 @@
+ao-test-pressure
index 2712e878e9f3711c946fae759dc98aa92459d674..6c7f0f1cfd4f4ccc33d5b621d995aa56a47f5ddf 100644 (file)
@@ -18,13 +18,13 @@ dnl
 dnl Process this file with autoconf to create configure.
 
 AC_PREREQ(2.57)
-AC_INIT([altos], 1.9.14)
+AC_INIT([altos], 1.9.15)
 ANDROID_VERSION=36
 AC_CONFIG_SRCDIR([src/kernel/ao.h])
 AM_INIT_AUTOMAKE([foreign dist-bzip2])
 AM_MAINTAINER_MODE
 
-RELEASE_DATE=2023-02-02
+RELEASE_DATE=2023-02-19
 AC_SUBST(RELEASE_DATE)
 
 DOC_DATE=`LC_ALL=C date -d $RELEASE_DATE +'%d %b %Y'`
index 575f1fe004c83281b5d1784cd3d16baf986cce0b..8b8c4f1c53693b652c9dc9824609b3dbd7ae12ea 100644 (file)
@@ -17,6 +17,7 @@ FAKETIME=TZ=UTC faketime -f '$(RELEASE_DATE) 00:00:00 i0'
 endif
 
 RELNOTES_INC=\
+       release-notes-1.9.15.inc \
        release-notes-1.9.14.inc \
        release-notes-1.9.13.inc \
        release-notes-1.9.12.inc \
index 924ca5921c2c171b8b55a9eb1ca2b9ab07b9a266..252fc6c7226573fb47d0bc68519b05e33a62747c 100644 (file)
@@ -1,5 +1,9 @@
 [appendix]
 == Release Notes
+       :leveloffset: 2
+       include::release-notes-1.9.15.adoc[]
+
+       <<<<
        :leveloffset: 2
        include::release-notes-1.9.14.adoc[]
 
diff --git a/doc/release-notes-1.9.15.inc b/doc/release-notes-1.9.15.inc
new file mode 100644 (file)
index 0000000..41ca728
--- /dev/null
@@ -0,0 +1,17 @@
+= Release Notes for Version 1.9.15
+include::release-head.adoc[]
+:doctype: article
+
+       Version 1.9.15
+
+       == AltOS
+
+       * Add TeleMega v6.0 support
+
+       * Add TeleMetrum v4.0 support
+
+       * Fix sign of IMU values for TeleMega v5 boards in the
+          'across' axis. This affects IMU acceleration and gyro reports
+         for that axis, but has no effect on in-flight operation of
+         the tilt computation.
+
index 576ae466ae62d0bbf4d74b6951e9869dfad03679..45b8f1006c8ba2492438e817bb3f4448744e7de6 100644 (file)
@@ -1,5 +1,9 @@
 [appendix]
 == Release Notes
+       :leveloffset: 2
+       include::release-notes-1.9.15.adoc[]
+
+       <<<<
        :leveloffset: 2
        include::release-notes-1.9.14.adoc[]
 
index fd63d935bafd930782b68a27365506b27141c3d9..fd64145809efb629a79da61bcce2642b973609de 100644 (file)
        |40mW
        |3.7V
 
+       |TeleMetrum v4.0
+       |MS5607 30km (100k')
+       |ADXL375 200g
+       |uBlox Max-8C
+       |-
+       |8MB
+       |40mW
+       |3.7V
+
        endif::telemetrum[]
        ifdef::telemini[]
        |TeleMini v1.0
        |40mW
        |3.7V
 
+       |TeleMega v6.0
+       |MS5607 30km (100k')
+       |ADXL375 200g
+       |uBlox Max-8Q
+       |BMI088 MMC5983
+       |8MB
+       |40mW
+       |3.7V
+
        endif::telemega[]
        ifdef::easymega[]
        |EasyMega v1.0
index 304959baec94416c88316ba71ffd0ef9b9a2822b..88653da7d7ebd5cf404d15b935a12925b2a2a7d8 100644 (file)
@@ -1,5 +1,9 @@
 [appendix]
 == Release Notes
+       :leveloffset: 2
+       include::release-notes-1.9.15.adoc[]
+
+       <<<<
        :leveloffset: 2
        include::release-notes-1.9.14.adoc[]
 
index ff7f1bd9bd3ebdb3b1ba1f1990d2f317f5434fef..433bcf817aeb43ff96e19222c60a7b803962b90f 100644 (file)
@@ -50,6 +50,7 @@ ARMM3DIRS=\
 ARMM0DIRS=\
        easymini-v1.0 easymini-v1.0/flash-loader \
        chaoskey-v1.0 chaoskey-v1.0/flash-loader \
+       telemetrum-v4.0 telemetrum-v4.0/flash-loader \
        telemini-v3.0 telemini-v3.0/flash-loader \
        easymini-v2.0 easymini-v2.0/flash-loader \
        easymini-v3.0 easymini-v3.0/flash-loader \
diff --git a/src/csm84clio-v0.1/Makefile b/src/csm84clio-v0.1/Makefile
new file mode 100644 (file)
index 0000000..62839d0
--- /dev/null
@@ -0,0 +1,77 @@
+#
+# AltOS build
+#
+#
+
+include ../stm/Makefile.defs
+
+INC = \
+       ao.h \
+       ao_arch.h \
+       ao_arch_funcs.h \
+       ao_boot.h \
+       ao_companion.h \
+       ao_data.h \
+       ao_pins.h \
+       ao_product.h \
+       ao_profile.h \
+       ao_task.h \
+       stm32l.h \
+       Makefile
+
+#
+# Common AltOS sources
+#
+
+ALTOS_SRC = \
+       ao_boot_chain.c \
+       ao_interrupt.c \
+       ao_product.c \
+       ao_romconfig.c \
+       ao_cmd.c \
+       ao_config.c \
+       ao_task.c \
+       ao_led_stm.c \
+       ao_stdio.c \
+       ao_panic.c \
+       ao_timer.c \
+       ao_mutex.c \
+       ao_serial_stm.c \
+       ao_dma_stm.c \
+       ao_data.c \
+       ao_adc_stm.c \
+       ao_usb_stm.c \
+       ao_convert_volt.c \
+       $(PROFILE) \
+       $(SAMPLE_PROFILE) \
+       $(STACK_GUARD)
+
+PRODUCT=csm84clio-v0.1
+PRODUCT_DEF=-DCSM84CLIO
+IDPRODUCT=0x000a
+
+CFLAGS = $(PRODUCT_DEF) $(STM_CFLAGS) $(PROFILE_DEF) $(SAMPLE_PROFILE_DEF) $(STACK_GUARD_DEF)
+
+PROGNAME=csm84clio-v0.1
+PROG=$(PROGNAME)-$(VERSION).elf
+HEX=$(PROGNAME)-$(VERSION).ihx
+
+SRC=$(ALTOS_SRC) ao_csm84clio.c
+OBJ=$(SRC:.c=.o)
+
+all: $(PROG) $(HEX)
+
+$(PROG): Makefile $(OBJ) altos.ld
+       $(call quiet,CC) $(LDFLAGS) -o $(PROG) $(OBJ) $(LIBS)
+
+$(OBJ): $(INC)
+
+distclean:     clean
+
+clean:
+       rm -f *.o $(PROGNAME)-*.elf $(PROGNAME)-*.ihx $(PROGNAME)-*.map
+       rm -f ao_product.h
+
+install:
+
+uninstall:
diff --git a/src/csm84clio-v0.1/ao_csm84clio.c b/src/csm84clio-v0.1/ao_csm84clio.c
new file mode 100644 (file)
index 0000000..d73af64
--- /dev/null
@@ -0,0 +1,165 @@
+/*
+ * Copyright © 2023 Bdale Garbee <bdale@gag.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+ */
+
+#include <ao.h>
+
+/*
+ * define the FET outputs
+ */
+
+typedef struct 
+{
+       struct stm_gpio *       port;
+       int                     pin;
+} fet;
+
+fet outputs[] = {
+       {&stm_gpioe, 9},        /* step_0 */
+       {&stm_gpioe, 13},       /* step_1 */
+       {&stm_gpiob, 11},       /* step_2 */
+       {&stm_gpioe, 8},        /* step_3 */
+       {&stm_gpioe, 12},       /* step_4 */
+       {&stm_gpioe, 10},       /* step_5 */
+       {&stm_gpioe, 14},       /* step_6 */
+       {&stm_gpiob, 10},       /* step_7 */
+       {&stm_gpioe, 11},       /* step_8 */
+       {&stm_gpioe, 15},       /* step_9 */
+       {&stm_gpioa, 5},        /* step_10 */
+       {&stm_gpioc, 5},        /* step_11 */
+       {&stm_gpioe, 7},        /* step_12 */
+       {&stm_gpioa, 6},        /* step_13 */
+       {&stm_gpiob, 0},        /* step_14 */
+       {&stm_gpioa, 3},        /* step_15 */
+       {&stm_gpioa, 7},        /* step_16 */
+       {&stm_gpiob, 1},        /* step_17 */
+       {&stm_gpioa, 4},        /* step_18 */
+       {&stm_gpioc, 4},        /* step_19 */
+       {&stm_gpioe, 4},        /* step_20 */
+       {&stm_gpioc, 0},        /* step_21 */
+       {&stm_gpioc, 3},        /* step_22 */
+       {&stm_gpioe, 5},        /* step_23 */
+       {&stm_gpioc, 1},        /* step_24 */
+       {&stm_gpioe, 2},        /* step_25 */
+       {&stm_gpioc, 14},       /* step_26 */
+       {&stm_gpioc, 2},        /* step_27 */
+       {&stm_gpioe, 3},        /* step_28 */
+       {&stm_gpioc, 15},       /* step_29 */
+       {&stm_gpiob, 3},        /* step_30 */
+       {&stm_gpiob, 5},        /* step_31 */
+       {&stm_gpiob, 9},        /* step_32 */
+       {&stm_gpiob, 4},        /* step_33 */
+       {&stm_gpiob, 6},        /* step_34 */
+       {&stm_gpiod, 7},        /* step_35 */
+       {&stm_gpiob, 7},        /* step_36 */
+       {&stm_gpioe, 0},        /* step_37 */
+       {&stm_gpiod, 6},        /* step_38 */
+       {&stm_gpiob, 8},        /* step_39 */
+       {&stm_gpioc, 7},        /* step_40 */
+       {&stm_gpiod, 1},        /* step_41 */
+       {&stm_gpiod, 4},        /* step_42 */
+       {&stm_gpioc, 6},        /* step_43 */
+       {&stm_gpiod, 0},        /* step_44 */
+       {&stm_gpioc, 8},        /* step_45 */
+       {&stm_gpiod, 2},        /* step_46 */
+       {&stm_gpiod, 5},        /* step_47 */
+       {&stm_gpioc, 9},        /* step_48 */
+       {&stm_gpiod, 3}};       /* step_49 */
+
+static void
+ao_fet_control(uint32_t output, uint8_t value)
+{
+       /* map output 0-49 to corresponding GPIO port and pin, set to value */
+       ao_gpio_set(outputs[output].port, outputs[output].pin, value);
+}
+
+static void
+ao_fet_init(void)
+{
+       int i;
+
+       /* initialize GPIO outputs and turn them all off */
+       for (i = 0; i < 50; i++) 
+       {
+               ao_enable_output(outputs[i].port, outputs[i].pin, 0);
+       }
+}
+
+static void
+ao_fet_on(void)
+{
+       uint32_t output;
+
+       output = ao_cmd_decimal();
+        if (ao_cmd_status != ao_cmd_success)
+                return;
+       if (output > 49)                /* can't be less than 0 since unsigned! */
+               printf ("Invalid FET selection %lu, must be 0..49\n", output);
+       else {
+               ao_fet_control(output, 1);
+               ao_led_on(AO_LED_RED);
+       }
+}
+
+static void
+ao_fet_off(void)
+{
+       uint32_t output;
+
+       output = ao_cmd_decimal();
+        if (ao_cmd_status != ao_cmd_success)
+                return;
+       if (output > 49)                /* can't be less than 0 since unsigned! */
+               printf ("Invalid FET selection %lu, must be 0..49\n", output);
+       else {
+               ao_fet_control(output, 0);
+               ao_led_off(AO_LED_RED);
+       }
+}
+
+static const struct ao_cmds ao_fet_cmds[] = {
+       { ao_fet_on,  "S <output>\0Set (turn on) FET" },
+       { ao_fet_off, "R <output>\0Reset (turn off) FET" },
+       { 0, NULL }
+};
+
+int
+main(void)
+{
+       ao_fet_init();          /* turn all outputs off ASAP */
+       ao_clock_init();
+
+       ao_task_init();
+       ao_led_init();
+
+       /* both LEDs on briefly as system test */
+       ao_led_on(LEDS_AVAILABLE);
+
+       ao_serial_init();
+       ao_timer_init();
+       ao_dma_init();
+       ao_adc_init();
+       ao_cmd_init();
+       ao_usb_init();
+
+       ao_cmd_register(ao_fet_cmds);
+
+       /* turn red off, leave green on as a "power indicator" */
+       ao_led_off(AO_LED_RED);
+
+       ao_start_scheduler();
+}
diff --git a/src/csm84clio-v0.1/ao_pins.h b/src/csm84clio-v0.1/ao_pins.h
new file mode 100644 (file)
index 0000000..7f60546
--- /dev/null
@@ -0,0 +1,137 @@
+/*
+ * Copyright © 2023 Bdale Garbee <bdale@gag.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+ */
+
+#ifndef _AO_PINS_H_
+#define _AO_PINS_H_
+
+
+/* 16MHz High speed external crystal */
+#define AO_HSE                 16000000
+
+/* PLLVCO = 96MHz (so that USB will work) */
+#define AO_PLLMUL              6
+#define AO_RCC_CFGR_PLLMUL     (STM_RCC_CFGR_PLLMUL_6)
+
+/* SYSCLK = 32MHz (no need to go faster than CPU) */
+#define AO_PLLDIV              3
+#define AO_RCC_CFGR_PLLDIV     (STM_RCC_CFGR_PLLDIV_3)
+
+/* HCLK = 32MHz (CPU clock) */
+#define AO_AHB_PRESCALER       1
+#define AO_RCC_CFGR_HPRE_DIV   STM_RCC_CFGR_HPRE_DIV_1
+
+/* Run APB1 at 16MHz (HCLK/2) */
+#define AO_APB1_PRESCALER      2
+#define AO_RCC_CFGR_PPRE1_DIV  STM_RCC_CFGR_PPRE2_DIV_2
+
+/* Run APB2 at 16MHz (HCLK/2) */
+#define AO_APB2_PRESCALER      2
+#define AO_RCC_CFGR_PPRE2_DIV  STM_RCC_CFGR_PPRE2_DIV_2
+
+#define HAS_SERIAL_1           0
+#define USE_SERIAL_1_STDIN     0
+#define SERIAL_1_PB6_PB7       0
+#define SERIAL_1_PA9_PA10      0
+
+#define HAS_SERIAL_2           0
+#define USE_SERIAL_2_STDIN     0
+#define SERIAL_2_PA2_PA3       0
+#define SERIAL_2_PD5_PD6       0
+#define USE_SERIAL_2_FLOW      0
+#define USE_SERIAL_2_SW_FLOW   0
+
+#define HAS_SERIAL_3           1
+#define USE_SERIAL_3_STDIN     0
+#define SERIAL_3_PB10_PB11     0
+#define SERIAL_3_PC10_PC11     0
+#define SERIAL_3_PD8_PD9       1
+
+#define HAS_USB                        1
+#define HAS_BEEP               0
+#define HAS_BATTERY_REPORT     0
+#define HAS_RADIO              0
+#define HAS_TELEMETRY          0
+#define HAS_APRS               0
+#define HAS_COMPANION          0
+
+#define HAS_SPI_1              0
+#define HAS_SPI_2              0
+#define HAS_I2C_1              0
+#define HAS_I2C_2              0
+
+#define LOW_LEVEL_DEBUG                0
+
+#define LED_PORT_ENABLE                STM_RCC_AHBENR_GPIOBEN
+#define LED_PORT               (&stm_gpiob)
+#define LED_PIN_RED            13
+#define LED_PIN_GREEN          12
+#define AO_LED_RED             (1 << LED_PIN_RED)
+#define AO_LED_GREEN           (1 << LED_PIN_GREEN)
+
+#define LEDS_AVAILABLE         (AO_LED_RED | AO_LED_GREEN)
+
+#define HAS_GPS                        0
+#define HAS_FLIGHT             0
+#define HAS_ADC                        1
+#define HAS_ADC_TEMP           1
+#define HAS_LOG                        0
+
+/*
+ * ADC
+ */
+#define AO_DATA_RING           32
+
+struct ao_adc {
+       int16_t                 v_dc;
+       int16_t                 temp;
+};
+
+#define AO_ADC_DUMP(p) \
+       printf("tick: dc: %5d temp: %5d\n", \
+              (p)->adc.v_dc, (p)->adc.temp)
+
+#define AO_ADC_V_DC            0
+#define AO_ADC_V_DC_PORT       (&stm_gpioa)
+#define AO_ADC_V_DC_PIN                0
+
+#define AO_ADC_TEMP            1
+
+#define AO_ADC_RCC_AHBENR      ((1 << STM_RCC_AHBENR_GPIOAEN))
+
+#define AO_NUM_ADC_PIN         2
+
+#define AO_ADC_PIN0_PORT       AO_ADC_V_DC_PORT
+#define AO_ADC_PIN0_PIN                AO_ADC_V_DC_PIN
+
+#define AO_NUM_ADC             2
+
+#define AO_ADC_SQ1             AO_ADC_V_DC
+#define AO_ADC_SQ2             AO_ADC_TEMP
+
+/*
+ * Voltage divider on ADC DC sampler
+ */
+#define AO_DC_DIV_PLUS         100     /* 100k */
+#define AO_DC_DIV_MINUS                10      /* 10k */
+
+/*
+ * ADC reference in decivolts
+ */
+#define AO_ADC_REFERENCE_DV    33
+
+#endif /* _AO_PINS_H_ */
diff --git a/src/csm84clio-v0.1/flash-loader/Makefile b/src/csm84clio-v0.1/flash-loader/Makefile
new file mode 100644 (file)
index 0000000..f041710
--- /dev/null
@@ -0,0 +1,8 @@
+#
+# AltOS flash loader build
+#
+#
+
+TOPDIR=../..
+HARDWARE=csm84clio-v0.1
+include $(TOPDIR)/stm/Makefile-flash.defs
diff --git a/src/csm84clio-v0.1/flash-loader/ao_pins.h b/src/csm84clio-v0.1/flash-loader/ao_pins.h
new file mode 100644 (file)
index 0000000..825e1f0
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * Copyright © 2023 Bdale Garbee <bdale@gag.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+ */
+
+#ifndef _AO_PINS_H_
+#define _AO_PINS_H_
+
+/* External crystal at 16MHz */
+#define AO_HSE         16000000
+
+#include <ao_flash_stm_pins.h>
+
+/* Use USART3_CTS as force bootloader pin */
+
+#define AO_BOOT_PIN                    1
+#define AO_BOOT_APPLICATION_GPIO       stm_gpiod
+#define AO_BOOT_APPLICATION_PIN                11
+#define AO_BOOT_APPLICATION_VALUE      1
+#define AO_BOOT_APPLICATION_MODE       AO_EXTI_MODE_PULL_UP
+
+#endif /* _AO_PINS_H_ */
index 863909d553342c140f56f823835893cbbb8ccdb8..2fa4fd011c64c8114446b21bcd6a059f7c6588e6 100644 (file)
@@ -177,7 +177,7 @@ struct ao_adc {
 };
 
 #define AO_ADC_DUMP(p) \
-       printf("tick: %5u A: %5d B: %5d C: %5d D: %5d drogue: %5d main: %5d batt: %5d pbatt: %5d temp: %5d\n", \
+       printf("tick: %5lu A: %5d B: %5d C: %5d D: %5d drogue: %5d main: %5d batt: %5d pbatt: %5d temp: %5d\n", \
               (p)->tick, \
               (p)->adc.sense[0], (p)->adc.sense[1], (p)->adc.sense[2], \
               (p)->adc.sense[3], (p)->adc.sense[4], (p)->adc.sense[5], \
index 3f2c9ea44e5365a8c7862499c874b21a8c6a7d50..01774519f2cc1b461468b47860d8b323400855d9 100644 (file)
@@ -329,22 +329,27 @@ struct ao_adc {
 
 
 /*
+ * Here are the required sensor signs:
  *
- * If the board is laying component side up with
- * the antenna (nose) pointing north
+ * +along      nose up
+ * +across     USB down
+ * +through    TH down
  *
- * +along      north   +roll   left up
- * +across     west    +pitch  nose down
- * +through    up      +yaw    left turn
+ * With the board aligned to have positive accel for the relevant
+ * axis, looking down from above we have:
+ *
+ * +roll       counter clockwise (nose up)
+ * +pitch      counter clockwise (USB down)
+ * +yaw                counter clockwise (TH down)
  */
 
 /*
- * mpu6000
- *
- *     pin 1 NW corner of chip
+ * On TMega v5, MPU6000 pin 1 (NW corner of chip) is placed towards
+ * the USB and antenna edges of the board. Relative to MPU6000 specs,
+ * we don't need to change any signs and so the correct values are:
  *
  *     +along          +Y      +roll   +Y
- *     +across         -X      +pitch  -X
+ *     +across         +X      +pitch  +X
  *     +through        +Z      +yaw    +Z
  *
  */
@@ -358,11 +363,11 @@ struct ao_adc {
 #define HAS_IMU                        1
 
 #define ao_mpu6000_along(m)    ((m)->accel_y)
-#define ao_mpu6000_across(m)   (-(m)->accel_x)
+#define ao_mpu6000_across(m)   ((m)->accel_x)
 #define ao_mpu6000_through(m)  ((m)->accel_z)
 
 #define ao_mpu6000_roll(m)     ((m)->gyro_y)
-#define ao_mpu6000_pitch(m)    (-(m)->gyro_x)
+#define ao_mpu6000_pitch(m)    ((m)->gyro_x)
 #define ao_mpu6000_yaw(m)      ((m)->gyro_z)
 
 #define ao_data_along(packet)  ao_mpu6000_along(&(packet)->mpu6000)
diff --git a/src/telemega-v6.0/.gitignore b/src/telemega-v6.0/.gitignore
new file mode 100644 (file)
index 0000000..e67759a
--- /dev/null
@@ -0,0 +1,2 @@
+ao_product.h
+telemega-*.elf
index da1dd15f1f95902622b6ee26af44997673b72191..2518e6ba45785bae1827d60fbfa0fbc0a26032ac 100644 (file)
@@ -83,9 +83,6 @@
 #define BEEPER_CHANNEL         2
 #define BEEPER_PORT            (&stm_gpioe)
 #define BEEPER_PIN             4
-#define AO_BEEP_MID_DEFAULT    179             /* 2100 Hz */
-#define AO_BEEP_MAKE_LOW(m)    ((uint8_t) ((m) * 197U/179U)) /* 1900 Hz */
-#define AO_BEEP_MAKE_HIGH(m)   ((uint8_t) ((m) * 163U/179U)) /* 2300 Hz */
 #define HAS_BATTERY_REPORT     1
 #define HAS_RADIO              1
 #define HAS_TELEMETRY          1
@@ -330,21 +327,28 @@ struct ao_adc {
 
 /*
  *
- * If the board is laying component side up with
- * the antenna (nose) pointing north
+ * Here are the required sensor signs:
  *
- * +along      north   +roll   left up
- * +across     west    +pitch  nose down
- * +through    up      +yaw    left turn
+ * +along      nose up
+ * +across     USB down
+ * +through    TH down
+ *
+ * With the board aligned to have positive accel for the relevant
+ * axis, looking down from above we have:
+ *
+ * +roll       counter clockwise (nose up)
+ * +pitch      counter clockwise (USB down)
+ * +yaw                counter clockwise (TH down)
  */
 
 /*
- * bmi088
- *
- *     pin 1 NE corner of chip
+ * On TMega v6, bmi088 pin 1 (NE corner of chip) is placed towards the
+ * USB and antenna edges of the board. Relative to bmi088 specs, to
+ * get the above values, we need to flip the Y axis, assigning values
+ * as follows:
  *
- *     +along          +Y      +roll   +Y
- *     +across         -X      +pitch  -X
+ *     +along          +X      +roll   +X
+ *     +across         -Y      +pitch  -Y
  *     +through        +Z      +yaw    +Z
  */
 
@@ -356,12 +360,12 @@ struct ao_adc {
 #define AO_BMI088_GYR_CS_PIN   13
 #define HAS_IMU                        1
 
-#define ao_bmi088_along(m)     ((m)->acc.y)
-#define ao_bmi088_across(m)    (-(m)->acc.x)
+#define ao_bmi088_along(m)     ((m)->acc.x)
+#define ao_bmi088_across(m)    (-(m)->acc.y)
 #define ao_bmi088_through(m)   ((m)->acc.z)
 
-#define ao_bmi088_roll(m)      ((m)->gyr.y)
-#define ao_bmi088_pitch(m)     (-(m)->gyr.x)
+#define ao_bmi088_roll(m)      ((m)->gyr.x)
+#define ao_bmi088_pitch(m)     (-(m)->gyr.y)
 #define ao_bmi088_yaw(m)       ((m)->gyr.z)
 
 #define ao_data_along(packet)  ao_bmi088_along(&(packet)->bmi088)
diff --git a/src/telemetrum-v4.0/.gitignore b/src/telemetrum-v4.0/.gitignore
new file mode 100644 (file)
index 0000000..35ce24d
--- /dev/null
@@ -0,0 +1,2 @@
+ao_product.h
+telemetrum-*.elf