mirror of
https://github.com/FAUSheppy/ths-datenlogger
synced 2025-12-06 20:21:35 +01:00
remove timestamp wrapper func
This commit is contained in:
@@ -39,11 +39,11 @@ def legend_box_contents(name, y):
|
||||
|
||||
def general_background_setup(tup,ymin,ymax,x):
|
||||
|
||||
unix_x = list(map(plot_timeutils.unix,x))
|
||||
unix_x = [ el.timestamp() for el in x ]
|
||||
|
||||
### SET AXIS LIMITS ###
|
||||
tup[AXIS].set_ylim( [ ymin, ymax ] )
|
||||
tup[AXIS].set_xlim([plot_timeutils.unix(min(x)),plot_timeutils.unix(max(x))])
|
||||
tup[AXIS].set_xlim( [ min(x).timestamp(), max(x).timestamp() ] )
|
||||
|
||||
if CFG("draw_thresholds"):
|
||||
hcrit=CFG("humidity_critical")
|
||||
@@ -223,7 +223,7 @@ def gen_xticks_from_timeseries(x):
|
||||
xticks = []
|
||||
xmax += step*CFG("add_x_labels_at_end")
|
||||
while cur < xmax:
|
||||
xticks += [plot_timeutils.unix(cur)]
|
||||
xticks += [cur.timestamp()]
|
||||
cur+=step
|
||||
return xticks
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ def __plot(tup, datapoints, path, date1=None, date2=None, forcePath=False):
|
||||
continue
|
||||
else:
|
||||
NO_SERIES = False
|
||||
unix_x = list(map(plot_timeutils.unix,x))
|
||||
unix_x = [ el.timestamp() for el in x]
|
||||
ymin,ymax = plot_graphutils.getlimits_y(y)
|
||||
|
||||
#### GET LINE STYLES ####
|
||||
|
||||
@@ -18,9 +18,6 @@ def time_from_dbf(l, timeformat):
|
||||
def time_from_csv(l, timeformat):
|
||||
return datetime.strptime(l, timeformat)
|
||||
|
||||
def unix(dt):
|
||||
return dt.timestamp()
|
||||
|
||||
def round_time_to_step(start,step):
|
||||
start += step / 2
|
||||
discard = timedelta(days=0)
|
||||
|
||||
Reference in New Issue
Block a user