Skip to content

Commit 6c03c97

Browse files
committed
eliminated warnings in Hrs3300
1 parent 6420885 commit 6c03c97

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/drivers/Hrs3300.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,14 @@ uint16_t Hrs3300::ReadAls() {
7070
}
7171

7272
void Hrs3300::SetGain(uint8_t gain) {
73-
static constexpr uint8_t maxGain = 64;
73+
constexpr uint8_t maxGain = 64U;
7474
gain = std::min(gain, maxGain);
7575
uint8_t hgain = 0;
76-
while((1 << hgain) < gain)
77-
hgain++;
76+
while((1 << hgain) < gain){
77+
++hgain;
78+
}
7879

79-
WriteRegister(static_cast<uint8_t>(Registers::Hgain), hgain << 2);
80+
WriteRegister(static_cast<uint8_t>(Registers::Hgain), hgain << 2);
8081
}
8182

8283
void Hrs3300::SetDrive(uint8_t drive) {

0 commit comments

Comments
 (0)