Skip to content

Commit 369ce09

Browse files
committed
Whitespace
1 parent bae2152 commit 369ce09

9 files changed

+25
-25
lines changed

include/FanControl.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
var, 1, fans, "Fanid out of range")
2222

2323
/**
24-
* Abstract base class for all Fan Control.
25-
* Sub types include Arduino and MAX31790 classes.
24+
* Abstract base class for all Fan Control.
25+
* Sub types include Arduino and MAX31790 classes.
2626
*/
2727
class FanControl
2828
{

include/MAX31790FanControl.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#define PWMOUT_TARGET_DUTY_CYCLE(ch) (0x40+(ch-1)*2)
1515
#define TACH_TARGET(ch) (0x50+(ch-1)*2)
1616

17-
#define MAX_DUTY_CYCLE_SCALE 511 // range is 0-511
17+
#define MAX_DUTY_CYCLE_SCALE 511 // range is 0-511
1818

1919
/**
2020
* Global Configuration
@@ -91,7 +91,7 @@ class MAX31790 : public FanControl
9191

9292
private:
9393
RESULT readByte(const uint8_t address, uint8_t& result);
94-
RESULT readBytes(const uint8_t address, const uint8_t n, uint8_t* result);
94+
RESULT readBytes(const uint8_t address, const uint8_t n, uint8_t* result);
9595
RESULT writeByte(const uint8_t address, const uint8_t byte);
9696
RESULT writeBytes(const uint8_t address, const uint8_t* bytes, const uint8_t nBytes);
9797

include/MqttManager.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class MqttManager : public Print {
3434
const String _clientID; // client identifier
3535
const String _serverIP; // mqtt server IP endpoint
3636
const uint16_t _port; // mqtt server port
37-
String _buf; // log buffer
37+
String _buf; // log buffer
3838

3939
const String topicTempRackTop = "device/temp/rack/top";
4040
const String topicTempRackBase = "device/temp/rack/base";

include/OLEDDisplay.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ class OLEDDisplay {
4242
void setOrientation(OLED_Orientation orient); // rotate
4343

4444
protected:
45-
void internalRender(RackState_t&rs, const NetworkState_t& ns);
45+
void internalRender(RackState_t&rs, const NetworkState_t& ns);
4646
void drawFloat2_1DP(int x, int y, float f);
4747
void drawPercentage(int x, int y, uint8_t pc);
48-
void drawTempErrStates(const Thermos_t& thermos, int x, int y);
48+
void drawTempErrStates(const Thermos_t& thermos, int x, int y);
4949
void drawFanErrStates(const Fans_t& fans, int x, int y);
50-
void drawNetworkState(const NetworkState_t& ns, int x, int y);
50+
void drawNetworkState(const NetworkState_t& ns, int x, int y);
5151
uint8_t getPercentageRPM(const FanState_t& fan) const;
5252

5353
private:

src/ArduinoFanControl.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ RESULT ArduinoFanControl::setPWMForAll(const uint16_t dutyCycle)
111111

112112
RESULT res = RES_OK;
113113
for(int i=1; i<=getFanCount(); i++) {
114-
res = res & setPWM(i, dutyCycle);
114+
res = res & setPWM(i, dutyCycle);
115115
}
116116
return res;
117117
}

src/OLEDDisplay.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ void OLEDDisplay::initialise() {
77
setOrientation(OLED_Orientation::ROTATE_90); // when mounted in 2U rack - see rackmount-pi-arduino
88

99
if (_usingIRSensor)
10-
pinMode(_IRPin, INPUT);
10+
pinMode(_IRPin, INPUT);
1111
}
1212

1313
void OLEDDisplay::setOrientation(OLED_Orientation orient) {
@@ -23,7 +23,7 @@ void OLEDDisplay::setOrientation(OLED_Orientation orient) {
2323

2424
default:
2525
_rotation = SevenSegmentRender::Rotation_t::ROT_0;
26-
Log.error(F("Orientation not supported"));
26+
Log.error(F("Orientation not supported"));
2727
break;
2828
}
2929
}
@@ -48,12 +48,12 @@ void OLEDDisplay::render(RackState_t&rs, const NetworkState_t& ns) {
4848

4949
if (!_usingIRSensor) {
5050
// just render if no IR sensor is configured
51-
internalRender(rs, ns);
51+
internalRender(rs, ns);
5252
return;
5353
}
5454

5555
// if IR sensor triggered ...
56-
byte state = digitalRead(_IRPin);
56+
byte state = digitalRead(_IRPin);
5757
if (state == 1 || _firstDisplay) {
5858
internalRender(rs, ns);
5959
}
@@ -64,7 +64,7 @@ void OLEDDisplay::render(RackState_t&rs, const NetworkState_t& ns) {
6464
}
6565
else {
6666
displayOff();
67-
_l = 0;
67+
_l = 0;
6868
}
6969
}
7070
}
@@ -178,7 +178,7 @@ void OLEDDisplay::drawTempErrStates(const Thermos_t& thermos, int x, int y) {
178178
}
179179
else {
180180
// clear
181-
_oled.drawFilledBox(x, y, x+w, y+10, BLACK);
181+
_oled.drawFilledBox(x, y, x+w, y+10, BLACK);
182182
}
183183
x += w + 3;
184184
}
@@ -195,7 +195,7 @@ void OLEDDisplay::drawFanErrStates(const Fans_t& fans, int x, int y) {
195195
}
196196
else {
197197
// clear
198-
_oled.drawFilledBox(x, y, x+w, y+10, BLACK);
198+
_oled.drawFilledBox(x, y, x+w, y+10, BLACK);
199199
}
200200
x += w + 3;
201201
}

src/RackTempController.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,11 @@ void RackTempController::readTempStates(Thermos_t& thermos) {
161161
// searchAndPrintAddresses();
162162

163163
// Iterate through all devices ensuring they are still connected
164-
for (auto it = thermos.begin(); it != thermos.end(); it++) {
164+
for (auto it = thermos.begin(); it != thermos.end(); it++) {
165165
Temperature_t& thermo = it->second;
166166
if (!_tempSensors.isConnected(thermo.addr)) {
167167
Log.warning(F("Unable to find thermometer %s"), it->first.c_str());
168-
thermo.result = ERR_FAILED_TO_FIND_DEVICE;
168+
thermo.result = ERR_FAILED_TO_FIND_DEVICE;
169169
}
170170
}
171171

@@ -174,7 +174,7 @@ void RackTempController::readTempStates(Thermos_t& thermos) {
174174
_tempSensors.requestTemperatures();
175175

176176
// Get temperature for each thermometer
177-
for (auto it = thermos.begin(); it != thermos.end(); it++) {
177+
for (auto it = thermos.begin(); it != thermos.end(); it++) {
178178
Temperature_t& thermo = it->second;
179179
// if device found, then read temp
180180
if (thermo.result != ERR_FAILED_TO_FIND_DEVICE) {
@@ -183,7 +183,7 @@ void RackTempController::readTempStates(Thermos_t& thermos) {
183183
Log.warning(F("Failed to read %s temperature"), it->first.c_str());
184184
}
185185
else {
186-
Log.notice(F("%s.tempCelsuis - %F"), it->first.c_str(), thermo.tempCelsuis);
186+
Log.notice(F("%s.tempCelsuis - %F"), it->first.c_str(), thermo.tempCelsuis);
187187
}
188188
}
189189
}
@@ -296,7 +296,7 @@ RackState_t RackTempController::build_debug() const {
296296

297297
rs.thermos.insert({
298298
"topRack", {
299-
{ 0x28, 0xFF, 0xBF, 0xDC, 0x51, 0x17, 0x04, 0x48 }, //keyes
299+
{ 0x28, 0xFF, 0xBF, 0xDC, 0x51, 0x17, 0x04, 0x48 }, //keyes
300300
0.0,
301301
RES_OK
302302
}

src/SevenSegmentRender.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ void SevenSegmentRender::drawLargeNumeric(const int x, const int y, const uint8_
149149
_oled.displayBMP(oled7seg_9_24bit_38x50, x, y);
150150
break;
151151
case BLANK:
152-
// display background '8' image
152+
// display background '8' image
153153
_oled.displayBMP(oled7seg_base_24bit_38x50, x, y);
154154
break;
155155

src/main.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -108,16 +108,16 @@ void setup(void)
108108

109109
if (mqttManager.initialise()==0) {
110110
oled.render("Mqtt initialised");
111-
Log.notice(F("Mqtt initialised"));
111+
Log.notice(F("Mqtt initialised"));
112112
}
113113
else {
114114
oled.render("Mqtt failed initialise");
115-
Log.notice(F("Mqtt failed to initialise"));
115+
Log.notice(F("Mqtt failed to initialise"));
116116
}
117117
}
118118
else {
119119
oled.render("Ethernet failed to initialised");
120-
Log.error(F("Ethernet failed to initalise %d"), res);
120+
Log.error(F("Ethernet failed to initalise %d"), res);
121121
}
122122
}
123123

0 commit comments

Comments
 (0)