Update main.c

pull/78/head
alanbjohnston 5 years ago committed by GitHub
parent 203f9cee90
commit a6a48b52a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -342,14 +342,14 @@ int main(int argc, char * argv[]) {
strcat(pythonStr, busStr); strcat(pythonStr, busStr);
strcat(pythonConfigStr, pythonStr); strcat(pythonConfigStr, pythonStr);
strcat(pythonConfigStr, " c"); strcat(pythonConfigStr, " c");
/*
// FILE* file1 = popen("python3 /home/pi/CubeSatSim/python/voltcurrent.py 1 11 c", "r"); // FILE* file1 = popen("python3 /home/pi/CubeSatSim/python/voltcurrent.py 1 11 c", "r");
FILE * file1 = popen(pythonConfigStr, "r"); FILE * file1 = popen(pythonConfigStr, "r");
char cmdbuffer[1000]; char cmdbuffer[1000];
fgets(cmdbuffer, 1000, file1); fgets(cmdbuffer, 1000, file1);
printf("pythonStr result: %s\n", cmdbuffer); printf("pythonStr result: %s\n", cmdbuffer);
pclose(file1); pclose(file1);
*/
int pid, infd, outfd; int pid, infd, outfd;
printf("Start Process Result: %d %d %d %d \n", start_subprocess(pythonConfigStr, &pid, &infd, &outfd), pid, infd, outfd); printf("Start Process Result: %d %d %d %d \n", start_subprocess(pythonConfigStr, &pid, &infd, &outfd), pid, infd, outfd);
/* /*

Loading…
Cancel
Save

Powered by TurnKey Linux.