-#endif
-
- notify_cmd(sensor);
-}
-
-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, 0x0000, 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 **cur;
- int i;
- struct color c;
-
- for (cur = sensors, i = 0; *cur; cur++, i++) {
- color_set(&c,
- colors[i % COLORS_COUNT][0],
- colors[i % COLORS_COUNT][1],
- colors[i % COLORS_COUNT][2]);
-
- (*cur)->color = config_get_sensor_color((*cur)->id, &c);