From eeff672b55da8206a6109a136d7222141c49fc4b Mon Sep 17 00:00:00 2001 From: Gatsby Van Date: Wed, 24 Jan 2024 10:55:15 +0800 Subject: [PATCH] bugfix: correct assert condition. --- df_datalink_sp/src/system_monitor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/df_datalink_sp/src/system_monitor.c b/df_datalink_sp/src/system_monitor.c index feb9a7e..b7a1046 100644 --- a/df_datalink_sp/src/system_monitor.c +++ b/df_datalink_sp/src/system_monitor.c @@ -46,7 +46,8 @@ uint8_t GetReadable(PINGPONG ctrllor); inline uint8_t GetWritable(PINGPONG ctrllor) { - ASSERT(ctrllor.wBusy != BUFF_NONE); + // Allow only one write. + ASSERT(ctrllor.wBusy == BUFF_NONE); if (ctrllor.rBusy == BUFF_NONE) return ((ctrllor.latest == BUFF_B) ? BUFF_A : BUFF_B); else