From c4767578a07257c2e11abdd2241daee7710ae1a4 Mon Sep 17 00:00:00 2001 From: Stephan Hadinger Date: Fri, 13 May 2022 22:39:51 +0200 Subject: [PATCH] OpenHASP fix dropdown direction --- .../berry_tasmota/src/be_lv_openhasp.c | 42 +++++++++--------- tasmota/berry/openhasp/openhasp.tapp | Bin 60625 -> 60662 bytes tasmota/berry/openhasp/openhasp_demo.tapp | Bin 191431 -> 191468 bytes tasmota/berry/openhasp_src/openhasp.tapp | Bin 60625 -> 60662 bytes .../openhasp_src/openhasp_core/openhasp.be | 4 +- tasmota/berry/openhasp_src/openhasp_demo.tapp | Bin 191431 -> 191468 bytes 6 files changed, 23 insertions(+), 23 deletions(-) diff --git a/lib/libesp32/berry_tasmota/src/be_lv_openhasp.c b/lib/libesp32/berry_tasmota/src/be_lv_openhasp.c index 9c1241a03..1f82d2643 100644 --- a/lib/libesp32/berry_tasmota/src/be_lv_openhasp.c +++ b/lib/libesp32/berry_tasmota/src/be_lv_openhasp.c @@ -5349,36 +5349,34 @@ be_local_closure(lvh_dropdown_get_direction, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ + ( &(const bvalue[ 5]) { /* constants */ /* K0 */ be_nested_str_literal("_lv_obj"), /* K1 */ be_nested_str_literal("get_dir"), - /* K2 */ be_nested_str_literal("_dir"), - /* K3 */ be_nested_str_literal("stop_iteration"), + /* K2 */ be_const_int(0), + /* K3 */ be_nested_str_literal("_dir"), + /* K4 */ be_const_int(1), }), be_str_literal("get_direction"), &be_const_str_solidified, - ( &(const binstruction[21]) { /* code */ + ( &(const binstruction[18]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 0x8C040301, // 0001 GETMET R1 R1 K1 0x7C040200, // 0002 CALL R1 1 - 0x60080010, // 0003 GETGBL R2 G16 - 0x880C0102, // 0004 GETMBR R3 R0 K2 - 0x7C080200, // 0005 CALL R2 1 - 0xA8020008, // 0006 EXBLK 0 #0010 - 0x5C0C0400, // 0007 MOVE R3 R2 - 0x7C0C0000, // 0008 CALL R3 0 - 0x88100102, // 0009 GETMBR R4 R0 K2 - 0x94100803, // 000A GETIDX R4 R4 R3 - 0x1C100204, // 000B EQ R4 R1 R4 - 0x78120001, // 000C JMPF R4 #000F - 0xA8040001, // 000D EXBLK 1 1 - 0x80040600, // 000E RET 1 R3 - 0x7001FFF6, // 000F JMP #0007 - 0x58080003, // 0010 LDCONST R2 K3 - 0xAC080200, // 0011 CATCH R2 1 0 - 0xB0080000, // 0012 RAISE 2 R0 R0 - 0x5409FFFE, // 0013 LDINT R2 -1 - 0x80040400, // 0014 RET 1 R2 + 0x58080002, // 0003 LDCONST R2 K2 + 0x600C000C, // 0004 GETGBL R3 G12 + 0x88100103, // 0005 GETMBR R4 R0 K3 + 0x7C0C0200, // 0006 CALL R3 1 + 0x140C0403, // 0007 LT R3 R2 R3 + 0x780E0006, // 0008 JMPF R3 #0010 + 0x880C0103, // 0009 GETMBR R3 R0 K3 + 0x940C0602, // 000A GETIDX R3 R3 R2 + 0x1C0C0203, // 000B EQ R3 R1 R3 + 0x780E0000, // 000C JMPF R3 #000E + 0x80040400, // 000D RET 1 R2 + 0x00080504, // 000E ADD R2 R2 K4 + 0x7001FFF3, // 000F JMP #0004 + 0x540DFFFE, // 0010 LDINT R3 -1 + 0x80040600, // 0011 RET 1 R3 }) ) ); diff --git a/tasmota/berry/openhasp/openhasp.tapp b/tasmota/berry/openhasp/openhasp.tapp index e5f536b07d2b07718300077c800f16a2214efa9e..f14e884386fa460d2319108f8e0d3608ff76d483 100644 GIT binary patch delta 125 zcmcb3llj|C<_*@2TJBrchJ0|?{^!Ii1_lu3W{_dXFG$VHNGvYUOG*t5;bdSwcAzfl z#DUGJj1}FJ-$_gIWmctX6sP8->BXmH7HLj?(_=JQUq*EDzwPXsb$dPIc~Q)q-26tB R>DYnEtKKNG*}Y)^0stRyH3t9y delta 114 zcmex%llkIJ<_*@2TIHM8hJ0eU!n^nt0|N+iGsrOH7o_H8Bo-IwC8dUja569_?yXBo z+PgWGv7(zlEx$-1)2cW%CrvLtC9`NUORv#p=iZ2TUKE2SuXv-%l(={D`8SGel5ZG* F000BXmH7HLj?(_=JQUq*EDzwPXsb$dPIc~Q)q-26tB R>DYnEtKKNG*}Y)^0stRyH3t9y delta 114 zcmex%llkIJ<_*@2TIHM8hJ0eU!n^nt0|N+iGsrOH7o_H8Bo-IwC8dUja569_?yXBo z+PgWGv7(zlEx$-1)2cW%CrvLtC9`NUORv#p=iZ2TUKE2SuXv-%l(={D`8SGel5ZG* F000