altos: Add HAS_COMPANION to new boards with companion connectors
authorKeith Packard <keithp@keithp.com>
Fri, 21 Aug 2015 06:02:04 +0000 (23:02 -0700)
committerKeith Packard <keithp@keithp.com>
Fri, 21 Aug 2015 06:08:17 +0000 (23:08 -0700)
Thanks much to Rob Derstadt for discovering this bug!

TeleMetrum v2.0, TeleMega, EasyMega, TeleBalloon v2.0 all have
companion connectors and yet HAS_COMPANION was not defined. This
disabled companion telemetry packets on these products, but otherwise
didn't have any effect.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/drivers/ao_companion.c
src/easymega-v1.0/ao_pins.h
src/teleballoon-v2.0/ao_pins.h
src/telemega-v0.1/ao_pins.h
src/telemega-v1.0/ao_pins.h
src/telemetrum-v2.0/ao_pins.h

index 7e02939bf7bc0c01bca788bce526da7ee1172115..5f07e8b06cf8827e71e031b215c30a1aedbbc97d 100644 (file)
 #define ao_spi_fast(b)
 #endif
 
+#if !HAS_COMPANION
+#error HAS_COMPANION not set in ao_companion.c
+#endif
+
 #define COMPANION_SELECT()     do {                    \
                ao_spi_get_bit(AO_COMPANION_CS_PORT,    \
                               AO_COMPANION_CS_PIN,     \
index d6490ba59cb34866d91170418530e21960e6f780..a5e556384615a6e6a52b2b4b615de5302c119b66 100644 (file)
@@ -78,6 +78,7 @@
 #define HAS_RADIO              0
 #define HAS_TELEMETRY          0
 #define HAS_APRS               0
+#define HAS_COMPANION          1
 
 #define HAS_SPI_1              1
 #define SPI_1_PA5_PA6_PA7      1       /* Barometer */
index a369070f2fd85435f5542eeedcfa6e686e666562..b62b55800b9c23abc2c78ecc45e6e30829dd982d 100644 (file)
@@ -75,6 +75,7 @@
 #define HAS_RADIO              1
 #define HAS_TELEMETRY          1
 #define HAS_APRS               1
+#define HAS_COMPANION          1
 
 #define HAS_SPI_1              1
 #define SPI_1_PA5_PA6_PA7      1       /* Barometer */
index 2616e9061e20a5d1a7ea93073d3c4287dd1dc2bb..7ccc6085ba1b49139dcf1c6ba164304a2393b19f 100644 (file)
@@ -79,6 +79,7 @@
 #define HAS_RADIO              1
 #define HAS_TELEMETRY          1
 #define HAS_APRS               1
+#define HAS_COMPANION          1
 
 #define HAS_SPI_1              1
 #define SPI_1_PA5_PA6_PA7      1       /* Barometer */
index 77b753d1edb3083cf56c6d917f30154438da864f..664546c2fc02d4ba3aa5b0462b6b0bae747f24dd 100644 (file)
@@ -79,6 +79,7 @@
 #define HAS_RADIO              1
 #define HAS_TELEMETRY          1
 #define HAS_APRS               1
+#define HAS_COMPANION          1
 
 #define HAS_SPI_1              1
 #define SPI_1_PA5_PA6_PA7      1       /* Barometer */
index a9a4b243a690643b65e0431a4406cfb1e30e3452..fbb38df2cf05dba4f17203bd3bb341c40972d485 100644 (file)
@@ -75,6 +75,7 @@
 #define HAS_RADIO              1
 #define HAS_TELEMETRY          1
 #define HAS_APRS               1
+#define HAS_COMPANION          1
 
 #define HAS_SPI_1              1
 #define SPI_1_PA5_PA6_PA7      1       /* Barometer */