Update main.c check for both c&c and direwolf

beta-aprs
Alan Johnston 1 year ago committed by GitHub
parent 1f44cfedf7
commit 880cdce572
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -45,8 +45,15 @@ int main(int argc, char * argv[]) {
else { else {
printf("Pi Zero detected\n"); printf("Pi Zero detected\n");
FILE * command_file = fopen("/home/pi/CubeSatSim/command_control", "r"); FILE * command_file = fopen("/home/pi/CubeSatSim/command_control", "r");
if (command_file == NULL) if (command_file == NULL) {
pi_zero_2_offset = 500; pi_zero_2_offset = 500;
printf("Command and control is OFF\n");
}
command_file = fopen("/home/pi/CubeSatSim/command_control_direwolf", "r");
if (command_file == NULL) {
pi_zero_2_offset = 500;
printf("Command and control Carrier (squelch) is ON\n");
}
sleep(10); sleep(10);
} }
@ -573,10 +580,6 @@ int main(int argc, char * argv[]) {
// #endif // #endif
fclose(uptime_file); fclose(uptime_file);
printf("++++ Loop time: %5.3f sec +++++\n", (millis() - loopTime)/1000.0);
fflush(stdout);
loopTime = millis();
{ {
int count1; int count1;
char * token; char * token;
@ -1212,6 +1215,10 @@ void get_tlm_fox() {
} else } else
printf("first time - no sleep\n"); printf("first time - no sleep\n");
printf("++++ Loop time: %5.3f sec +++++\n", (millis() - loopTime)/1000.0);
fflush(stdout);
loopTime = millis();
// if (mode == FSK) // if (mode == FSK)
{ // just moved { // just moved
for (int count1 = 0; count1 < 8; count1++) { for (int count1 = 0; count1 < 8; count1++) {

Loading…
Cancel
Save

Powered by TurnKey Linux.