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 {
9090};
9191
9292/* 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 .
9595 * Errors are generally represented with an int type that may vary in size depending on the platform.
9696 * For this reason in this representation error_t type is defined with an integer type with a defined size.
9797 */
9898class ErrorCode {
9999public:
100- constexpr ErrorCode (int value): error(value == 1 ? ArduinoSuccess : ArduinoError) {}
100+ constexpr ErrorCode (int value): error(value != 0 ? ArduinoSuccess : ArduinoError) {}
101101 constexpr ErrorCode (error_t value): error(value) {}
102102 const error_t error;
103103
You can’t perform that action at this time.
0 commit comments