From 456ebd14e86d1a00bf902a6e92ea2d359bfd13d4 Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Mon, 22 Jun 2020 17:43:00 -0700 Subject: [PATCH] fixed missing precompiler flag in i2c for 328p variants #bugfix --- firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.cpp b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.cpp index 69d5e2a..7e1170d 100644 --- a/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.cpp +++ b/firmware/AVR-Source/Pyr0_Piezo_Sensor_v2.x.x/src/pP_i2c.cpp @@ -97,7 +97,12 @@ void i2cInput(int bytesReceived) { value = Wire1.read(); #endif } else { + #ifdef __AVR_ATmega328PB__ value = value << 8 | Wire1.read(); + #endif + #ifdef __AVR_ATmega328P__ + value = value << 8 | Wire.read(); + #endif } }