Skip to content

Commit fbb4dd4

Browse files
authored
feat(matter): ci codespell fix currenty -> current_y
1 parent bb3a9a5 commit fbb4dd4

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

libraries/Matter/src/MatterUtil/ColorFormat.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -99,17 +99,17 @@ HsvColor_t RgbToHsv(RgbColor_t rgb) {
9999
return hsv;
100100
}
101101

102-
RgbColor_t XYToRgb(uint8_t Level, uint16_t currentX, uint16_t currentY) {
102+
RgbColor_t XYToRgb(uint8_t Level, uint16_t current_X, uint16_t current_Y) {
103103
// convert xyY color space to RGB
104104

105105
// https://www.easyrgb.com/en/math.php
106106
// https://en.wikipedia.org/wiki/SRGB
107107
// refer https://en.wikipedia.org/wiki/CIE_1931_color_space#CIE_xy_chromaticity_diagram_and_the_CIE_xyY_color_space
108108

109-
// The currentX/currentY attribute contains the current value of the normalized chromaticity value of x/y.
110-
// The value of x/y shall be related to the currentX/currentY attribute by the relationship
111-
// x = currentX/65536
112-
// y = currentY/65536
109+
// The current_X/current_Y attribute contains the current value of the normalized chromaticity value of x/y.
110+
// The value of x/y shall be related to the current_X/current_Y attribute by the relationship
111+
// x = current_X/65536
112+
// y = current_Y/65536
113113
// z = 1-x-y
114114

115115
RgbColor_t rgb;
@@ -118,8 +118,8 @@ RgbColor_t XYToRgb(uint8_t Level, uint16_t currentX, uint16_t currentY) {
118118
float X, Y, Z;
119119
float r, g, b;
120120

121-
x = ((float)currentX) / 65535.0f;
122-
y = ((float)currentY) / 65535.0f;
121+
x = ((float)current_X) / 65535.0f;
122+
y = ((float)current_Y) / 65535.0f;
123123

124124
z = 1.0f - x - y;
125125

0 commit comments

Comments
 (0)