From af3c96f3c3a54a1232c3c71d76172a042b194ffc Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Wed, 24 Jul 2019 04:09:54 -0400 Subject: [PATCH] fixed typo --- afsk/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/afsk/main.c b/afsk/main.c index 686267b1..b209f05d 100644 --- a/afsk/main.c +++ b/afsk/main.c @@ -122,7 +122,7 @@ struct SensorData read_sensor_data(struct SensorConfig sensor) { delay(1); // Max 12-bit conversion time is 586us per sample int value1 = wiringPiI2CRead(sensor.fd); int value2 = wiringPiI2CRead(sensor.fd); - int16_t valuex = (int16_t)(value1 << 8 ) | value2); + int16_t valuex = (int16_t)((value1 << 8) | value2); // uint16_t valuex = (uint16_t)wireReadRegister(sensor.fd, INA219_REG_CURRENT); data.current = (double)valuex / (double)sensor.currentDivider;