Skip to content

Commit

Permalink
pybricks.parameters.Color.NONE: Set v=-40.
Browse files Browse the repository at this point in the history
With the newly introduced color cost function, any measured value less than 50 results in Color.NONE, which makes it the predominant result. This reduces the distance range for the default colors.

Instead of adjusting all colors (which are also used to emit colors), we can make the value of Color.NONE negative to achieve a similar result.
  • Loading branch information
laurensvalk committed Oct 23, 2023
1 parent 3346936 commit d183834
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pybricks/parameters/pb_type_color.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const pb_type_Color_obj_t pb_Color_MAGENTA_obj = {

const pb_type_Color_obj_t pb_Color_NONE_obj = {
{&pb_type_Color},
.hsv = {0, 0, 0}
.hsv = {0, 0, -40}
};

const pb_type_Color_obj_t pb_Color_BLACK_obj = {
Expand Down

0 comments on commit d183834

Please sign in to comment.