Start high-to-low animation before sunset
Low-to-high animation runs from sunrise to sunrise+duration. However, high-to-low animation ran from sunset to sunset+duration. Run high-to-low animation at sunset-duration to sunset.master
parent
07f2f1d3ce
commit
39b211da95
2
main.c
2
main.c
|
@ -259,6 +259,8 @@ static void recalc_stops(struct context *ctx, time_t now) {
|
|||
fprintf(stderr, "calculated new sun trajectory: sunrise %02d:%02d, sunset %02d:%02d\n",
|
||||
sunrise.tm_hour, sunrise.tm_min,
|
||||
sunset.tm_hour, sunset.tm_min);
|
||||
|
||||
ctx->stop_time -= ctx->duration;
|
||||
}
|
||||
|
||||
static void update_temperature(struct context *ctx, time_t now) {
|
||||
|
|
Loading…
Reference in New Issue