Skip to content

Commit 228c582

Browse files
committed
lint
1 parent 5311ad3 commit 228c582

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

src/sp140/altimeter.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,13 @@ void setGroundAltitude(const STR_DEVICE_DATA_140_V1& deviceData) {
2626
bool setupAltimeter(bool altWire) {
2727
TwoWire* wire = &Wire;
2828

29-
if (altWire) {wire = &Wire1; }
29+
if (altWire) {
30+
wire = &Wire1;
31+
}
3032

31-
if (!bmp.begin_I2C(BMP3XX_DEFAULT_ADDRESS, wire)) return false;
33+
if (!bmp.begin_I2C(BMP3XX_DEFAULT_ADDRESS, wire)) {
34+
return false;
35+
}
3236
bmp.setOutputDataRate(BMP3_ODR_25_HZ);
3337
bmp.setTemperatureOversampling(BMP3_OVERSAMPLING_2X);
3438
bmp.setPressureOversampling(BMP3_OVERSAMPLING_4X);

src/sp140/display.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,9 @@ void updateDisplay(
283283
float escTemp;
284284
escTemp = escTelemetry.temperatureC;
285285

286-
if (escTemp >= 100) { canvas.setTextColor(currentTheme->error_text); } // If temperature is 100C+, display in red.
286+
if (escTemp >= 100) {
287+
canvas.setTextColor(currentTheme->error_text); // If temperature is 100C+, display in red.
288+
}
287289
if (escTemp == __FLT_MIN__ || escTemp == 0.0) { // If temperature is not available, display a question mark.
288290
canvas.printf("?%c", 247);
289291
} else { // Otherwise, display the temperature. (in degrees C)

src/sp140/vibration.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ Adafruit_DRV2605 vibeMotor;
77
bool vibeMotorInitialized = false;
88

99
bool initVibeMotor() {
10-
if (!vibeMotor.begin(&Wire1)) { return false; }
10+
if (!vibeMotor.begin(&Wire1)) {
11+
return false;
12+
}
1113
vibeMotor.selectLibrary(3);
1214
vibeMotor.setMode(DRV2605_MODE_INTTRIG);
1315
vibeMotorInitialized = true;
@@ -22,7 +24,9 @@ void pulseVibeMotor() {
2224
}
2325

2426
bool runVibePattern(const unsigned int pattern[], int patternSize) {
25-
if (!vibeMotorInitialized) { return false; }
27+
if (!vibeMotorInitialized) {
28+
return false;
29+
}
2630

2731
for (int i = 0; i < patternSize; i++) {
2832
vibeMotor.setWaveform(i, pattern[i]);

0 commit comments

Comments
 (0)