Skip to content

Bad color definitions #1

Open
Open
@JakubVanek

Description

@JakubVanek

Hi,

I was looking into the LCD implementation and found that colors are defined improperly.
Upstream lejos.robotics.Color:

    public static final int RED = 0;
    public static final int GREEN = 1;
    public static final int BLUE = 2;
    public static final int YELLOW = 3;
    public static final int MAGENTA = 4;
    public static final int ORANGE = 5;
    public static final int WHITE = 6;
    public static final int BLACK = 7;
    public static final int PINK = 8;
    public static final int GRAY = 9;
    public static final int LIGHT_GRAY = 10;
    public static final int DARK_GRAY = 11;
    public static final int CYAN = 12;
    public static final int BROWN = 13;
    public static final int NONE = -1;

Local lejos.robotics.Color:

    public static final int NONE = 0;
    public static final int BLACK = 1;
    public static final int BLUE = 2;
    public static final int GREEN = 3;
    public static final int YELLOW = 4;
    public static final int RED = 5;
    public static final int WHITE = 6;
    public static final int MAGENTA = 4;
    public static final int ORANGE = 5;
    public static final int BROWN = 7;

Is there a reason for this change? I would like to add colors to ev3dev.actuators.LCD#setColor(int color), but this way there are duplicate switch branches.

Regards,

Jakub

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