summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2015-08-20 23:02:04 -0700
committerKeith Packard <keithp@keithp.com>2015-08-20 23:08:17 -0700
commitf491eec1b950e4ad35a535db254a27a3dd2ad430 (patch)
tree1e966cada6fc1a1b7c5578d225da4c22acf8f22a
parentb4064bf63bb95c58d74869f4ff3e440370d64692 (diff)
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 <keithp@keithp.com>
-rw-r--r--src/drivers/ao_companion.c4
-rw-r--r--src/easymega-v1.0/ao_pins.h1
-rw-r--r--src/teleballoon-v2.0/ao_pins.h1
-rw-r--r--src/telemega-v0.1/ao_pins.h1
-rw-r--r--src/telemega-v1.0/ao_pins.h1
-rw-r--r--src/telemetrum-v2.0/ao_pins.h1
6 files changed, 9 insertions, 0 deletions
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 */