changed to i2c 4 and removed tempSensor

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

@ -225,7 +225,7 @@ struct SensorConfig config_sensor(char *bus, int address, int milliAmps) {
struct SensorConfig sensor[8]; // 8 current sensors in Solar Power PCB vB4
struct SensorData reading[8]; // 8 current sensors in Solar Power PCB vB4
struct SensorConfig tempSensor;
//struct SensorConfig tempSensor;
char src_addr[5] = "";
char dest_addr[5] = "CQ";
@ -308,16 +308,16 @@ int main(int argc, char *argv[]) {
fclose(config_file);
config_file = fopen("sim.cfg","r");
tempSensor = config_sensor("/dev/i2c-3", 0x48, 0);
//tempSensor = config_sensor("/dev/i2c-3", 0x48, 0);
sensor[PLUS_X] = config_sensor("/dev/i2c-1", 0x40, 400);
sensor[PLUS_Y] = config_sensor("/dev/i2c-1", 0x41, 400);
sensor[BUS] = config_sensor("/dev/i2c-1", 0x44, 400);
sensor[BAT] = config_sensor("/dev/i2c-1", 0x45, 400);
sensor[PLUS_Z] = config_sensor("/dev/i2c-3", 0x40, 400);
sensor[MINUS_X] = config_sensor("/dev/i2c-3", 0x41, 400);
sensor[MINUS_Y] = config_sensor("/dev/i2c-3", 0x44, 400);
sensor[MINUS_Z] = config_sensor("/dev/i2c-3", 0x45, 400);
sensor[PLUS_Z] = config_sensor("/dev/i2c-4", 0x40, 400);
sensor[MINUS_X] = config_sensor("/dev/i2c-4", 0x41, 400);
sensor[MINUS_Y] = config_sensor("/dev/i2c-4", 0x44, 400);
sensor[MINUS_Z] = config_sensor("/dev/i2c-4", 0x45, 400);
int ret;
//uint8_t data[1024];

Loading…
Cancel
Save

Powered by TurnKey Linux.