-#endif
-}
-
-static void associate_colors(struct psensor **sensors)
-{
- /* number of uniq colors */
-#define COLORS_COUNT 8
-
- unsigned int colors[COLORS_COUNT][3] = {
- {0x0000, 0x0000, 0x0000}, /* black */
- {0xffff, 0x0000, 0x0000}, /* red */
- {0x0000, 0.0000, 0xffff}, /* blue */
- {0x0000, 0xffff, 0x0000}, /* green */
-
- {0x7fff, 0x7fff, 0x7fff}, /* grey */
- {0x7fff, 0x0000, 0x0000}, /* dark red */
- {0x0000, 0x0000, 0x7fff}, /* dark blue */
- {0x0000, 0x7fff, 0x0000} /* dark green */
- };
-
- struct psensor **sensor_cur = sensors;
- int i = 0;
- while (*sensor_cur) {
- struct color default_color;
- color_set(&default_color,
- colors[i % COLORS_COUNT][0],
- colors[i % COLORS_COUNT][1],
- colors[i % COLORS_COUNT][2]);
-
- (*sensor_cur)->color
- = config_get_sensor_color((*sensor_cur)->id,
- &default_color);
-
- sensor_cur++;
- i++;