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.
2 parents 97a1c4b + 0ad10a3 commit 3a1ccdbCopy full SHA for 3a1ccdb
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++;
78
- WriteRegister(static_cast<uint8_t>(Registers::Hgain), hgain << 2);
+ while((1 << hgain) < gain){
+ ++hgain;
79
+
80
+ WriteRegister(static_cast<uint8_t>(Registers::Hgain), hgain << 2);
81
82
83
void Hrs3300::SetDrive(uint8_t drive) {
0 commit comments