From af9427e69f97b430b82f25810b1171dd36872c3a Mon Sep 17 00:00:00 2001 From: "yang.roger" Date: Thu, 18 Jun 2026 15:25:49 +0800 Subject: [PATCH] Prevent refreshing incorrectly the animated gauge needle after the GX_CIRCULAR_GAUGE_TIMER timer was stopped There may be timer messages in the system message queue after the GX_CIRCULAR_GAUGE_TIMER timer was stopped. The gauge needle maybe displays at error position. --- common/src/gx_circular_gauge_event_process.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/src/gx_circular_gauge_event_process.c b/common/src/gx_circular_gauge_event_process.c index 78a3eed41..c49f04fc6 100644 --- a/common/src/gx_circular_gauge_event_process.c +++ b/common/src/gx_circular_gauge_event_process.c @@ -105,6 +105,10 @@ UINT status = GX_SUCCESS; case GX_EVENT_TIMER: if (event_ptr -> gx_event_payload.gx_event_timer_id == GX_CIRCULAR_GAUGE_TIMER) { + if (gauge->gx_circular_gauge_current_angle == gauge->gx_circular_gauge_target_angle) + { + break; + } /* Calculate current angle. */ gauge -> gx_circular_gauge_animation_step++;