Skip to content

ofArduino macros  #1114

@colormotor

Description

@colormotor

I had some problems because of macro definitions in ofArduino.h overriding an enum in a a class of my codebase ( SHIFT )
It's not exactly a bug! but I would suggest using enums or const int instead of the macros to avoid any conflicts
I solved the problem by modifying

define SHIFT 0x05

into
const int SHIFT = 0x05;

another solution could be using enumerations as
enum
{
...
SHIFT = 0x05,
etc...
};

I believe this would not break any of the existing code

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions