Update main.c revert VB4 and 5 code

sim-fail-2
Alan Johnston 4 months ago committed by GitHub
parent 6cebaea2da
commit 6ad6f5ce0c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -295,13 +295,29 @@ int main(int argc, char * argv[]) {
fclose(config_file); fclose(config_file);
config_file = fopen("sim.cfg", "r"); config_file = fopen("sim.cfg", "r");
map[BAT2] = MINUS_Z; if (vB4) {
map[BAT] = BAT2; map[BAT] = BAT2;
map[PLUS_Z] = BAT; map[BAT2] = BAT;
map[MINUS_Z] = PLUS_Z; snprintf(busStr, 10, "%d %d", i2c_bus1, test_i2c_bus(0));
// snprintf(busStr, 10, "%d %d", i2c_bus1, test_i2c_bus(0)); } else if (vB5) {
strcpy(busStr,"1 3"); map[MINUS_X] = MINUS_Y;
voltageThreshold = 8.0; map[PLUS_Z] = MINUS_X;
map[MINUS_Y] = PLUS_Z;
if (access("/dev/i2c-11", W_OK | R_OK) >= 0) { // Test if I2C Bus 11 is present
printf("/dev/i2c-11 is present\n\n");
snprintf(busStr, 10, "%d %d", test_i2c_bus(1), test_i2c_bus(11));
} else {
snprintf(busStr, 10, "%d %d", i2c_bus1, i2c_bus3);
}
} else {
map[BAT2] = MINUS_Z;
map[BAT] = BAT2;
map[PLUS_Z] = BAT;
map[MINUS_Z] = PLUS_Z;
snprintf(busStr, 10, "%d %d", i2c_bus1, test_i2c_bus(0));
voltageThreshold = 8.0;
}
// check for camera // check for camera
// char cmdbuffer1[1000]; // char cmdbuffer1[1000];

Loading…
Cancel
Save

Powered by TurnKey Linux.