send empty FSK or BPSK frames before starting python

pull/104/head
alanbjohnston 5 years ago committed by GitHub
parent 4e156f7455
commit 0d44c8d3db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -396,15 +396,6 @@ int main(int argc, char * argv[]) {
voltageThreshold = 8.0;
}
strcpy(pythonStr, pythonCmd);
strcat(pythonStr, busStr);
strcat(pythonConfigStr, pythonStr);
strcat(pythonConfigStr, " c");
fprintf(stderr, "pythonConfigStr: %s\n", pythonConfigStr);
file1 = sopen(pythonConfigStr); // try new function
// test i2c buses
fflush(stdout);
//printf("Test bus 0\n");
@ -433,9 +424,6 @@ int main(int argc, char * argv[]) {
printf("INFO: I2C bus status 0: %d 1: %d 3: %d camera: %d\n", i2c_bus0, i2c_bus1, i2c_bus3, camera);
#endif
fgets(cmdbuffer, 1000, file1);
fprintf(stderr, "pythonStr result: %s\n", cmdbuffer);
FILE * file5 = popen("sudo rm /home/pi/CubeSatSim/t.txt > /dev/null 2>&1", "r");
pclose(file5);
@ -621,6 +609,27 @@ int main(int argc, char * argv[]) {
printf("\n");
}
memset(voltage, 0, sizeof(voltage));
memset(current, 0, sizeof(current));
memset(sensor, 0, sizeof(sensor));
memset(other, 0, sizeof(other));
if ((mode == FSK) || (mode == BPSK)) {// FSK or BPSK
get_tlm_fox();
firstTime = 1;
fgets(cmdbuffer, 1000, file1);
fprintf(stderr, "pythonStr result: %s\n", cmdbuffer);
strcpy(pythonStr, pythonCmd);
strcat(pythonStr, busStr);
strcat(pythonConfigStr, pythonStr);
strcat(pythonConfigStr, " c");
fprintf(stderr, "pythonConfigStr: %s\n", pythonConfigStr);
file1 = sopen(pythonConfigStr); // python sensor polling function
long int loopTime;
loopTime = millis();

Loading…
Cancel
Save

Powered by TurnKey Linux.