From: Keith Packard Date: Fri, 21 Aug 2015 06:02:04 +0000 (-0700) Subject: altos: Add HAS_COMPANION to new boards with companion connectors X-Git-Tag: 1.6.2^2~62^2~4 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=f491eec1b950e4ad35a535db254a27a3dd2ad430 altos: Add HAS_COMPANION to new boards with companion connectors 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 --- diff --git a/src/drivers/ao_companion.c b/src/drivers/ao_companion.c index 7e02939b..5f07e8b0 100644 --- a/src/drivers/ao_companion.c +++ b/src/drivers/ao_companion.c @@ -23,6 +23,10 @@ #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, \ diff --git a/src/easymega-v1.0/ao_pins.h b/src/easymega-v1.0/ao_pins.h index d6490ba5..a5e55638 100644 --- a/src/easymega-v1.0/ao_pins.h +++ b/src/easymega-v1.0/ao_pins.h @@ -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 */ diff --git a/src/teleballoon-v2.0/ao_pins.h b/src/teleballoon-v2.0/ao_pins.h index a369070f..b62b5580 100644 --- a/src/teleballoon-v2.0/ao_pins.h +++ b/src/teleballoon-v2.0/ao_pins.h @@ -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 */ diff --git a/src/telemega-v0.1/ao_pins.h b/src/telemega-v0.1/ao_pins.h index 2616e906..7ccc6085 100644 --- a/src/telemega-v0.1/ao_pins.h +++ b/src/telemega-v0.1/ao_pins.h @@ -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 */ diff --git a/src/telemega-v1.0/ao_pins.h b/src/telemega-v1.0/ao_pins.h index 77b753d1..664546c2 100644 --- a/src/telemega-v1.0/ao_pins.h +++ b/src/telemega-v1.0/ao_pins.h @@ -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 */ diff --git a/src/telemetrum-v2.0/ao_pins.h b/src/telemetrum-v2.0/ao_pins.h index a9a4b243..fbb38df2 100644 --- a/src/telemetrum-v2.0/ao_pins.h +++ b/src/telemetrum-v2.0/ao_pins.h @@ -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 */