From 3ccd2ba10b08353098874008bbd84784172d2c9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9F=B3=E6=B8=B8=E7=8E=A9=E7=9A=84=E4=BA=BA?= <115459678+RQNG@users.noreply.github.com> Date: Sat, 15 Jul 2023 16:06:30 +0800 Subject: [PATCH] v 2.2 --- WouoUI-128_128/WouoUI-128_128.ino | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/WouoUI-128_128/WouoUI-128_128.ino b/WouoUI-128_128/WouoUI-128_128.ino index da9ddb6..c627261 100644 --- a/WouoUI-128_128/WouoUI-128_128.ino +++ b/WouoUI-128_128/WouoUI-128_128.ino @@ -277,7 +277,7 @@ M_SELECT setting_menu[] M_SELECT about_menu[] { {"WouoUI"}, - {"v2.1"}, + {"v2.2"}, {"Board: STM32F103"}, {"Ram: 20k"}, {"Flash: 64k"}, @@ -960,8 +960,11 @@ void layer_init_out() //动画函数 void animation(float *a, float *a_trg, uint8_t n) { - if (fabs(*a - *a_trg) < 0.15) *a = *a_trg; - if (*a != *a_trg) *a += (*a_trg - *a) / (ui.param[n] / 10.0); + if (*a != *a_trg) + { + if (fabs(*a - *a_trg) < 0.15) *a = *a_trg; + else *a += (*a_trg - *a) / (ui.param[n] / 10.0); + } } //消失函数