packetint

Arduino-based soundcard interface for packet radio transmissions
git clone git://squid-tech.com/packetint.git
Log | Files | Refs | README

commit 16e0316e87b2b9227c4c55d96ac43674bc0dcaa4
parent 687b2f6f0f903988af516a591a88e3cd399c3d35
Author: joshiemoore <jxm5210@g.rit.edu>
Date:   Fri, 19 Jul 2019 10:24:03 -0400

Remove magic numbers

Diffstat:
Mpacket_interface.ino | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/packet_interface.ino b/packet_interface.ino @@ -1,3 +1,6 @@ +#define VOLTAGE_LOW_BOUND 469 +#define VOLTAGE_HIGH_BOUND 499 + void setup() { // TX detection pinMode(A0, INPUT); @@ -16,7 +19,7 @@ void loop() { // read voltage from TX line int tx_read = analogRead(A0); - if (tx_read < 469 || tx_read > 499) { + if (tx_read < VOLTAGE_LOW_BOUND || tx_read > VOLTAGE_HIGH_BOUND) { // LOW == PTT on digitalWrite(2, LOW);