summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
authorpetter <39340152+petterhs@users.noreply.github.com>2021-01-25 14:18:57 +0100
committerpetter <39340152+petterhs@users.noreply.github.com>2021-01-25 14:53:44 +0100
commit169b861af1fd8b1f7834ad78a8880882b236dc96 (patch)
tree62e01fb1447661c1265f1cfd9d031f1167702811 /src/drivers
parent80838d1e42e83b50188d6237d16c81cfa27781a6 (diff)
fix build warnings in HR implementation
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/Hrs3300.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/drivers/Hrs3300.cpp b/src/drivers/Hrs3300.cpp
index 2aded7d3..a16c8e4e 100644
--- a/src/drivers/Hrs3300.cpp
+++ b/src/drivers/Hrs3300.cpp
@@ -73,10 +73,10 @@ void Hrs3300::SetGain(uint8_t gain) {
static constexpr uint8_t maxGain = 64;
gain = std::min(gain, maxGain);
uint8_t hgain = 0;
- while((1 << hgain) < gain)
+ while((1 << hgain) < gain) {
hgain++;
-
WriteRegister(static_cast<uint8_t>(Registers::Hgain), hgain << 2);
+ }
}
void Hrs3300::SetDrive(uint8_t drive) {