Skip to content

Commit ffbfa50

Browse files
authored
Fixed erroneous example.
- `TRUE` is not defined. - Redundant comparisons in conditions are [not recommended](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#es87-dont-add-redundant--or--to-conditions).
1 parent 58a2b95 commit ffbfa50

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

content/learn/08.contributions/00.arduino-writing-style-guide/arduino-writing-style-guide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ if (somethingIsTrue) doSomething;
5959
Instead, use this:
6060

6161
```
62-
if (somethingIsTrue == TRUE) {
62+
if (somethingIsTrue) {
6363
doSomething;
6464
}
6565
```
@@ -136,4 +136,4 @@ Here's a good title block:
136136

137137
For digital input switches, the default is to use a pulldown resistor on the switch rather than a pullup. That way, the logic of a switch's interaction makes sense to the non-engineer.
138138

139-
Keep your circuits simple. For example, bypass capacitors are handy, but most simple inputs will work without them. If a component is incidental, explain it later.
139+
Keep your circuits simple. For example, bypass capacitors are handy, but most simple inputs will work without them. If a component is incidental, explain it later.

0 commit comments

Comments
 (0)