Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Tip

Cette page présente les différents types de données déclarés dans CrcLib.

View the english version of this page.

Analog

Crc::Analog

An enum class representing the available analog channels on the remote controller connected via a CrcConnect module. These are different from the 4 Analog inputs (pins) of your board.

The members of the enum, listed below, are to be used in tandem with the GetAnalogChannel(), MoveTank()MoveArcade() or MoveHolomonic()function.

Members:

  • JOYSTICK1_X : The horizontal axis of the left stick.

  • JOYSTICK1_Y : The vertical axis of the left stick.

  • JOYSTICK2_X : The horizontal axis of the right stick.

  • JOYSTICK2_Y : The vertical axis of the right stick.

  • NONE : No value. This should not be used and exists mainly for implementation details.

Click here for more details on the joystick mapping, depending on the remote controller used.

Info

In C/C++, a call to a member of an enum class must be preceded by the name of the enum, followed by ::. For example, the following syntax must be used in a function call:

CrcLib::GetAnalogChannel(Analog::JOYSTICK1_X);

The line using namespace Crc; at the top of your .ino file allows to avoid adding Crc:: in front of Analog. If the line was not present, the following syntax would be used in a function call:

CrcLib::GetAnalogChannel(Crc::Analog::JOYSTICK1_X);

Button

Crc::Button

An enum class representing the available digital channels on the remote controller connected via a CrcConnect module. These are different from the 12 Digital inputs (pins) of your board.

The members of the enum, listed below, are to be used in tandem with the GetDigitalChannel() function.

Members:

  • ARROW_RIGHT

  • ARROW_UP

  • ARROW_LEFT

  • ARROW_DOWN

  • COLORS_RIGHT

  • COLORS_UP

  • COLORS_LEFT

  • COLORS_DOWN

  • SELECT

  • START

  • L1

  • R1

  • HATL

  • HATR

  • LOGO

  • NONE : No value. This should not be used and exists mainly for implementation details.

Click here for more details on the joystick mapping, depending on the remote controller used.

Info

In C/C++, a call to a member of an enum class must be preceded by the name of the enum, followed by ::. For example, the following syntax must be used in a function call:

CrcLib::GetDigitalChannel(Button::L1);

The line using namespace Crc; at the top of your .ino file allows to avoid adding Crc:: in front of Button. If the line was not present, the following syntax would be used in a function call:

CrcLib::GetDigitalChannel(Crc::Button::L1);

Articles liés

Filter by label (Content by label)
sorttitle
excerptTyperich content
cqllabel in ( "ar-crcconnect_fr" , "ar-crclib_fr" )