File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -90,14 +90,14 @@ enum : error_t {
90
90
};
91
91
92
92
/* Error Codes:
93
- * In Arduino if a function returns 1 is considered to have run successfully ,
94
- * any value different from 1 is considered an error .
93
+ * In Arduino if a function returns 0 is considered to have failed ,
94
+ * while any value different from 0 is considered success .
95
95
* Errors are generally represented with an int type that may vary in size depending on the platform.
96
96
* For this reason in this representation error_t type is defined with an integer type with a defined size.
97
97
*/
98
98
class ErrorCode {
99
99
public:
100
- constexpr ErrorCode (int value): error(value == 1 ? ArduinoSuccess : ArduinoError) {}
100
+ constexpr ErrorCode (int value): error(value != 0 ? ArduinoSuccess : ArduinoError) {}
101
101
constexpr ErrorCode (error_t value): error(value) {}
102
102
const error_t error;
103
103
You can’t perform that action at this time.
0 commit comments