From 50471d53ea3ffdbcd8cc2ea887d133d37fdec753 Mon Sep 17 00:00:00 2001 From: Laurens Valk Date: Tue, 4 Jul 2023 16:17:49 +0200 Subject: [PATCH] pybricks.parameters.Color.NONE: Set v=-30. 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. --- pybricks/parameters/pb_type_color.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pybricks/parameters/pb_type_color.c b/pybricks/parameters/pb_type_color.c index da3ed8be6..a6de872ec 100644 --- a/pybricks/parameters/pb_type_color.c +++ b/pybricks/parameters/pb_type_color.c @@ -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, -30} }; const pb_type_Color_obj_t pb_Color_BLACK_obj = {