We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6420885 commit 6c03c97Copy full SHA for 6c03c97
1 file changed
src/drivers/Hrs3300.cpp
@@ -70,13 +70,14 @@ uint16_t Hrs3300::ReadAls() {
70
}
71
72
void Hrs3300::SetGain(uint8_t gain) {
73
- static constexpr uint8_t maxGain = 64;
+ constexpr uint8_t maxGain = 64U;
74
gain = std::min(gain, maxGain);
75
uint8_t hgain = 0;
76
- while((1 << hgain) < gain)
77
- hgain++;
+ while((1 << hgain) < gain){
+ ++hgain;
78
+ }
79
- WriteRegister(static_cast<uint8_t>(Registers::Hgain), hgain << 2);
80
+ WriteRegister(static_cast<uint8_t>(Registers::Hgain), hgain << 2);
81
82
83
void Hrs3300::SetDrive(uint8_t drive) {
0 commit comments