7 Commits

Author SHA1 Message Date
44573624aa 问题修复 2025-09-14 23:29:01 +08:00
1b33bb8618 兼容旧版 Textual 2025-09-14 23:27:59 +08:00
d83025d818 兼容旧版 Textual 2025-09-14 23:26:49 +08:00
f7e93cf05f 兼容旧版 Textual 2025-09-14 23:25:06 +08:00
e30cefeb44 兼容旧版 Textual 2025-09-14 23:23:13 +08:00
7dc963d491 兼容旧版 Textual 2025-09-14 23:22:03 +08:00
3640d8a799 算法修复与实验性扩展支持 2025-09-14 23:19:24 +08:00
4 changed files with 10 additions and 5 deletions

View File

@@ -13,7 +13,6 @@ class AppLauncher(App):
def on_mount(self) -> None:
self.push_screen("dashboard")
if __name__ == "__main__":
script_dir = os.path.dirname(os.path.abspath(__file__))
os.chdir(script_dir)

View File

@@ -0,0 +1 @@
# HeurSync 同步器

View File

@@ -13,7 +13,7 @@ class Glimpse():
self.nuc_u = nucleon_union
self.elt_u = self.nuc_u.linked_electron_union()
self.lastest_date = -1
self.next_date = -1
self.next_date = 0x3f3f3f3f
self.avg_efactor = 0
self.total_num = 0
self.activated_num = 0
@@ -22,14 +22,20 @@ class Glimpse():
self.is_initialized = 1
self.total_num = len(self.elt_u.electrons)
for i in self.elt_u.electrons:
self.next_date = max(self.next_date, i['next_date'])
if i['next_date'] > 0:
self.next_date = min(self.next_date, i['next_date'])
self.lastest_date = max(self.lastest_date, i['last_date'])
if i['is_activated']:
self.avg_efactor += i['efactor']
self.activated_num += 1
if self.next_date == 0x3f3f3f3f:
self.next_date = -1
self.is_initialized = 0
if self.activated_num == 0:
return
self.avg_efactor = round(self.avg_efactor / self.activated_num, 2)
if self.next_date == 0x3f3f3f3f:
self.next_date = -1
return
class Apparatus():

View File

@@ -229,8 +229,7 @@ class DashboardScreen(Screen):
for file in nucleon_files:
text = self.item_desc_generator(pathlib.Path(file))
file_list_widget.append(ListItem(
Label(text[0]),
Label(text[1]),
Label(text[0] + '\n' + text[1]),
))
else:
file_list_widget.append(