add filter
This commit is contained in:
parent
3334d7896c
commit
bb92563de2
@ -7,7 +7,7 @@ from pylab import mpl
|
|||||||
mpl.rcParams["font.sans-serif"] = ["SimHei"]
|
mpl.rcParams["font.sans-serif"] = ["SimHei"]
|
||||||
|
|
||||||
# 初始化一个起始日期(这里假设是今天凌晨0点)
|
# 初始化一个起始日期(这里假设是今天凌晨0点)
|
||||||
start_date = datetime.now().replace(hour=0, minute=0, second=0, microsecond=0)
|
start_date = datetime.now().replace(hour=20, minute=21, second=0, microsecond=0)
|
||||||
|
|
||||||
with open('minicom.cap', 'r') as file:
|
with open('minicom.cap', 'r') as file:
|
||||||
lines = file.readlines()
|
lines = file.readlines()
|
||||||
@ -21,6 +21,7 @@ for line in lines:
|
|||||||
timedelta(minutes=int(time_str.split(':')[1])) + \
|
timedelta(minutes=int(time_str.split(':')[1])) + \
|
||||||
timedelta(hours=int(time_str.split(':')[0]))
|
timedelta(hours=int(time_str.split(':')[0]))
|
||||||
temperature = float(temp_str)
|
temperature = float(temp_str)
|
||||||
|
if temperature >= 10 and temperature <= 40:
|
||||||
times.append(time)
|
times.append(time)
|
||||||
temperatures.append(temperature)
|
temperatures.append(temperature)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user