From bc7443ca8bab2be9d309d31c25c290bd9a4d4f07 Mon Sep 17 00:00:00 2001 From: yarnom Date: Tue, 14 Oct 2025 18:22:32 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E6=9B=B4=E5=A4=9A?= =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E7=93=A6=E7=89=87=E7=9A=84=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=EF=BC=8C=E7=94=A8=E4=BA=8E=E4=BC=98=E5=8C=96=E5=9C=B0=E5=9B=BE?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/radar/scheduler.go | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/internal/radar/scheduler.go b/internal/radar/scheduler.go index be2747d..9d33197 100644 --- a/internal/radar/scheduler.go +++ b/internal/radar/scheduler.go @@ -370,13 +370,27 @@ func runTilesFromNMC(ctx context.Context, opts Options) error { dateStr := local.Format("20060102") hh := local.Format("15") mm := local.Format("04") - // Prepare tile list: primary (opts or default Nanning) + Guangzhou (7/40/104) + Wuhan (7/42/104) + // Prepare tile list: primary (opts or default Nanning) + a few defaults + optional config aliases z, y, x := opts.Z, opts.Y, opts.X if z == 0 && y == 0 && x == 0 { z, y, x = 7, 40, 102 } type tcoord struct{ z, y, x int } - tiles := []tcoord{{z, y, x}, {7, 40, 104}, {7, 42, 104}} + tiles := []tcoord{ + {z, y, x}, // primary + {7, 40, 104}, + {7, 42, 104}, + {7, 40, 103}, + {7, 39, 102}, + } + // Append from config aliases, if present (dedup later) + if cfg := config.GetConfig(); cfg != nil { + for _, a := range cfg.Radar.Aliases { + if a.Z > 0 { + tiles = append(tiles, tcoord{a.Z, a.Y, a.X}) + } + } + } // de-duplicate if same seen := map[string]bool{} for _, tc := range tiles {