Update telem.c

pull/55/head
alanbjohnston 5 years ago committed by GitHub
parent 38e8f60ec5
commit b579bc0b4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -328,6 +328,7 @@ int main(int argc, char *argv[]) {
} }
// Reading I2C voltage and current sensors // Reading I2C voltage and current sensors
printf("Starting\n");
FILE* file = popen("python3 /home/pi/CubeSatSim/python/voltcurrent.py 1 3 c", "r"); FILE* file = popen("python3 /home/pi/CubeSatSim/python/voltcurrent.py 1 3 c", "r");
pclose(file); pclose(file);
@ -335,6 +336,14 @@ int main(int argc, char *argv[]) {
int count; int count;
char *token; char *token;
char cmdbuffer[100]; char cmdbuffer[100];
file = popen("python3 /home/pi/CubeSatSim/python/voltcurrent.py 1 3", "r");
// char cmdbuffer[1000];
// char cmdbuffer[1000];
fgets(cmdbuffer, 1000, file);
printf("result: %s\n", cmdbuffer);
pclose(file);
const char space[2] = " "; const char space[2] = " ";
token = strtok(cmdbuffer, space); token = strtok(cmdbuffer, space);
for (count = 0; count < 8; count++) for (count = 0; count < 8; count++)

Loading…
Cancel
Save

Powered by TurnKey Linux.