pull/57/head
alanbjohnston 5 years ago committed by GitHub
parent 2b4f9b19f3
commit 9d786f3db8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -85,7 +85,12 @@ int main(int argc, char *argv[]) {
printf("vB4 Present\n"); printf("vB4 Present\n");
map[BAT] = BUS; map[BAT] = BUS;
map[BUS] = BAT; map[BUS] = BAT;
strcpy(busStr,"1 0");
snprintf(busStr, 10, "%d %d", test_i2c_bus(1), test_i2c_bus(0));
printf("New Bus String: %s \n", busStr);
// strcpy(busStr,"1 0");
} }
else else
{ {
@ -172,6 +177,10 @@ int main(int argc, char *argv[]) {
map[PLUS_Z] = BAT; map[PLUS_Z] = BAT;
map[MINUS_Z] = PLUS_Z; map[MINUS_Z] = PLUS_Z;
snprintf(busStr, 10, "%d %d", test_i2c_bus(1), test_i2c_bus(0));
printf("New Bus String: %s \n", busStr);
/*
if (access("/dev/i2c-0", W_OK | R_OK) >= 0) { // Test if I2C Bus 0 is present if (access("/dev/i2c-0", W_OK | R_OK) >= 0) { // Test if I2C Bus 0 is present
printf("/dev/i2c-0 is present\n\n"); printf("/dev/i2c-0 is present\n\n");
char result[128]; char result[128];
@ -198,6 +207,7 @@ int main(int argc, char *argv[]) {
printf("ERROR: %s bus has a problem \n Check software to see if enabled \n", "0"); printf("ERROR: %s bus has a problem \n Check software to see if enabled \n", "0");
strcpy(busStr,"1 -1"); strcpy(busStr,"1 -1");
} }
*/
} }
} }
} }

Loading…
Cancel
Save

Powered by TurnKey Linux.