Skip to content

Not polling PD [PlatformIO Arduino] #257

Description

@aaronjamt

Describe the bug
Using this library to build a Control Panel on the Arduino Uno R4 Renesas platform (using PlatformIO), the PD is never polled. I believe this applies to more platforms, likely including all embedded devices, but I'm not entirely sure of that.

Expected behavior
The microcontroller would poll the reader every ~50ms

Observed behavior
The microcontroller never polls the reader and thus never receives the message that a card was scanned, a keypad button was pressed, or any other event.

Additional context
The cause of this issue is as follows:

int gettimeofday(struct timeval * tp, struct timezone * tzp)
{
	ARG_UNUSED(tzp);
	tp->tv_sec = 0;
	tp->tv_usec = 0;
	return 0;
}
  • As a result, osdp_millis_since() is never aware that any time has passed, and thus the initial conditional never triggers a CMD_POLL.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions