From 489e33ceb6133f5a80e21cd376543554fec2dab0 Mon Sep 17 00:00:00 2001 From: Moritz Martinius Date: Sun, 29 Dec 2024 16:29:25 +0100 Subject: [PATCH] Fix copy&paste issue, giving wrongn readings --- Core/Src/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/Src/main.cpp b/Core/Src/main.cpp index c49da65..55accd1 100644 --- a/Core/Src/main.cpp +++ b/Core/Src/main.cpp @@ -93,7 +93,7 @@ int main(void) { measurement |= (val.second << 8); val = i2c1->read(0x2A, 0x14); - measurement |= val.second << 16; + measurement |= val.second; while (1) { measurement = 0; @@ -104,7 +104,7 @@ int main(void) { measurement |= (val.second << 8); val = i2c1->read(0x2A, 0x14); - measurement |= val.second << 16; + measurement |= val.second; usart2->println("Measurement " + std::to_string(measurement) + " counts");