fw/altos
13 months agoaltos: Use BMI088 as z-axis accel as needed stm32f1
Keith Packard [Thu, 16 Mar 2023 17:25:19 +0000 (10:25 -0700)]
altos: Use BMI088 as z-axis accel as needed

When there's no high-g accel available, use the 'along' axis
to measure acceleration.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 months agoaltos: Fix up stm32f103-nucleo 'lco' demo mode
Keith Packard [Thu, 16 Mar 2023 17:24:36 +0000 (10:24 -0700)]
altos: Fix up stm32f103-nucleo 'lco' demo mode

Adjust some layout now that I've got a real screen to play with.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 months agoaltos: Clean up st7565 LCD driver
Keith Packard [Thu, 16 Mar 2023 17:23:05 +0000 (10:23 -0700)]
altos: Clean up st7565 LCD driver

Get rid of AO_ prefix on chip-specific register values.
Declare ao_st7565_instructions to take const uint8_t * so
it can accept an array in flash.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 months agoaltos/stm32f103-nucleo: Draw more of the LCO demo screen
Keith Packard [Thu, 9 Mar 2023 01:14:56 +0000 (17:14 -0800)]
altos/stm32f103-nucleo: Draw more of the LCO demo screen

Add the box/pad screen.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 months agoaltos/stm32f103-nucleo: Drive a screen too
Keith Packard [Wed, 8 Mar 2023 23:54:39 +0000 (15:54 -0800)]
altos/stm32f103-nucleo: Drive a screen too

Use the ST7565 driver to control an LCD screen.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 months agoaltos/stm32f1: Add DMA and SPI drivers
Keith Packard [Wed, 8 Mar 2023 23:53:58 +0000 (15:53 -0800)]
altos/stm32f1: Add DMA and SPI drivers

These came from the code for the stm32l15 chips

Signed-off-by: Keith Packard <keithp@keithp.com>
13 months agoaltos/driver: Document setting for AO_ST7565_BIAS
Keith Packard [Wed, 8 Mar 2023 23:53:03 +0000 (15:53 -0800)]
altos/driver: Document setting for AO_ST7565_BIAS

Signed-off-by: Keith Packard <keithp@keithp.com>
13 months agoaltos/draw: Have each font declare ao_glyph_temp as .comm
Keith Packard [Wed, 8 Mar 2023 23:52:11 +0000 (15:52 -0800)]
altos/draw: Have each font declare ao_glyph_temp as .comm

Create temporary glyph drawing space by having every glyph declare how
much space it needs and letting the linker allocate the largest
possible space.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 months agoaltos/draw: Skip line adjustment for vertical/horizontal
Keith Packard [Wed, 8 Mar 2023 23:50:57 +0000 (15:50 -0800)]
altos/draw: Skip line adjustment for vertical/horizontal

When e3 is zero, don't adjust the minor position based on
the major as it doesn't move.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 months agoaltos/draw: Build demos with -O3 to catch more bugs
Keith Packard [Wed, 8 Mar 2023 23:50:19 +0000 (15:50 -0800)]
altos/draw: Build demos with -O3 to catch more bugs

The compiler fails to do a lot of checks in -O0

Signed-off-by: Keith Packard <keithp@keithp.com>
13 months agosrc/draw: Provide some useful constants
Keith Packard [Wed, 8 Mar 2023 23:49:52 +0000 (15:49 -0800)]
src/draw: Provide some useful constants

The two colors and a stride macro

Signed-off-by: Keith Packard <keithp@keithp.com>
13 months agoaltos: Add ST7565 LCD driver
Keith Packard [Wed, 8 Mar 2023 23:14:53 +0000 (15:14 -0800)]
altos: Add ST7565 LCD driver

This is the chip used by various NewHaven LCD displays

Signed-off-by: Keith Packard <keithp@keithp.com>
13 months agoaltos/stm32f103-nucleo: Add boot loader
Keith Packard [Sun, 26 Feb 2023 06:41:48 +0000 (22:41 -0800)]
altos/stm32f103-nucleo: Add boot loader

Signed-off-by: Keith Packard <keithp@keithp.com>
13 months agostm32f1: Get boot loader working
Keith Packard [Sun, 26 Feb 2023 03:24:11 +0000 (19:24 -0800)]
stm32f1: Get boot loader working

Signed-off-by: Keith Packard <keithp@keithp.com>
13 months agoaltos/stm32f1: Start work on self-flash code
Keith Packard [Mon, 20 Feb 2023 00:29:56 +0000 (16:29 -0800)]
altos/stm32f1: Start work on self-flash code

Looks like this uses the same IP block as the stm32f0 series; copied
the code, haven't gotten it working yet.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 months agoaltos/stm32f103-nucleo: Use more bits
Keith Packard [Sun, 19 Feb 2023 23:45:29 +0000 (15:45 -0800)]
altos/stm32f103-nucleo: Use more bits

Get the OS running, use the serial for console

Signed-off-by: Keith Packard <keithp@keithp.com>
13 months agoaltos/stm32f1: More stm32f103 work
Keith Packard [Sun, 19 Feb 2023 23:44:32 +0000 (15:44 -0800)]
altos/stm32f1: More stm32f103 work

Serial driver works
Interrupts work

Signed-off-by: Keith Packard <keithp@keithp.com>
13 months agoaltos: Start work on stm32f1 support
Keith Packard [Sat, 18 Feb 2023 07:02:16 +0000 (23:02 -0800)]
altos: Start work on stm32f1 support

Got clocks working. CPU now running at 72MHz.
Got systick timer working. Ticks at 100Hz.
Got GPIO working. LED blinks.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 months agoao-tools: Add flash utility for stm32f1x chips
Keith Packard [Sun, 26 Feb 2023 06:40:29 +0000 (22:40 -0800)]
ao-tools: Add flash utility for stm32f1x chips

Signed-off-by: Keith Packard <keithp@keithp.com>
13 months agoaltos/telegps-v3.0: Fix SPI bus usage
Keith Packard [Tue, 28 Mar 2023 20:43:38 +0000 (13:43 -0700)]
altos/telegps-v3.0: Fix SPI bus usage

CC1200 is on SPI 0, M25 is on SPI 1

Signed-off-by: Keith Packard <keithp@keithp.com>
13 months agoaltos/lpcxpresso: Update for 11u24 board
Keith Packard [Tue, 28 Mar 2023 20:32:48 +0000 (13:32 -0700)]
altos/lpcxpresso: Update for 11u24 board

This updates the lpcxpresso demo to support the 11u24 board with
serial connected like telegps v3.0 on p1_13/p1_14

Signed-off-by: Keith Packard <keithp@keithp.com>
13 months agoaltos/lpc: Validate UART pin config
Keith Packard [Tue, 28 Mar 2023 18:56:27 +0000 (11:56 -0700)]
altos/lpc: Validate UART pin config

Make sure some UART pin configuration has been selected

Signed-off-by: Keith Packard <keithp@keithp.com>
13 months agoaltos/telegps-v3.0: Use eeprom for config
Keith Packard [Tue, 28 Mar 2023 04:52:27 +0000 (21:52 -0700)]
altos/telegps-v3.0: Use eeprom for config

Avoid wasting space in the SPI flash part for device config

Signed-off-by: Keith Packard <keithp@keithp.com>
13 months agoaltos/lpc: Add support for eeprom on 2x/3x chips
Keith Packard [Tue, 28 Mar 2023 04:51:31 +0000 (21:51 -0700)]
altos/lpc: Add support for eeprom on 2x/3x chips

The newer 11U2x and 11U3x parts have enough eeprom to support storing
config data there. Add support for the IAP calls for read/write.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 months agoaltos: Build TeleGPS v3.0 by default
Keith Packard [Tue, 28 Mar 2023 04:29:06 +0000 (21:29 -0700)]
altos: Build TeleGPS v3.0 by default

Signed-off-by: Keith Packard <keithp@keithp.com>
13 months agoaltos: Add TeleGPS v3.0 support
Keith Packard [Tue, 28 Mar 2023 04:27:43 +0000 (21:27 -0700)]
altos: Add TeleGPS v3.0 support

LPC 11U24FET48 with CC1200 radio. A bit like TeleGPS v1.0 but with different
pin assignments and a different radio chip.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 months agoaltos/lpc: Support UART on pio1_13/pio1_14
Keith Packard [Tue, 28 Mar 2023 04:26:41 +0000 (21:26 -0700)]
altos/lpc: Support UART on pio1_13/pio1_14

This is an alternate configuration for this chip.

Signed-off-by: Keith Packard <keithp@keithp.com>
13 months agoaltos: Allow ports to use type other than 'void *' for gpio block
Keith Packard [Tue, 28 Mar 2023 04:25:43 +0000 (21:25 -0700)]
altos: Allow ports to use type other than 'void *' for gpio block

LPC uses integers while everyone else has a struct for each gpio block.

Signed-off-by: Keith Packard <keithp@keithp.com>
14 months agoaltos/draw: Use damage for lco demo
Keith Packard [Mon, 27 Feb 2023 22:39:03 +0000 (14:39 -0800)]
altos/draw: Use damage for lco demo

Do some incremental drawing to demonstrate damage in action

Signed-off-by: Keith Packard <keithp@keithp.com>
14 months agoaltos/draw: Use bitstream fonts for LCO demo
Keith Packard [Mon, 27 Feb 2023 22:38:41 +0000 (14:38 -0800)]
altos/draw: Use bitstream fonts for LCO demo

Signed-off-by: Keith Packard <keithp@keithp.com>
14 months agoaltos/draw: Use <> for include files
Keith Packard [Mon, 27 Feb 2023 22:38:09 +0000 (14:38 -0800)]
altos/draw: Use <> for include files

Signed-off-by: Keith Packard <keithp@keithp.com>
14 months agoaltos/draw: Add vera sans fonts
Keith Packard [Mon, 27 Feb 2023 22:36:33 +0000 (14:36 -0800)]
altos/draw: Add vera sans fonts

These work better in 1-bit mode than frutiger

Signed-off-by: Keith Packard <keithp@keithp.com>
14 months agoaltos/draw: Add damage tracking
Keith Packard [Mon, 27 Feb 2023 22:35:36 +0000 (14:35 -0800)]
altos/draw: Add damage tracking

This will allow more efficient updating of the screen

Signed-off-by: Keith Packard <keithp@keithp.com>
14 months agoaltos/draw: hand-edit 64-pixel 3/5 to avoid jank
Keith Packard [Mon, 27 Feb 2023 22:11:06 +0000 (14:11 -0800)]
altos/draw: hand-edit 64-pixel 3/5 to avoid jank

These had random-looking pixels hanging off the ends.

Signed-off-by: Keith Packard <keithp@keithp.com>
14 months agoaltos/draw: Use fewer fonts in lco sample
Keith Packard [Mon, 27 Feb 2023 02:55:54 +0000 (18:55 -0800)]
altos/draw: Use fewer fonts in lco sample

Saves some memory

Signed-off-by: Keith Packard <keithp@keithp.com>
14 months agoaltos/draw: Add line test app
Keith Packard [Mon, 27 Feb 2023 02:50:31 +0000 (18:50 -0800)]
altos/draw: Add line test app

There were bugs, now there's a app to check them.

Signed-off-by: Keith Packard <keithp@keithp.com>
14 months agoaltos/draw: Split out draw test scaffolding from lco-test.c
Keith Packard [Mon, 27 Feb 2023 02:49:47 +0000 (18:49 -0800)]
altos/draw: Split out draw test scaffolding from lco-test.c

Allows it to be reused.

Signed-off-by: Keith Packard <keithp@keithp.com>
14 months agoaltos/draw: Inline span fill for polygons
Keith Packard [Mon, 27 Feb 2023 02:48:54 +0000 (18:48 -0800)]
altos/draw: Inline span fill for polygons

Instead of calling ao_rect, do the clipping by hand
and call ao_solid instead.

Signed-off-by: Keith Packard <keithp@keithp.com>
14 months agoaltos/draw: Fix clipping far line end
Keith Packard [Mon, 27 Feb 2023 02:48:05 +0000 (18:48 -0800)]
altos/draw: Fix clipping far line end

Make sure the final unclipped pixel gets drawn.

Signed-off-by: Keith Packard <keithp@keithp.com>
14 months agoaltos/draw: Check for horiz/vert line when clipping
Keith Packard [Mon, 27 Feb 2023 02:46:40 +0000 (18:46 -0800)]
altos/draw: Check for horiz/vert line when clipping

Horizontal or vertical lines won't step along the minor axis while
clipping.

Signed-off-by: Keith Packard <keithp@keithp.com>
14 months agoaltos/draw: Add validation for line drawing
Keith Packard [Mon, 27 Feb 2023 02:46:09 +0000 (18:46 -0800)]
altos/draw: Add validation for line drawing

Just make sure it never draws outside the dest.

Signed-off-by: Keith Packard <keithp@keithp.com>
14 months agoaltos/draw: Rename test app to 'lco-test'
Keith Packard [Mon, 27 Feb 2023 00:04:17 +0000 (16:04 -0800)]
altos/draw: Rename test app to 'lco-test'

This seems like a good place to do the LCO UX prototyping

Signed-off-by: Keith Packard <keithp@keithp.com>
14 months agoaltos/draw: Mock up TeleLCO boot sequence
Keith Packard [Mon, 27 Feb 2023 00:01:20 +0000 (16:01 -0800)]
altos/draw: Mock up TeleLCO boot sequence

Show logo, progress bar and discovered box numbers during
boot sequence

Signed-off-by: Keith Packard <keithp@keithp.com>
14 months agoaltos/draw: use --gc-sections in demo program
Keith Packard [Sun, 26 Feb 2023 22:59:58 +0000 (14:59 -0800)]
altos/draw: use --gc-sections in demo program

This cleans up all of the unused font bits

Signed-off-by: Keith Packard <keithp@keithp.com>
14 months agoaltos/draw: Rearrange sample LCO screen in draw-test
Keith Packard [Sun, 26 Feb 2023 22:14:56 +0000 (14:14 -0800)]
altos/draw: Rearrange sample LCO screen in draw-test

Place labels at the top, use proportional font so
the voltage values fit.

Signed-off-by: Keith Packard <keithp@keithp.com>
14 months agoaltos/draw: Add NotoMono font
Keith Packard [Sun, 26 Feb 2023 21:57:34 +0000 (13:57 -0800)]
altos/draw: Add NotoMono font

This has a zero without a dot in it, so it might
look better on TeleLCO

Signed-off-by: Keith Packard <keithp@keithp.com>
14 months agoaltos/draw: Add transforms to polygon code
Keith Packard [Sun, 26 Feb 2023 21:47:34 +0000 (13:47 -0800)]
altos/draw: Add transforms to polygon code

This lets the polygons remain constant but have them get
scaled/translated when presented on the screen.

Signed-off-by: Keith Packard <keithp@keithp.com>
14 months agoaltos/draw: Convert draw test framework to modern C
Keith Packard [Sun, 26 Feb 2023 21:46:15 +0000 (13:46 -0800)]
altos/draw: Convert draw test framework to modern C

Was still using K&R function definitions?

Signed-off-by: Keith Packard <keithp@keithp.com>
14 months agoaltos/draw: Add monospaced font
Keith Packard [Sun, 26 Feb 2023 21:44:52 +0000 (13:44 -0800)]
altos/draw: Add monospaced font

Signed-off-by: Keith Packard <keithp@keithp.com>
14 months agoaltos/draw: Move font files to subdirectory
Keith Packard [Sun, 26 Feb 2023 21:42:05 +0000 (13:42 -0800)]
altos/draw: Move font files to subdirectory

It looks like we might end up with a lot of these

Signed-off-by: Keith Packard <keithp@keithp.com>
14 months agoaltos/draw: Add more fonts
Keith Packard [Sun, 26 Feb 2023 21:21:24 +0000 (13:21 -0800)]
altos/draw: Add more fonts

Add our logo font and more sizes of Frutiger

Signed-off-by: Keith Packard <keithp@keithp.com>
14 months agoaltos/draw: Add logo
Keith Packard [Sun, 26 Feb 2023 07:46:25 +0000 (23:46 -0800)]
altos/draw: Add logo

Captures the SVG logo polygons and allows them to be
scaled to suit.

Signed-off-by: Keith Packard <keithp@keithp.com>
14 months agoaltos/draw: Use float for polygon coords
Keith Packard [Sun, 26 Feb 2023 07:45:25 +0000 (23:45 -0800)]
altos/draw: Use float for polygon coords

This makes polygons look way better.

Signed-off-by: Keith Packard <keithp@keithp.com>
14 months agoaltos/draw: Make test drawing app emulate TeleLCO
Keith Packard [Sun, 26 Feb 2023 06:39:07 +0000 (22:39 -0800)]
altos/draw: Make test drawing app emulate TeleLCO

Draw some numbers for box and pad. Also allow display of a couple of
polygons.

Signed-off-by: Keith Packard <keithp@keithp.com>
14 months agoaltos/draw: Only cover ASCII
Keith Packard [Sun, 26 Feb 2023 06:38:33 +0000 (22:38 -0800)]
altos/draw: Only cover ASCII

Skip the rest of latin-1

Signed-off-by: Keith Packard <keithp@keithp.com>
14 months agoaltos/draw: Add poly fill function
Keith Packard [Sun, 26 Feb 2023 06:37:16 +0000 (22:37 -0800)]
altos/draw: Add poly fill function

Fill polygons using non-zero winding rule.

Signed-off-by: Keith Packard <keithp@keithp.com>
14 months agoaltos: Fill in more of the draw code
Keith Packard [Sun, 26 Feb 2023 03:22:58 +0000 (19:22 -0800)]
altos: Fill in more of the draw code

Get multiple fonts working, allow for variable-pitch fonts.

Signed-off-by: Keith Packard <keithp@keithp.com>
14 months agoVersion 1.9.15
Keith Packard [Thu, 16 Feb 2023 23:13:01 +0000 (15:13 -0800)]
Version 1.9.15

Signed-off-by: Keith Packard <keithp@keithp.com>
14 months agoao-bringup: turnon and test scripts for TeleMetrum v4.0 & TeleMega v6.0
Bdale Garbee [Mon, 20 Feb 2023 00:50:40 +0000 (17:50 -0700)]
ao-bringup: turnon and test scripts for TeleMetrum v4.0 & TeleMega v6.0

14 months agoao-tools/ao-flash: Use 'program' instead of 'flash' for samd21
Keith Packard [Sun, 19 Feb 2023 00:51:09 +0000 (16:51 -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>
14 months agodoc: Add TeleMetrum v4.0 to specs and 1.9.15 release notes
Keith Packard [Thu, 16 Feb 2023 23:36:30 +0000 (15:36 -0800)]
doc: Add TeleMetrum v4.0 to specs and 1.9.15 release notes

Signed-off-by: Keith Packard <keithp@keithp.com>
14 months agoaltos/telemetrum-v4.0: Add .gitignore
Keith Packard [Thu, 16 Feb 2023 23:36:11 +0000 (15:36 -0800)]
altos/telemetrum-v4.0: Add .gitignore

Signed-off-by: Keith Packard <keithp@keithp.com>
14 months agoAdd TeleMetrum v4.0 firmware to releases
Keith Packard [Thu, 16 Feb 2023 23:35:29 +0000 (15:35 -0800)]
Add TeleMetrum v4.0 firmware to releases

Signed-off-by: Keith Packard <keithp@keithp.com>
14 months agoAdd TeleMega v6.0 firmware to release
Keith Packard [Thu, 16 Feb 2023 23:12:24 +0000 (15:12 -0800)]
Add TeleMega v6.0 firmware to release

Signed-off-by: Keith Packard <keithp@keithp.com>
14 months agodoc: Add HW specs for TeleMega v6.0
Keith Packard [Thu, 16 Feb 2023 23:07:20 +0000 (15:07 -0800)]
doc: Add HW specs for TeleMega v6.0

Signed-off-by: Keith Packard <keithp@keithp.com>
14 months agodoc: Add initial 1.9.15 release notes
Keith Packard [Thu, 16 Feb 2023 23:05:27 +0000 (15:05 -0800)]
doc: Add initial 1.9.15 release notes

Signed-off-by: Keith Packard <keithp@keithp.com>
14 months agoMerge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
Bdale Garbee [Thu, 16 Feb 2023 22:52:56 +0000 (15:52 -0700)]
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos

14 months agoaltos: Fix TMega v6.0 and v5.0 IMU axes
Keith Packard [Thu, 9 Feb 2023 23:22:17 +0000 (15:22 -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>
14 months agoaltoslib: Hide internals of AltosIMU
Keith Packard [Sat, 11 Feb 2023 01:58:08 +0000 (17:58 -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>
14 months agoaltos: re-number csm85clio outputs 0..49 to match schematic and silkscreen
Bdale Garbee [Wed, 15 Feb 2023 02:00:29 +0000 (19:00 -0700)]
altos: re-number csm85clio outputs 0..49 to match schematic and silkscreen

14 months agoMerge branch 'clio'
Bdale Garbee [Fri, 10 Feb 2023 13:52:43 +0000 (06:52 -0700)]
Merge branch 'clio'

14 months agoaltos: add csm84clio-v0.1 firmware
Bdale Garbee [Fri, 10 Feb 2023 13:52:11 +0000 (06:52 -0700)]
altos: add csm84clio-v0.1 firmware

14 months agoaltos/telemega-v6.0: bmi088 axes were wrong
Keith Packard [Thu, 9 Feb 2023 23:22:17 +0000 (15:22 -0800)]
altos/telemega-v6.0: bmi088 axes were wrong

X is 'along', Y is 'across'.

Signed-off-by: Keith Packard <keithp@keithp.com>
14 months agoaltos/telemega-v6: Remove beep freq defs and use defaults
Keith Packard [Thu, 9 Feb 2023 22:54:19 +0000 (14:54 -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>
14 months agoaltos: Add .gitignore for telemega v6.0
Keith Packard [Thu, 9 Feb 2023 20:35:13 +0000 (12:35 -0800)]
altos: Add .gitignore for telemega v6.0

Signed-off-by: Keith Packard <keithp@keithp.com>
15 months agoVersion 1.9.14
Keith Packard [Thu, 2 Feb 2023 19:33:35 +0000 (11:33 -0800)]
Version 1.9.14

Signed-off-by: Keith Packard <keithp@keithp.com>
15 months agodoc: Release notes for 1.9.14
Keith Packard [Thu, 2 Feb 2023 19:33:00 +0000 (11:33 -0800)]
doc: Release notes for 1.9.14

Signed-off-by: Keith Packard <keithp@keithp.com>
15 months agoaltos/drivers: Increase LCO receive timeout to 20ms
Keith Packard [Thu, 2 Feb 2023 02:00:24 +0000 (18:00 -0800)]
altos/drivers: Increase LCO receive timeout to 20ms

Changes in the cc1200 driver appear to have sped up the transition
from TX to RX enough that we now need to wait a bit longer for
TeleFire to return a packet. Increase the 38400 bps timeout to 20ms
and the 9600 bps timeout to 30ms.

Signed-off-by: Keith Packard <keithp@keithp.com>
15 months agoaltos/drivers: Use spi duplex to fetch register values
Keith Packard [Thu, 2 Feb 2023 01:59:28 +0000 (17:59 -0800)]
altos/drivers: Use spi duplex to fetch register values

We read register values during regular operation, so let's improve
performance a bit by making this faster.

Signed-off-by: Keith Packard <keithp@keithp.com>
15 months agoaltos/telefiretwo-v0.2: Get things building again
Keith Packard [Thu, 2 Feb 2023 00:29:42 +0000 (16:29 -0800)]
altos/telefiretwo-v0.2: Get things building again

This code got very stale and needed some config updates

Signed-off-by: Keith Packard <keithp@keithp.com>
15 months agodrivers/cc1200: Don't disable cc1200 interrupts ever
Keith Packard [Wed, 1 Feb 2023 22:14:55 +0000 (14:14 -0800)]
drivers/cc1200: Don't disable cc1200 interrupts ever

The driver now leaves interrupts always enabled, don't disable them in
ao_radio_recv_abort as nothing will ever turn them back on.

Signed-off-by: Keith Packard <keithp@keithp.com>
15 months agoMerge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
Bdale Garbee [Fri, 20 Jan 2023 05:51:27 +0000 (22:51 -0700)]
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos

15 months agoVersion 1.9.13
Keith Packard [Fri, 20 Jan 2023 01:28:36 +0000 (17:28 -0800)]
Version 1.9.13

Signed-off-by: Keith Packard <keithp@keithp.com>
15 months agodoc: Update copyright year to 2023
Keith Packard [Fri, 20 Jan 2023 01:27:18 +0000 (17:27 -0800)]
doc: Update copyright year to 2023

Signed-off-by: Keith Packard <keithp@keithp.com>
15 months agodoc: Add release notes for 1.9.13
Keith Packard [Fri, 20 Jan 2023 01:27:02 +0000 (17:27 -0800)]
doc: Add release notes for 1.9.13

Signed-off-by: Keith Packard <keithp@keithp.com>
15 months agodoc: update EasyMotor behavior description for firmware 1.9.13 and later
Bdale Garbee [Fri, 20 Jan 2023 05:41:24 +0000 (22:41 -0700)]
doc: update EasyMotor behavior description for firmware 1.9.13 and later

15 months agodoc: update EasyMotor behavior description for firmware 1.9.13 and later
Bdale Garbee [Fri, 20 Jan 2023 05:41:24 +0000 (22:41 -0700)]
doc: update EasyMotor behavior description for firmware 1.9.13 and later

15 months agoDisable TM v4.0 firmware for 1.9.13
Keith Packard [Fri, 20 Jan 2023 01:39:42 +0000 (17:39 -0800)]
Disable TM v4.0 firmware for 1.9.13

This will be in 1.9.14

Signed-off-by: Keith Packard <keithp@keithp.com>
15 months agoVersion 1.9.13
Keith Packard [Fri, 20 Jan 2023 01:28:36 +0000 (17:28 -0800)]
Version 1.9.13

Signed-off-by: Keith Packard <keithp@keithp.com>
15 months agodoc: Update copyright year to 2023
Keith Packard [Fri, 20 Jan 2023 01:27:18 +0000 (17:27 -0800)]
doc: Update copyright year to 2023

Signed-off-by: Keith Packard <keithp@keithp.com>
15 months agodoc: Add release notes for 1.9.13
Keith Packard [Fri, 20 Jan 2023 01:27:02 +0000 (17:27 -0800)]
doc: Add release notes for 1.9.13

Signed-off-by: Keith Packard <keithp@keithp.com>
15 months agoaltos: Add makefiles for telemega v6
Keith Packard [Fri, 20 Jan 2023 01:20:44 +0000 (17:20 -0800)]
altos: Add makefiles for telemega v6

Signed-off-by: Keith Packard <keithp@keithp.com>
15 months agoaltos/easymotor: Move pressure conversion code to ao_motor_flight.c easymotor-flight
Keith Packard [Thu, 19 Jan 2023 22:04:50 +0000 (14:04 -0800)]
altos/easymotor: Move pressure conversion code to ao_motor_flight.c

This inline function uses a pile of constants which aren't defined in
ao_pins.h, so move it to ao_motor_flight.c where it is used

Signed-off-by: Keith Packard <keithp@keithp.com>
15 months agoeasymotor-v3: Fix pressure to adc conversion to use reference voltage
Keith Packard [Thu, 19 Jan 2023 21:20:56 +0000 (13:20 -0800)]
easymotor-v3: Fix pressure to adc conversion to use reference voltage

Wasn't taking reference voltage into account, which meant the computed values
were 3.3 times too high.

Signed-off-by: Keith Packard <keithp@keithp.com>
15 months agoMerge branch 'easymotor-flight'
Keith Packard [Thu, 19 Jan 2023 20:21:32 +0000 (12:21 -0800)]
Merge branch 'easymotor-flight'

15 months agoaltos/telelco: Add some debug aids for TeleLCO event stuff
Keith Packard [Thu, 19 Jan 2023 20:18:46 +0000 (12:18 -0800)]
altos/telelco: Add some debug aids for TeleLCO event stuff

Use (debug & 2) to select just event debugging.
Add 'pretend' mode to cycle through all possible pad boxes.

Signed-off-by: Keith Packard <keithp@keithp.com>
16 months agoaltoslib: Add TeleMega v6 support
Keith Packard [Wed, 28 Dec 2022 05:33:14 +0000 (21:33 -0800)]
altoslib: Add TeleMega v6 support

New sensor (bmi088) support, plus other changes as needed. Also found
some places missing TeleMega-v5 support?

Signed-off-by: Keith Packard <keithp@keithp.com>
16 months agoao-tools: Update ao-eeprom for TeleMega v6
Keith Packard [Wed, 28 Dec 2022 05:32:39 +0000 (21:32 -0800)]
ao-tools: Update ao-eeprom for TeleMega v6

Add new log file format; no other changes needed here.

Signed-off-by: Keith Packard <keithp@keithp.com>
16 months agoao-tools: Fix buffer overflow in lib/ao-hex.c
Keith Packard [Wed, 28 Dec 2022 05:31:38 +0000 (21:31 -0800)]
ao-tools: Fix buffer overflow in lib/ao-hex.c

ao_hex_file_create allocated a buffer too short when writing EOF.

Signed-off-by: Keith Packard <keithp@keithp.com>
16 months agoaltos: Split AO_LOG_NORMALIZED support out in telemetry code
Keith Packard [Wed, 28 Dec 2022 05:30:13 +0000 (21:30 -0800)]
altos: Split AO_LOG_NORMALIZED support out in telemetry code

This avoids needing per-driver changes to the telemetry code by using
the normalized data gathering techniques.

Signed-off-by: Keith Packard <keithp@keithp.com>