Update main.c fix > to <

pull/327/head
Alan Johnston 1 year ago committed by GitHub
parent 02f70d80d5
commit 4244d2a3d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -42,28 +42,28 @@ int main(int argc, char * argv[]) {
if ((resbuffer[0] == '9') && (resbuffer[1] == '0'))
{
// voltageThreshold = 3.7;
printf("Pi Zero 2 detected\n");
fprintf(stderr, "Pi Zero 2 detected\n");
pi_zero_2_offset = 500;
if (uptime_sec > 30) {
printf("Sleep 5 sec");
if (uptime_sec < 30.0) {
fprintf(stderr, "Sleep 5 sec");
sleep(5); // try sleep at start to help boot
}
}
else {
printf("Pi Zero detected\n");
fprintf(stderr,"Pi Zero detected\n");
FILE * command_file = fopen("/home/pi/CubeSatSim/command_control", "r");
if (command_file == NULL) {
pi_zero_2_offset = 500;
printf("Command and control is OFF\n");
fprintf(stderr,"Command and control is OFF\n");
} else {
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");
fprintf(stderr,"Command and control Carrier (squelch) is ON\n");
}
}
if (uptime_sec > 30) {
printf("Sleep 10 sec");
if (uptime_sec < 30.0) {
fprintf(stderr,"Sleep 10 sec");
sleep(10);
}
}

Loading…
Cancel
Save

Powered by TurnKey Linux.