Fixed implicit conversion from float to double in lighting output and color.

This commit is contained in:
Steve Karg
2024-08-06 17:22:27 -05:00
parent 19f276b7f2
commit 350bbe3331
5 changed files with 50 additions and 37 deletions
+6 -6
View File
@@ -42,7 +42,7 @@ static void test_color_rgb_xy_gamma_unit(
float y_coordinate,
uint8_t brightness)
{
float test_x_coordinate = 0.0, test_y_coordinate = 0.0;
float test_x_coordinate = 0.0f, test_y_coordinate = 0.0f;
uint8_t test_brightness = 0;
uint8_t test_red = 0, test_green = 0, test_blue = 0;
@@ -55,10 +55,10 @@ static void test_color_rgb_xy_gamma_unit(
brightness);
zassert_true(
is_float_equal(x_coordinate, test_x_coordinate), "(x=%.3f,test_x=%.3f)",
x_coordinate, test_x_coordinate);
(double)x_coordinate, (double)test_x_coordinate);
zassert_true(
is_float_equal(y_coordinate, test_y_coordinate), "(y=%.3f,test_y=%.3f)",
y_coordinate, test_y_coordinate);
(double)y_coordinate, (double)test_y_coordinate);
zassert_equal(
brightness, test_brightness, "b=%u, test_b=%u", brightness,
test_brightness);
@@ -75,7 +75,7 @@ static void test_color_rgb_xy_unit(
float y_coordinate,
uint8_t brightness)
{
float test_x_coordinate = 0.0, test_y_coordinate = 0.0;
float test_x_coordinate = 0.0f, test_y_coordinate = 0.0f;
uint8_t test_brightness = 0;
uint8_t test_red = 0, test_green = 0, test_blue = 0;
@@ -87,10 +87,10 @@ static void test_color_rgb_xy_unit(
brightness);
zassert_true(
is_float_equal(x_coordinate, test_x_coordinate), "(x=%.3f,test_x=%.3f)",
x_coordinate, test_x_coordinate);
(double)x_coordinate, (double)test_x_coordinate);
zassert_true(
is_float_equal(y_coordinate, test_y_coordinate), "(y=%.3f,test_y=%.3f)",
y_coordinate, test_y_coordinate);
(double)y_coordinate, (double)test_y_coordinate);
zassert_equal(
brightness, test_brightness, "b=%u, test_b=%u", brightness,
test_brightness);