File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ def report(self):
8787 self .eprint ("\n \n ===================" )
8888 self .eprint ("Temp Monitor Report:\n " )
8989 self .plot (self .ds )
90- self .eprint ("\n {}" .format (self .tf .name ))
90+ self .eprint ("\n {}" .format (self .tf .name ))
9191 self .eprint ("===================" )
9292
9393 def plot (self , ds ):
@@ -110,5 +110,12 @@ def plot(self, ds):
110110 'minimum' : minimum ,
111111 'maximum' : maximum ,
112112 }))
113+ self .eprint ('' )
114+ min_val = round (min (self .ds ), 1 )
115+ avg_val = round (sum (self .ds ) / len (self .ds ), 1 )
116+ max_val = round (max (self .ds ), 1 )
117+ self .eprint (" >> min: {} °C <<" .format (min_val ))
118+ self .eprint (" >> avg: {} °C <<" .format (avg_val ))
119+ self .eprint (" >> max: {} °C <<" .format (max_val ))
113120 else :
114- self .eprint (" >> {} °C <<" .format (ds [0 ]))
121+ self .eprint (" >> {} °C <<" .format (round ( ds [0 ], 1 ) ))
You can’t perform that action at this time.
0 commit comments