diff -r 4fc17ef4593f -r cc2b04d4db99 thermferm/thermferm.c --- a/thermferm/thermferm.c Tue Aug 05 22:50:33 2014 +0200 +++ b/thermferm/thermferm.c Thu Aug 07 14:20:11 2014 +0200 @@ -335,11 +335,11 @@ if (my_shutdown) run = 0; - /* - * Timed schedulers - */ now = time(NULL); if (now != last) { + /* + * Each second + */ last = now; seconds++; @@ -413,6 +413,22 @@ } /* + * Handle profile + */ + if ((unit->mode == UNITMODE_PROFILE) && (unit->profile)) { + /* + * unit->profile - uuid of the selected profile. + * unit->prof_started - start time or 0 if not yet running. + * unit->prof_state - PROFILE_OFF|PROFILE_PAUSE|PROFILE_RUN|PROFILE_DONE + * unit->prof_target - Calculated target temperature. + */ + // off. Target is ?? + // pause Target is keep target. + // run. Target must be calculated using steps. + // done. Target is last target. + } + + /* * Manual switching */ if (unit->mode == UNITMODE_NONE) {