From 42a59f991ddf2ac9f099038e13aac46524653068 Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Sun, 22 Nov 2020 10:54:00 -0500 Subject: [PATCH] added test of lat and long from sim.cfg --- afsk/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/afsk/main.c b/afsk/main.c index e059864f..adeb70d3 100644 --- a/afsk/main.c +++ b/afsk/main.c @@ -190,6 +190,9 @@ int main(int argc, char *argv[]) { printf("Config file /home/pi/CubeSatSim/sim.cfg contains %s %d %8.2f %8.2f\n", call, reset_count, lat_file, long_file); reset_count = (reset_count + 1) % 0xffff; + if ((abs(lat_file) > 0) && ((abs(lat_file) < 90.0) && (abs(long_file) > 0) && (abs(long_file) < 180.0)) + printf("Valid latitude and longitude in config file\n"); + wiringPiSetup (); // Check for SPI and AX-5043 Digital Transceiver Board