diff options
| author | JF002 <JF002@users.noreply.github.com> | 2021-02-14 13:25:38 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-14 13:25:38 (GMT) |
| commit | 97a1c4b3d7be04ddb24fea096add41b44629a5f9 (patch) | |
| tree | 5dfaff12620b0664dc75bc734cbff70d17e03e01 /src/drivers/Hrs3300.cpp | |
| parent | 07a0d7cf2de8244e481df697ebd9c85eb413163f (diff) | |
| parent | 169b861af1fd8b1f7834ad78a8880882b236dc96 (diff) | |
Merge pull request #182 from petterhs/warnings
Fix build warnings coming from HR implementation
Diffstat (limited to 'src/drivers/Hrs3300.cpp')
| -rw-r--r-- | src/drivers/Hrs3300.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/drivers/Hrs3300.cpp b/src/drivers/Hrs3300.cpp index 2aded7d..a16c8e4 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) { |
