Update telem.c

pull/51/head
alanbjohnston 6 years ago committed by GitHub
parent ad6633052d
commit bc6ff48c51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -143,9 +143,10 @@ struct SensorConfig config_sensor(char *bus, int address, int milliAmps) {
// printf("2\n");
// i2cdetect = popen("echo $?", "r");
// printf("getc i2cdetect 1 output: %d\n", getc(i2cdetect));
while (fgets(buf, BUFSIZE, i2cdetect) != NULL) {
/* while (fgets(buf, BUFSIZE, i2cdetect) != NULL) {
printf("OUTPUT: %s", buf);
}
*/
int error = pclose(i2cdetect)/256;
printf("%s error: %d \n", &command, error);
@ -156,9 +157,10 @@ struct SensorConfig config_sensor(char *bus, int address, int milliAmps) {
// printf("2\n");
// i2cdetect = popen("echo $?", "r");
// printf("getc echo output: %d\n", getc(i2cdetect));
while (fgets(buf, BUFSIZE, i2cdetect2) != NULL) {
/* while (fgets(buf, BUFSIZE, i2cdetect2) != NULL) {
printf("OUTPUT: %s", buf);
}
*/
error = pclose(i2cdetect2)/256;
printf("%s error: %d \n", &command, error);

Loading…
Cancel
Save

Powered by TurnKey Linux.