Update telem.c

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

@ -125,6 +125,9 @@ struct SensorData read_sensor_data(struct SensorConfig sensor) {
//struct SensorConfig config_sensor(int sensor, int milliAmps) {
struct SensorConfig config_sensor(char *bus, int address, int milliAmps) {
struct SensorConfig data;
print ("Bus number: %d \n", atoi(bus[strlen(bus) - 1]);
FILE *i2cdetect = popen("timeout --preserve-status 5 i2cdetect -y 0", "r");
pclose(i2dectect);
i2cdetect = open("echo $?", "r");

Loading…
Cancel
Save

Powered by TurnKey Linux.