Update main.c

pull/18/head
alanbjohnston 7 years ago committed by GitHub
parent e0f01d9b8e
commit 2719d43034
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -133,7 +133,7 @@ struct SensorData read_sensor_data(struct SensorConfig sensor) {
*/
valuec1 = wireReadRegister(sensor.fd, INA219_REG_SHUNTVOLTAGE);
twos = twosToInt(valuec1, 16);
valuec3 = ((float)twos)/sensor.calValue);
valuec3 = ((float)twos)/sensor.calValue;
printf("@@@@@@@ Register: %d Shunt: %d Calc Current: %f \n", valuec1, twos, valuec3);
uint16_t value2 = (uint16_t)wireReadRegister(sensor.fd, INA219_REG_BUSVOLTAGE);

Loading…
Cancel
Save

Powered by TurnKey Linux.