summaryrefslogtreecommitdiff
path: root/src/ao_packet_slave.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2011-03-19 23:27:15 -0700
committerKeith Packard <keithp@keithp.com>2011-03-19 23:27:15 -0700
commit5c28b9312d90a3a66016abc641c20bcd852d69f8 (patch)
tree6fa9b96cc2096342ee9579b3c9a08a40c55919a2 /src/ao_packet_slave.c
parente980b251e5a4d25410710a9aa89ef940e06b0d93 (diff)
altos: Don't init packet slave on TD. Make slave start optional
Oops. TeleDongle was starting the packet slave code, which kinda wrecked its ability to receive telemetry packets. This patch simply removes the packet slave code from teledongle as it cannot be used (yet), it also makes the packet slave code initialization take a parameter which controls whether to start that by default; in the future, perhaps TeleDongle will gain a command to start packet slave mode. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/ao_packet_slave.c')
-rw-r--r--src/ao_packet_slave.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ao_packet_slave.c b/src/ao_packet_slave.c
index eb456dab..e40ddfec 100644
--- a/src/ao_packet_slave.c
+++ b/src/ao_packet_slave.c
@@ -58,10 +58,11 @@ ao_packet_slave_stop(void)
}
void
-ao_packet_slave_init(void)
+ao_packet_slave_init(uint8_t enable)
{
ao_add_stdio(ao_packet_pollchar,
ao_packet_putchar,
NULL);
- ao_packet_slave_start();
+ if (enable)
+ ao_packet_slave_start();
}