+commit 38fac9fd1ebdc0900f598c859453b5fc8fc6b4a6
+Merge: 94fdc596 6f1686d7
+Author: Bdale Garbee <bdale@gag.com>
+Date: Sun Feb 19 18:24:56 2023 -0700
+
+ Merge branch 'master' into branch-1.9
+
+commit 6f1686d7a1de7543a844aa86a8c1e7968911a329
+Author: Keith Packard <keithp@keithp.com>
+Date: Thu Feb 16 15:13:01 2023 -0800
+
+ Version 1.9.15
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit d2d7dc527f1168a344ea0f72770e487753f740c8
+Author: Bdale Garbee <bdale@gag.com>
+Date: Sun Feb 19 17:50:40 2023 -0700
+
+ ao-bringup: turnon and test scripts for TeleMetrum v4.0 & TeleMega v6.0
+
+commit 213bb501970370d16642c2fc3f5bd9c0a5f9aadb
+Author: Keith Packard <keithp@keithp.com>
+Date: Sat Feb 18 16:51:09 2023 -0800
+
+ ao-tools/ao-flash: Use 'program' instead of 'flash' for samd21
+
+ Switch to the program command, which has a 'reset' option, to get the
+ device back to running after loading the boot loader.
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit c7161117ab85720776b2b964885a57053e3ff640
+Author: Keith Packard <keithp@keithp.com>
+Date: Thu Feb 16 15:36:30 2023 -0800
+
+ doc: Add TeleMetrum v4.0 to specs and 1.9.15 release notes
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 6d7da481dbdb48729edbf41f2b87273f10511163
+Author: Keith Packard <keithp@keithp.com>
+Date: Thu Feb 16 15:36:11 2023 -0800
+
+ altos/telemetrum-v4.0: Add .gitignore
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit f0eba09d4027d3d4e7a9c35980e405998b2487b1
+Author: Keith Packard <keithp@keithp.com>
+Date: Thu Feb 16 15:35:29 2023 -0800
+
+ Add TeleMetrum v4.0 firmware to releases
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 35c1102409ff1b68a4856748a40bff7861a2fdf2
+Author: Keith Packard <keithp@keithp.com>
+Date: Thu Feb 16 15:12:24 2023 -0800
+
+ Add TeleMega v6.0 firmware to release
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit a8c3f09a162359eec40d05a875ca7a09c0efc457
+Author: Keith Packard <keithp@keithp.com>
+Date: Thu Feb 16 15:07:20 2023 -0800
+
+ doc: Add HW specs for TeleMega v6.0
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit b780edfc970f67adde7c9b78671b9dab7eeced5f
+Author: Keith Packard <keithp@keithp.com>
+Date: Thu Feb 16 15:05:27 2023 -0800
+
+ doc: Add initial 1.9.15 release notes
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit d5d835d65e909de24538ee0edb37d0ad0877f0c6
+Merge: 4591878f 7e696108
+Author: Bdale Garbee <bdale@gag.com>
+Date: Thu Feb 16 15:52:56 2023 -0700
+
+ Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
+
+commit 7e69610859e88cacbc5801bcafecaf84b9f7f455
+Author: Keith Packard <keithp@keithp.com>
+Date: Thu Feb 9 15:22:17 2023 -0800
+
+ altos: Fix TMega v6.0 and v5.0 IMU axes
+
+ Add documentation to each board in ao_pins.h to clarify
+ the required sensor axis orientations.
+
+ TeleMega v5.0 had flipped the 'across' axis sensor value signs
+ incorrectly, so remove that.
+
+ TeleMega v6.0 had selected the wrong axes for across and along, along
+ is X and across is Y for this board.
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit b08930aa0f67a445bf2300f3cea07cecf513a2f0
+Author: Keith Packard <keithp@keithp.com>
+Date: Fri Feb 10 17:58:08 2023 -0800
+
+ altoslib: Hide internals of AltosIMU
+
+ Make most of the variables private to prevent access to un-corrected
+ data.
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 4591878f7179efc0b784d7358cf3f4063547fb7b
+Author: Bdale Garbee <bdale@gag.com>
+Date: Tue Feb 14 19:00:29 2023 -0700
+
+ altos: re-number csm85clio outputs 0..49 to match schematic and silkscreen
+
+commit 7b24be27f67f95d909d19d767e4ac5376ea670cf
+Merge: 58d13bd9 36ef74a9
+Author: Bdale Garbee <bdale@gag.com>
+Date: Fri Feb 10 06:52:43 2023 -0700
+
+ Merge branch 'clio'
+
+commit 36ef74a9ce4d4b066c51b76c1155f6ee7811a6cc
+Author: Bdale Garbee <bdale@gag.com>
+Date: Fri Feb 10 06:52:11 2023 -0700
+
+ altos: add csm84clio-v0.1 firmware
+
+commit 58d13bd9bd0af42ebb3770038cd531e6ca5e9d30
+Author: Keith Packard <keithp@keithp.com>
+Date: Thu Feb 9 15:22:17 2023 -0800
+
+ altos/telemega-v6.0: bmi088 axes were wrong
+
+ X is 'along', Y is 'across'.
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 589c1af82a9bccff46ecb3aa0a557b9216b818a8
+Author: Keith Packard <keithp@keithp.com>
+Date: Thu Feb 9 14:54:19 2023 -0800
+
+ altos/telemega-v6: Remove beep freq defs and use defaults
+
+ These values came from the magnetic beeper on Tmega v5 which we aren't
+ using.
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 9518da9c5296a0172ae214b90f03043c786d3e73
+Author: Keith Packard <keithp@keithp.com>
+Date: Thu Feb 9 12:35:13 2023 -0800
+
+ altos: Add .gitignore for telemega v6.0
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 94fdc596ec5177d8a5acb7cf40ecb44e605b605d
+Author: Bdale Garbee <bdale@gag.com>
+Date: Thu Feb 2 12:53:51 2023 -0700
+
+ ChangeLog for releas 1.9.14
+
commit 0d34cacb37ad37208bd0602364a0be660ddd12bc
Merge: e6a83e73 360aa73c
Author: Bdale Garbee <bdale@gag.com>
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
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} \
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 \
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) {
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) {
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) {
return AltosLib.MISSING;
}
- public boolean parse_string(String line) {
+ private boolean parse_string(String line) {
if (line.startsWith("Accel:")) {
String[] items = line.split("\\s+");
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
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
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"
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"
+++ /dev/null
-#!/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
--- /dev/null
+#!/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
--- /dev/null
+#!/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
+++ /dev/null
-#!/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
--- /dev/null
+#!/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
--- /dev/null
+#!/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
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"
echo 'E 1' > $dev
-./test-telemega
+./test-telemega-v6.0
exit $?
--- /dev/null
+#!/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 $?
#!/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
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"
echo 'E 1' > $dev
-./test-telemetrum
+./test-telemetrum-v4.0
exit $?
--- /dev/null
+#!/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 $?
-c init \
-c 'reset halt' \
-c 'at91samd bootloader 0' \
- -c "flash write_image erase unlock $1" \
+ -c "program $1 verify reset" \
-c "shutdown"
--- /dev/null
+ao-test-pressure
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'`
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 \
[appendix]
== Release Notes
+ :leveloffset: 2
+ include::release-notes-1.9.15.adoc[]
+
+ <<<<
:leveloffset: 2
include::release-notes-1.9.14.adoc[]
--- /dev/null
+= 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.
+
[appendix]
== Release Notes
+ :leveloffset: 2
+ include::release-notes-1.9.15.adoc[]
+
+ <<<<
:leveloffset: 2
include::release-notes-1.9.14.adoc[]
|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
[appendix]
== Release Notes
+ :leveloffset: 2
+ include::release-notes-1.9.15.adoc[]
+
+ <<<<
:leveloffset: 2
include::release-notes-1.9.14.adoc[]
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 \
--- /dev/null
+#
+# 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:
--- /dev/null
+/*
+ * 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();
+}
--- /dev/null
+/*
+ * 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_ */
--- /dev/null
+#
+# AltOS flash loader build
+#
+#
+
+TOPDIR=../..
+HARDWARE=csm84clio-v0.1
+include $(TOPDIR)/stm/Makefile-flash.defs
--- /dev/null
+/*
+ * 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_ */
};
#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], \
/*
+ * 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
*
*/
#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)
--- /dev/null
+ao_product.h
+telemega-*.elf
#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
/*
*
- * 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
*/
#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)
--- /dev/null
+ao_product.h
+telemetrum-*.elf