mirror of https://github.com/arendst/Tasmota.git
Fix animation (#20250)
This commit is contained in:
parent
70768ea8ad
commit
cc5eb732ea
|
@ -57,7 +57,7 @@ static const uint8_t PALETTE_STANDARD_TAG[] = {
|
||||||
0x40, 0x00, 0xFF, 0x00, // green
|
0x40, 0x00, 0xFF, 0x00, // green
|
||||||
0x40, 0x00, 0x00, 0xFF, // blue
|
0x40, 0x00, 0x00, 0xFF, // blue
|
||||||
0x40, 0xFF, 0x00, 0xFF, // indigo
|
0x40, 0xFF, 0x00, 0xFF, // indigo
|
||||||
0x40, 0xFF, 0xFF, 0xFF, // violet
|
0x40, 0xEE, 0x44, 0xA5, // violet
|
||||||
0x00, 0xFF, 0x00, 0x00, // red
|
0x00, 0xFF, 0x00, 0x00, // red
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -72,12 +72,11 @@ static const uint8_t PALETTE_ib_jul01_gp[] = {
|
||||||
|
|
||||||
static const uint8_t PALETTE_STANDARD_VAL[] = {
|
static const uint8_t PALETTE_STANDARD_VAL[] = {
|
||||||
0x00, 0xFF, 0x00, 0x00, // red
|
0x00, 0xFF, 0x00, 0x00, // red
|
||||||
0x24, 0xFF, 0xA5, 0x00, // orange
|
0x2A, 0xFF, 0xA5, 0x00, // orange
|
||||||
0x49, 0xFF, 0xFF, 0x00, // yellow
|
0x55, 0xFF, 0xFF, 0x00, // yellow
|
||||||
0x6E, 0x00, 0xFF, 0x00, // green
|
0x7F, 0x00, 0xFF, 0x00, // green
|
||||||
0x92, 0x00, 0x00, 0xFF, // blue
|
0xAA, 0x00, 0x00, 0xFF, // blue
|
||||||
0xB7, 0xFF, 0x00, 0xFF, // indigo
|
0xD4, 0xFF, 0x00, 0xFF, // indigo
|
||||||
0xDB, 0xFF, 0xFF, 0xFF, // violet
|
|
||||||
0xFF, 0xFF, 0x00, 0x00, // red
|
0xFF, 0xFF, 0x00, 0x00, // red
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -88,7 +87,6 @@ static const uint8_t PALETTE_SATURATED_TAG[] = {
|
||||||
0x40, 0x00, 0xFF, 0x00, // green
|
0x40, 0x00, 0xFF, 0x00, // green
|
||||||
0x40, 0x00, 0x00, 0xFF, // blue
|
0x40, 0x00, 0x00, 0xFF, // blue
|
||||||
0x40, 0xFF, 0x00, 0xFF, // indigo
|
0x40, 0xFF, 0x00, 0xFF, // indigo
|
||||||
0x40, 0xFF, 0xFF, 0xFF, // violet
|
|
||||||
0x00, 0xFF, 0x00, 0x00, // red
|
0x00, 0xFF, 0x00, 0x00, // red
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,7 @@ class Animate_pulse
|
||||||
self.pulse_size = pulse_size
|
self.pulse_size = pulse_size
|
||||||
if slew_size < 0 slew_size = 0 end
|
if slew_size < 0 slew_size = 0 end
|
||||||
self.slew_size = slew_size
|
self.slew_size = slew_size
|
||||||
|
self.pos = 0
|
||||||
end
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
|
|
|
@ -154,7 +154,7 @@ be_local_closure(Animate_pulse_init, /* name */
|
||||||
0, /* has sup protos */
|
0, /* has sup protos */
|
||||||
NULL, /* no sub protos */
|
NULL, /* no sub protos */
|
||||||
1, /* has constants */
|
1, /* has constants */
|
||||||
( &(const bvalue[ 8]) { /* constants */
|
( &(const bvalue[ 9]) { /* constants */
|
||||||
/* K0 */ be_const_int(16777215),
|
/* K0 */ be_const_int(16777215),
|
||||||
/* K1 */ be_const_int(1),
|
/* K1 */ be_const_int(1),
|
||||||
/* K2 */ be_const_int(0),
|
/* K2 */ be_const_int(0),
|
||||||
|
@ -163,10 +163,11 @@ be_local_closure(Animate_pulse_init, /* name */
|
||||||
/* K5 */ be_const_int(-16777216),
|
/* K5 */ be_const_int(-16777216),
|
||||||
/* K6 */ be_nested_str_weak(pulse_size),
|
/* K6 */ be_nested_str_weak(pulse_size),
|
||||||
/* K7 */ be_nested_str_weak(slew_size),
|
/* K7 */ be_nested_str_weak(slew_size),
|
||||||
|
/* K8 */ be_nested_str_weak(pos),
|
||||||
}),
|
}),
|
||||||
be_str_weak(init),
|
be_str_weak(init),
|
||||||
&be_const_str_solidified,
|
&be_const_str_solidified,
|
||||||
( &(const binstruction[23]) { /* code */
|
( &(const binstruction[24]) { /* code */
|
||||||
0x4C100000, // 0000 LDNIL R4
|
0x4C100000, // 0000 LDNIL R4
|
||||||
0x1C100204, // 0001 EQ R4 R1 R4
|
0x1C100204, // 0001 EQ R4 R1 R4
|
||||||
0x78120000, // 0002 JMPF R4 #0004
|
0x78120000, // 0002 JMPF R4 #0004
|
||||||
|
@ -189,7 +190,8 @@ be_local_closure(Animate_pulse_init, /* name */
|
||||||
0x78120000, // 0013 JMPF R4 #0015
|
0x78120000, // 0013 JMPF R4 #0015
|
||||||
0x580C0002, // 0014 LDCONST R3 K2
|
0x580C0002, // 0014 LDCONST R3 K2
|
||||||
0x90020E03, // 0015 SETMBR R0 K7 R3
|
0x90020E03, // 0015 SETMBR R0 K7 R3
|
||||||
0x80000000, // 0016 RET 0
|
0x90021102, // 0016 SETMBR R0 K8 K2
|
||||||
|
0x80000000, // 0017 RET 0
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue