Skip to content

DEVICE_DISCONNECTED_C as -255 exceeds int8_t storage #219

@bobwolff68

Description

@bobwolff68

DEVICE_DISCONNECTED_C was defined as -127 which has no issues around storage size. However, a change to make this -255 causes warnings and a compiler 'conversion' of -255 ==> 1.

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions