Skip to content

RC-100::available() requires a warm up call. #333

@ruddyscent

Description

@ruddyscent

I am modifying the sketch for Turtlebot3-waffle to use four wheels. While working on it, I noticed that the RC-100 only recognizes the joystick intermittently. I found a workaround but couldn't find the cause, so I created this issue.

In my case, running rc100_.available() before the availability check solves the RC-100's responsiveness problem, like the following code snippet:

void Turtlebot3Controller::getRCdata(float *get_cmd_vel)
{
  ...
  rc100_.available(); // Warm up
  if (rc100_.available())
  {
    received_data = rc100_.readData();

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