From a29914be1c52ecd1cc59970aa31803dc1b401109 Mon Sep 17 00:00:00 2001 From: Amir Saeid Date: Sat, 28 Mar 2020 21:01:43 +0000 Subject: Add proper logging --- src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index b6270b3..70dd242 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,3 +1,6 @@ +#[macro_use] +extern crate log; + extern crate spa; use chrono::prelude::*; @@ -67,6 +70,7 @@ pub fn get_temp(utc: DateTime, ss: &SunriseAndSet, lat: f64, lon: f64) -> f match *ss { SunriseAndSet::Daylight(_, _) => { let elevation = 90f64 - calc_solar_position(utc, lat, lon).unwrap().zenith_angle; + debug!("elevation: {}", elevation); let progress = get_transition_progress_from_elevation(elevation); LOW_TEMP + (progress * (HIGH_TEMP - LOW_TEMP)) } -- cgit v1.2.3