From d3292d1757ced2d5d45699b454d6701d7feb14a7 Mon Sep 17 00:00:00 2001 From: Lhy <33685788+smjes3@users.noreply.github.com> Date: Wed, 22 May 2024 19:37:05 +0800 Subject: [PATCH 1/6] =?UTF-8?q?-=20=E4=BF=AE=E5=A4=8D=E9=BB=84=E6=B3=89?= =?UTF-8?q?=E7=BB=A5=E5=9B=AD=E9=83=A8=E5=88=86=E6=9C=BA=E5=9E=8B=E6=BC=8F?= =?UTF-8?q?=E6=80=AA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- map/HuangQuan/map_3-5_2.json | 92 +++++++++++++++++++++++++++++------- 1 file changed, 76 insertions(+), 16 deletions(-) diff --git a/map/HuangQuan/map_3-5_2.json b/map/HuangQuan/map_3-5_2.json index bca7254d..13984fd5 100644 --- a/map/HuangQuan/map_3-5_2.json +++ b/map/HuangQuan/map_3-5_2.json @@ -1,17 +1,17 @@ { "name": "绥 园-2", "author": "喵不可言,龙女姬", - "start": [ - { - "map": 1 - }, - { - "picture\\map_3-5_point_1.png": 1.5 - }, - { - "picture\\transfer.png": 1.5 - } - ], + "start": [ + { + "map": 1 + }, + { + "picture\\map_3-5_point_1.png": 1.5 + }, + { + "picture\\transfer.png": 1.5 + } + ], "map": [ { "s": 4.48 @@ -81,7 +81,7 @@ }, { "s": 7.4 - }, + }, { "e": 2 }, @@ -102,7 +102,7 @@ }, { "a": 1.21 - }, + }, { "e": 2 }, @@ -114,10 +114,10 @@ }, { "d": 1.83 - }, + }, { "e": 2 - }, + }, { "d": 5.83 }, @@ -139,6 +139,9 @@ { "e": 2 }, + { + "d": 0.1 + }, { "e": 2 }, @@ -181,11 +184,68 @@ { "e": 2 }, + { + "d": 0.1 + }, { "e": 2 }, { - "d": 0.1 + "e": 2 + }, + { + "e": 2 + }, + { + "a": 0.1 + }, + { + "e": 2 + }, + { + "e": 2 + }, + { + "e": 2 + }, + { + "w": 0.1 + }, + { + "e": 2 + }, + { + "e": 2 + }, + { + "a": 0.1 + }, + { + "e": 2 + }, + { + "e": 2 + }, + { + "e": 2 + }, + { + "e": 2 + }, + { + "w": 0.1 + }, + { + "e": 2 + }, + { + "a": 0.1 + }, + { + "e": 2 + }, + { + "e": 2 }, { "e": 2 From 16f3d6ee8bbef0ca7a8b3d74c4a0dae8c2ffacc8 Mon Sep 17 00:00:00 2001 From: Lhy <33685788+smjes3@users.noreply.github.com> Date: Wed, 22 May 2024 19:37:42 +0800 Subject: [PATCH 2/6] =?UTF-8?q?-=20=E4=BF=AE=E5=A4=8D=E9=BB=84=E6=B3=89?= =?UTF-8?q?=E5=A4=A7=E5=89=A7=E9=99=A2=E9=83=A8=E5=88=86=E6=9C=BA=E5=9E=8B?= =?UTF-8?q?=E6=BC=8F=E6=80=AA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- map/HuangQuan/map_4-7_4.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/map/HuangQuan/map_4-7_4.json b/map/HuangQuan/map_4-7_4.json index 42889c2b..5667c290 100644 --- a/map/HuangQuan/map_4-7_4.json +++ b/map/HuangQuan/map_4-7_4.json @@ -26,18 +26,33 @@ { "e": 2 }, + { + "d": 0.1 + }, { "e": 2 }, + { + "d": 0.1 + }, { "e": 2 }, + { + "d": 0.1 + }, { "e": 2 }, + { + "d": 0.1 + }, { "e": 2 }, + { + "d": 0.1 + }, { "e": 2 }, From 7216a273c921aeb57d2b9974ad5feff5901ffb7c Mon Sep 17 00:00:00 2001 From: Lhy <33685788+smjes3@users.noreply.github.com> Date: Fri, 24 May 2024 18:03:41 +0800 Subject: [PATCH 3/6] =?UTF-8?q?-=20=E4=BF=AE=E5=A4=8D=E9=BB=84=E6=B3=89?= =?UTF-8?q?=E5=A4=A7=E5=89=A7=E9=99=A2=E5=81=B6=E5=8F=91=E7=9A=84=E6=BC=8F?= =?UTF-8?q?=E6=80=AA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- map/HuangQuan/map_4-7_8.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/map/HuangQuan/map_4-7_8.json b/map/HuangQuan/map_4-7_8.json index 47dcc5eb..06198836 100644 --- a/map/HuangQuan/map_4-7_8.json +++ b/map/HuangQuan/map_4-7_8.json @@ -102,7 +102,7 @@ "d": 2 }, { - "w": 1.2 + "w": 0.9 }, { "e": 2 From 9feb258667e17d936add9212b1765ac132c6d9a6 Mon Sep 17 00:00:00 2001 From: Lhy <33685788+smjes3@users.noreply.github.com> Date: Fri, 24 May 2024 18:04:48 +0800 Subject: [PATCH 4/6] =?UTF-8?q?-=20=E4=BF=AE=E5=A4=8D=E8=B7=A8=E6=97=A5?= =?UTF-8?q?=E8=BF=9E=E9=94=84=E5=9C=A82.2=E5=89=A7=E6=83=85=E6=9C=AA?= =?UTF-8?q?=E5=81=9A=E6=83=85=E5=86=B5=E4=B8=8B=E7=9A=84=E6=9C=88=E5=8D=A1?= =?UTF-8?q?=E8=AF=86=E5=88=AB=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fhoe.py | 7 +++++-- utils/map.py | 8 +++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/fhoe.py b/fhoe.py index 5fc5a603..f4babb77 100644 --- a/fhoe.py +++ b/fhoe.py @@ -162,9 +162,12 @@ def main(): log.info(f"检测到换日,即将从头开锄") map_instance.auto_map(start_map, start_in_mid, dev=dev) else: + map_instance.calculated.back_to_main(delay=2.0) now = datetime.datetime.now() - next_4am = now.replace(hour=4, minute=0, second=0, microsecond=0) - if now.hour >= 4: + refresh_hour = cfg.CONFIG.get("refresh_hour", 4) + refresh_minute = cfg.CONFIG.get("refresh_minute", 0) + next_4am = now.replace(hour=refresh_hour, minute=refresh_minute, second=0, microsecond=0) + if now.hour >= refresh_hour and now.minute >= refresh_minute: next_4am += datetime.timedelta(days=1) wait_time = (next_4am - now).total_seconds() wait_time += 60 diff --git a/utils/map.py b/utils/map.py index d0854539..20c66060 100644 --- a/utils/map.py +++ b/utils/map.py @@ -152,13 +152,15 @@ def wait_and_run(self, minute=1, second=0): log.info(f"需要等待 {wait_time:.0f} 秒") time.sleep(wait_time) - def has_crossed_4am(self, start, end): + def has_crossed_4am(self, start:datetime.datetime, end:datetime.datetime) -> bool: """ 检查是否从开始时间到结束时间跨越了凌晨4点 """ + refresh_hour = self.cfg.CONFIG.get("refresh_hour", 4) + refresh_minute = self.cfg.CONFIG.get("refresh_minute", 0) # 获取开始时间的凌晨4点 - start_4am = start.replace(hour=4, minute=0, second=0, microsecond=0) - if start.hour >= 4: + start_4am = start.replace(hour=refresh_hour, minute=refresh_minute, second=0, microsecond=0) + if start.hour >= refresh_hour and start.minute >= refresh_minute: # 如果开始时间在4点之后,则4点时间应该是下一天的4点 start_4am += datetime.timedelta(days=1) From f3d292bfe6c2b25da2950c2ea111886669c7f15b Mon Sep 17 00:00:00 2001 From: Lhy <33685788+smjes3@users.noreply.github.com> Date: Fri, 24 May 2024 21:59:07 +0800 Subject: [PATCH 5/6] =?UTF-8?q?-=20=E4=BF=AE=E5=A4=8D=E9=BB=84=E6=B3=89?= =?UTF-8?q?=E9=B3=9E=E6=B8=8A=E5=A2=83=E9=83=A8=E5=88=86=E6=9C=BA=E5=9E=8B?= =?UTF-8?q?=E6=BC=8F=E6=80=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- map/HuangQuan/map_3-7_9.json | 53 +++++++++++++++++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) diff --git a/map/HuangQuan/map_3-7_9.json b/map/HuangQuan/map_3-7_9.json index eadec14a..810c6b1e 100644 --- a/map/HuangQuan/map_3-7_9.json +++ b/map/HuangQuan/map_3-7_9.json @@ -68,7 +68,7 @@ "e": 2 }, { - "a": 0.56 + "a": 0.8 }, { "w": 0.8 @@ -76,18 +76,69 @@ { "e": 2 }, + { + "w": 0.1 + }, + { + "e": 2 + }, + { + "w": 0.1 + }, + { + "e": 2 + }, + { + "w": 0.1 + }, + { + "e": 2 + }, + { + "w": 0.1 + }, + { + "e": 2 + }, + { + "w": 0.1 + }, + { + "e": 2 + }, + { + "a": 0.1 + }, + { + "e": 2 + }, + { + "a": 0.1 + }, { "e": 2 }, + { + "a": 0.1 + }, { "e": 2 }, + { + "a": 0.1 + }, { "e": 2 }, + { + "a": 0.1 + }, { "e": 2 }, + { + "s": 0.1 + }, { "e": 2 }, From 3fe0c4311540fbf9df7878fc31138526a51aeb7d Mon Sep 17 00:00:00 2001 From: Lhy <33685788+smjes3@users.noreply.github.com> Date: Fri, 24 May 2024 21:59:27 +0800 Subject: [PATCH 6/6] =?UTF-8?q?-=20=E4=BF=AE=E5=A4=8D=E9=BB=84=E6=B3=89?= =?UTF-8?q?=E4=B8=B9=E9=BC=8E=E5=8F=B8=E9=83=A8=E5=88=86=E6=9C=BA=E5=9E=8B?= =?UTF-8?q?=E6=BC=8F=E6=80=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- map/HuangQuan/map_3-6_1.json | 57 ++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/map/HuangQuan/map_3-6_1.json b/map/HuangQuan/map_3-6_1.json index 34d319fc..cf055abc 100644 --- a/map/HuangQuan/map_3-6_1.json +++ b/map/HuangQuan/map_3-6_1.json @@ -133,15 +133,72 @@ { "e": 2 }, + { + "d": 0.1 + }, + { + "e": 2 + }, + { + "d": 0.1 + }, + { + "e": 2 + }, + { + "d": 0.1 + }, + { + "e": 2 + }, + { + "w": 0.1 + }, + { + "e": 2 + }, + { + "w": 0.1 + }, + { + "e": 2 + }, + { + "w": 0.1 + }, + { + "e": 2 + }, + { + "w": 0.1 + }, + { + "e": 2 + }, + { + "a": 0.1 + }, { "e": 2 }, + { + "a": 0.1 + }, + { + "e": 2 + }, + { + "a": 0.1 + }, { "e": 2 }, { "e": 2 }, + { + "s": 3 + }, { "w": 0.88 },