Skip to content

Timeout overflow #35

@macedolfm

Description

@macedolfm

Timeout variables shall be unsigned long, so if sensor init() is called latter after MCU start up they do not overflow. This happened to me !!

uint16_t io_timeout; => unsigned long io_timeout;
uint16_t timeout_start_ms; => unsigned long timeout_start_ms;

Also timeout functions signatures shall also be unsigned long:

inline void setTimeout(unsigned long timeout)
inline unsigned long getTimeout(void)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions