Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions firmware/InternetButton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ void ADXL362::setRange(uint8_t Range){
break;
}

temp = temp & 0b00111111 | Range;
temp = (temp & 0b00111111) | Range;
SPIwriteOneRegister(XL362_FILTER_CTL, temp); // Write to XL362_FILTER_CTL
delay(10);

Expand All @@ -637,7 +637,7 @@ void ADXL362::setBandwidth(uint8_t BandWidth){
Serial.print(temp);
#endif

temp = temp & 0b11101111 | BandWidth;
temp = (temp & 0b11101111) | BandWidth;
SPIwriteOneRegister(XL362_FILTER_CTL, temp); // Write to XL362_FILTER_CTL
delay(10);

Expand All @@ -657,7 +657,7 @@ void ADXL362::setOutputDatarate(uint8_t ODR){
Serial.print(temp);
#endif

temp = temp & 0b11111000 | ODR;
temp = (temp & 0b11111000) | ODR;
SPIwriteOneRegister(XL362_FILTER_CTL, temp); // Write to XL362_FILTER_CTL
delay(10);

Expand All @@ -677,7 +677,7 @@ void ADXL362::setNoiseLevel(uint8_t NoiseLevel){
Serial.print(temp);
#endif

temp = temp & 0b11001111 | NoiseLevel;
temp = (temp & 0b11001111) | NoiseLevel;
SPIwriteOneRegister(XL362_POWER_CTL, temp); // Write to XL362_FILTER_CTL
delay(10);

Expand Down