Skip to content

Can't tNMEA2000::Open on fast devices (Raspberry pi 5) #470

@Merange

Description

@Merange

Hello,

I try to create a sensor based on a Raspberry Pi 5 in C++.
When I use the compiled program, tNMEA2000::Open always returns false.
If I stay in debug mode in my EDI no trouble.

After investigations, i can see that OpenScheduler.IsTime() return false if the current time is the same as NextTime
return N2kMillis64()>NextTime;

If I change this line with >= all is fine

bool IsTime() const {
  #if defined(N2kUse64bitSchedulerTime)
  return N2kMillis64()>=NextTime;
  #else
  return !IsDisabled() && ( N2kMillis()-NextTime<INT32_MAX );
  #endif
}

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