|
@ -132,10 +132,10 @@ double MainWindow::get_target_temperature(int room_idx) |
|
|
|
|
|
|
|
|
/*
|
|
|
/*
|
|
|
* dayOfWeek() returns 1 for monday, 7 for sunday. |
|
|
* dayOfWeek() returns 1 for monday, 7 for sunday. |
|
|
* so dow <<= 1 gives 0 for monday, 6 for sunday. |
|
|
|
|
|
|
|
|
* so dow -= 1 gives 0 for monday, 6 for sunday. |
|
|
* And (1 << dow) gives the day of week as a bit field |
|
|
* And (1 << dow) gives the day of week as a bit field |
|
|
*/ |
|
|
*/ |
|
|
dow <<= 1; |
|
|
|
|
|
|
|
|
dow -= 1; |
|
|
for (int i = 0; i < r->progs.count(); i++) { |
|
|
for (int i = 0; i < r->progs.count(); i++) { |
|
|
p = &(r->progs.at(i)); |
|
|
p = &(r->progs.at(i)); |
|
|
if ((1 << dow) & p->DoW) { |
|
|
if ((1 << dow) & p->DoW) { |
|
|