Skip to content

Commit 922550c

Browse files
committed
code style
1 parent d7bdb97 commit 922550c

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

src/TJA1020.cpp

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ void Lin_TJA1020::setMode(const TJA1020_Mode mode)
118118
break;
119119

120120
default: // = Sleep
121-
// no direct step from Standby to Sleep, but we don't know if we're in
121+
// no direct step from Standby to Sleep, but we don't know if we're in
122122
// we're going over _writingSlope
123123
setMode(_writingSlope);
124124

@@ -135,10 +135,10 @@ void Lin_TJA1020::setMode(const TJA1020_Mode mode)
135135

136136
// ensure pin level while sleeping
137137
#ifdef ESP32
138-
pinMode(_tx_pin, INPUT_PULLDOWN); // ensure Low level while in sleep mode (since TJA1020 has internally a fixed pulldown)
138+
pinMode(_tx_pin, INPUT_PULLDOWN); // ensure Low level while in sleep mode (since TJA1020 has internally a fixed pulldown)
139139
pinMode(_nslp_pin, INPUT_PULLDOWN); // ensure Low level while in sleep mode
140140
#else
141-
pinMode(_tx_pin, INPUT); // ensure Low level while in sleep mode (since TJA1020 has internally a fixed pulldown)
141+
pinMode(_tx_pin, INPUT); // ensure Low level while in sleep mode (since TJA1020 has internally a fixed pulldown)
142142
pinMode(_nslp_pin, INPUT); // ensure Low level while in sleep mode
143143
#endif
144144

@@ -149,10 +149,11 @@ void Lin_TJA1020::setMode(const TJA1020_Mode mode)
149149
} // void Lin_TJA1020::setMode(TJA1020_Mode newMode)
150150

151151
/// Defines standard slope, to be used, when writing to the bus
152-
void Lin_TJA1020::setSlope(const TJA1020_Mode slope) {
153-
_writingSlope = slope;
154-
if (_writingSlope == Sleep)
155-
{
156-
_writingSlope = NormalSlope;
157-
}
152+
void Lin_TJA1020::setSlope(const TJA1020_Mode slope)
153+
{
154+
_writingSlope = slope;
155+
if (_writingSlope == Sleep)
156+
{
157+
_writingSlope = NormalSlope;
158+
}
158159
}

src/TJA1020.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
class Lin_TJA1020 : public Lin_Interface
1616
{
1717
public:
18-
enum TJA1020_Mode {
18+
enum TJA1020_Mode
19+
{
1920
Sleep,
2021
NormalSlope,
2122
LowSlope

0 commit comments

Comments
 (0)