fixed tempSensor bug

pull/29/head
alanbjohnston 6 years ago committed by GitHub
parent 421aa52425
commit 240c03c7d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -364,22 +364,6 @@ int main(int argc, char *argv[]) {
config_file = fopen("sim.cfg","r");
if (ax5043)
{
int file_i2c;
if ((file_i2c = open("/dev/i2c-3", O_RDWR)) < 0)
{
fprintf(stderr,"ERROR: /dev/ic2-3 bus not present\n");
tempSensor = -1;
} else
{
// tempSensor = wiringPiI2CSetupInterface("/dev/i2c-3", 0x48);
tempSensor = config_sensor("/dev/i2c-3", 0x48, 0);
}
// fprintf(stderr,"tempSensor: %d \n",tempSensor);
}
if (vB4)
{
sensor[PLUS_X] = config_sensor("/dev/i2c-1", 0x40, 400);
@ -400,6 +384,7 @@ if (vB4)
sensor[MINUS_X] = config_sensor("/dev/i2c-0", 0x40, 400);
sensor[MINUS_Y] = config_sensor("/dev/i2c-0", 0x41, 400);
sensor[MINUS_Z] = config_sensor("/dev/i2c-0", 0x44, 400);
tempSensor = config_sensor("/dev/i2c-3", 0x48, 0);
}
int ret;

Loading…
Cancel
Save

Powered by TurnKey Linux.