补充readme以及release change相关信息,修改clibs.running的逻辑

This commit is contained in:
2025-01-23 11:20:16 +08:00
parent 6b6fa1ec71
commit 49d5f6c3db
13 changed files with 599 additions and 48 deletions

View File

@ -60,23 +60,15 @@ def main():
for curve in curves:
data_plot(path, curve)
plt.rcParams['font.sans-serif'] = ['SimHei']
plt.rcParams['axes.unicode_minus'] = False
plt.rcParams['figure.dpi'] = 100
plt.rcParams['font.size'] = 14
plt.rcParams['lines.marker'] = 'o'
plt.rcParams["figure.autolayout"] = True
plt.show()
# threads = [threading.Thread(target=data_plot, args=(path, curve)) for curve in curves]
# for t in threads:
# t.daemon = True
# t.start()
# for curve in curves:
# t = threading.Thread(target=data_plot, args=(path, curve))
# t.daemon = True
# t.start()
plt.rcParams['font.sans-serif'] = ['SimHei']
plt.rcParams['axes.unicode_minus'] = False
plt.rcParams['figure.dpi'] = 100
plt.rcParams['font.size'] = 14
plt.rcParams['lines.marker'] = 'o'
plt.rcParams["figure.autolayout"] = True
if __name__ == '__main__':
main()

View File

@ -140,10 +140,6 @@ def run_rl(path, params, curves, hr, md, w2t):
# 7. 开始采集
count = 0
while clibs.running:
if not clibs.running:
w2t("后台数据清零完成,现在可以重新运行之前停止的程序。\n", "red")
exit()
this_time = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(time.time()))
next_time = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(time.time()+scenario_time+interval+1))
w2t(f"[{this_time}] 当前次数:{count:09d} | 预计下次数据更新时间:{next_time}\n", "#008B8B")
@ -157,6 +153,9 @@ def run_rl(path, params, curves, hr, md, w2t):
change_curve_state(hr, curves, False, False)
# 保留数据并处理输出
gen_results(params, curves, start_time, end_time, w2t)
else:
w2t("后台数据清零完成,现在可以重新运行之前停止的程序。\n", "red")
exit()
def gen_results(params, curves, start_time, end_time, w2t):
@ -255,6 +254,7 @@ def main():
hr = clibs.c_hr
md = clibs.c_md
w2t = clibs.w2t
clibs.running = 23
data_dirs, data_files = clibs.traversal_files(path, w2t)
params = initialization(path, hr, data_dirs, data_files, interval, curves, w2t)