From cc5eb732ea8e9581ddd311547832c98cd669f0bf Mon Sep 17 00:00:00 2001 From: s-hadinger <49731213+s-hadinger@users.noreply.github.com> Date: Sat, 16 Dec 2023 22:38:04 +0100 Subject: [PATCH] Fix animation (#20250) --- lib/libesp32/berry_tasmota/src/be_animate_module.c | 14 ++++++-------- .../src/embedded/animate_1_animate_effects.be | 1 + .../solidified_animate_1_animate_effects.h | 8 +++++--- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/lib/libesp32/berry_tasmota/src/be_animate_module.c b/lib/libesp32/berry_tasmota/src/be_animate_module.c index 688585f06..7d741e0a9 100644 --- a/lib/libesp32/berry_tasmota/src/be_animate_module.c +++ b/lib/libesp32/berry_tasmota/src/be_animate_module.c @@ -57,7 +57,7 @@ static const uint8_t PALETTE_STANDARD_TAG[] = { 0x40, 0x00, 0xFF, 0x00, // green 0x40, 0x00, 0x00, 0xFF, // blue 0x40, 0xFF, 0x00, 0xFF, // indigo - 0x40, 0xFF, 0xFF, 0xFF, // violet + 0x40, 0xEE, 0x44, 0xA5, // violet 0x00, 0xFF, 0x00, 0x00, // red }; @@ -72,12 +72,11 @@ static const uint8_t PALETTE_ib_jul01_gp[] = { static const uint8_t PALETTE_STANDARD_VAL[] = { 0x00, 0xFF, 0x00, 0x00, // red - 0x24, 0xFF, 0xA5, 0x00, // orange - 0x49, 0xFF, 0xFF, 0x00, // yellow - 0x6E, 0x00, 0xFF, 0x00, // green - 0x92, 0x00, 0x00, 0xFF, // blue - 0xB7, 0xFF, 0x00, 0xFF, // indigo - 0xDB, 0xFF, 0xFF, 0xFF, // violet + 0x2A, 0xFF, 0xA5, 0x00, // orange + 0x55, 0xFF, 0xFF, 0x00, // yellow + 0x7F, 0x00, 0xFF, 0x00, // green + 0xAA, 0x00, 0x00, 0xFF, // blue + 0xD4, 0xFF, 0x00, 0xFF, // indigo 0xFF, 0xFF, 0x00, 0x00, // red }; @@ -88,7 +87,6 @@ static const uint8_t PALETTE_SATURATED_TAG[] = { 0x40, 0x00, 0xFF, 0x00, // green 0x40, 0x00, 0x00, 0xFF, // blue 0x40, 0xFF, 0x00, 0xFF, // indigo - 0x40, 0xFF, 0xFF, 0xFF, // violet 0x00, 0xFF, 0x00, 0x00, // red }; diff --git a/lib/libesp32/berry_tasmota/src/embedded/animate_1_animate_effects.be b/lib/libesp32/berry_tasmota/src/embedded/animate_1_animate_effects.be index e2a5a9736..e96f37f93 100644 --- a/lib/libesp32/berry_tasmota/src/embedded/animate_1_animate_effects.be +++ b/lib/libesp32/berry_tasmota/src/embedded/animate_1_animate_effects.be @@ -40,6 +40,7 @@ class Animate_pulse self.pulse_size = pulse_size if slew_size < 0 slew_size = 0 end self.slew_size = slew_size + self.pos = 0 end ## diff --git a/lib/libesp32/berry_tasmota/src/solidify/solidified_animate_1_animate_effects.h b/lib/libesp32/berry_tasmota/src/solidify/solidified_animate_1_animate_effects.h index bb8b9dee3..9831e5a6e 100644 --- a/lib/libesp32/berry_tasmota/src/solidify/solidified_animate_1_animate_effects.h +++ b/lib/libesp32/berry_tasmota/src/solidify/solidified_animate_1_animate_effects.h @@ -154,7 +154,7 @@ be_local_closure(Animate_pulse_init, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 8]) { /* constants */ + ( &(const bvalue[ 9]) { /* constants */ /* K0 */ be_const_int(16777215), /* K1 */ be_const_int(1), /* K2 */ be_const_int(0), @@ -163,10 +163,11 @@ be_local_closure(Animate_pulse_init, /* name */ /* K5 */ be_const_int(-16777216), /* K6 */ be_nested_str_weak(pulse_size), /* K7 */ be_nested_str_weak(slew_size), + /* K8 */ be_nested_str_weak(pos), }), be_str_weak(init), &be_const_str_solidified, - ( &(const binstruction[23]) { /* code */ + ( &(const binstruction[24]) { /* code */ 0x4C100000, // 0000 LDNIL R4 0x1C100204, // 0001 EQ R4 R1 R4 0x78120000, // 0002 JMPF R4 #0004 @@ -189,7 +190,8 @@ be_local_closure(Animate_pulse_init, /* name */ 0x78120000, // 0013 JMPF R4 #0015 0x580C0002, // 0014 LDCONST R3 K2 0x90020E03, // 0015 SETMBR R0 K7 R3 - 0x80000000, // 0016 RET 0 + 0x90021102, // 0016 SETMBR R0 K8 K2 + 0x80000000, // 0017 RET 0 }) ) );