-
Notifications
You must be signed in to change notification settings - Fork 487
Commit
The existing values are within the operating range of the MAX31850.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,13 +29,13 @@ | |
#define DS18S20MODEL 0x10 // also DS1820 | ||
#define DS18B20MODEL 0x28 // also MAX31820 | ||
#define DS1822MODEL 0x22 | ||
#define DS1825MODEL 0x3B | ||
#define DS1825MODEL 0x3B // also MAX31850 | ||
#define DS28EA00MODEL 0x42 | ||
|
||
// Error Codes | ||
#define DEVICE_DISCONNECTED_C -127 | ||
#define DEVICE_DISCONNECTED_F -196.6 | ||
#define DEVICE_DISCONNECTED_RAW -7040 | ||
#define DEVICE_DISCONNECTED_C -255 | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
RobTillaart
Contributor
|
||
#define DEVICE_DISCONNECTED_F -427 | ||
#define DEVICE_DISCONNECTED_RAW -32640 | ||
|
||
// For readPowerSupply on oneWire bus | ||
// definition of nullptr for C++ < 11, using official workaround: | ||
|
2 comments
on commit ac1eb7f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I presume the quick fix here is to switch it back to -127? If so I change that quickly enough
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@milesburton that is indeed the quick fix.
more elaborate answer in the issue.
This change has created warnings in what was a totally clean build library. And it may also cause real problems in the disconnected case.
int8_t DallasTemperature::getHighAlarmTemp(const uint8_t* deviceAddress)
This function returns an 8-bit signed value who's range is -127 to 128 but the DEVICE_DISCONNECTED_C is now -255 (used to be -127). And so the compiler will convert the -255 to "1" which isn't the intended value and will fool some logic. Can this be fixed/updated?