From b02471785b95069fc0ec963cdbe5a90079e76985 Mon Sep 17 00:00:00 2001 From: bmy <2583236812@qq.com> Date: Sun, 3 Mar 2024 17:19:00 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3=E8=9C=82=E9=B8=A3?= =?UTF-8?q?=E5=99=A8=E5=A3=B0=E9=9F=B3=E9=98=9F=E5=88=97=E7=A7=BB=E4=BD=8D?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/by_buzzer.c | 3 ++- app/main.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/by_buzzer.c b/app/by_buzzer.c index b4df4d0..f437f08 100644 --- a/app/by_buzzer.c +++ b/app/by_buzzer.c @@ -10,6 +10,7 @@ uint32_t a[40] = {0}; void queue_init(void) { + queue_long = 0; memset(a, 0, sizeof(a)); } @@ -22,7 +23,7 @@ void queue_add_element(int element) } void queue_pop_element(void) { - memmove(a, &a[1], queue_long * sizeof(a)); + memmove(a, &a[1], (queue_long - 1) * sizeof(a[0])); if (queue_long > 0) { queue_long--; } diff --git a/app/main.c b/app/main.c index a350a4a..50e2d3d 100644 --- a/app/main.c +++ b/app/main.c @@ -56,7 +56,7 @@ int main(void) ips200_init(IPS200_TYPE_SPI); by_led_init(); - // by_buzzer_init(); + by_buzzer_init(); by_button_init(); jj_bt_init(); @@ -72,7 +72,7 @@ int main(void) // by_tiny_frame_read(0x0D, 0x4059, &data_test); while (1) { Page_Run(); - // by_buzzer_run(); + by_buzzer_run(); by_tiny_frame_write(0x0D, 0x0000, tiny_frame_param[0].u32); by_tiny_frame_run(); system_delay_ms(10); From 00e7c50787e4af03ab7c0fe606728f2dd7b55820 Mon Sep 17 00:00:00 2001 From: bmy <2583236812@qq.com> Date: Sun, 3 Mar 2024 17:23:25 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E8=A2=AB=E8=A6=86?= =?UTF-8?q?=E5=86=99=E7=9A=84=E5=B1=8F=E5=B9=95=E9=A9=B1=E5=8A=A8=E5=8F=82?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libraries/zf_device/zf_device_ips200.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/zf_device/zf_device_ips200.c b/libraries/zf_device/zf_device_ips200.c index d71a1c0..99b7c99 100644 --- a/libraries/zf_device/zf_device_ips200.c +++ b/libraries/zf_device/zf_device_ips200.c @@ -326,8 +326,8 @@ static void ips200_set_region(uint16 x1, uint16 y1, uint16 x2, uint16 y2) ips200_write_16bit_data(x2+80); ips200_write_command(0x2b); - ips200_write_16bit_data(y1+20); - ips200_write_16bit_data(y2+20); + ips200_write_16bit_data(y1); + ips200_write_16bit_data(y2); ips200_write_command(0x2c); }