@intechstudio/grid-protocol 1.20251010.1314 → 1.20251021.1146

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -800,6 +800,9 @@ var GRID_CLASS_HIDGAMEPADBUTTON_BUTTON_offset = "5";
800
800
  var GRID_CLASS_HIDGAMEPADBUTTON_BUTTON_length = "2";
801
801
  var GRID_CLASS_HIDGAMEPADBUTTON_STATE_offset = "7";
802
802
  var GRID_CLASS_HIDGAMEPADBUTTON_STATE_length = "2";
803
+ var GRID_LUA_FNC_G_DECODE_source = "grid_lua_src_decode_lua";
804
+ var GRID_LUA_FNC_G_DECODE_short = "gdec";
805
+ var GRID_LUA_FNC_G_DECODE_human = "decode";
803
806
  var GRID_LUA_FNC_G_LOOKUP_source = "grid_lua_src_lookup_lua";
804
807
  var GRID_LUA_FNC_G_LOOKUP_short = "glut";
805
808
  var GRID_LUA_FNC_G_LOOKUP_human = "lookup";
@@ -882,8 +885,8 @@ var GRID_LUA_FNC_L_DRAW_DEMO_short = "ldd";
882
885
  var GRID_LUA_FNC_L_DRAW_DEMO_human = "draw_demo";
883
886
  var GRID_LUA_FNC_L_DRAW_DEMO_usage = "lcd:draw_demo(n) Draws the n-th iteration of the demo.";
884
887
  var GRID_LUA_L_META_init = "lcd_meta = { __index = {type = 'lcd', \" GRID_LUA_FNC_ASSIGN_META_GTV(GRID_LUA_FNC_L_ELEMENT_INDEX_short, GRID_LUA_FNC_L_ELEMENT_INDEX_index) \",\" GRID_LUA_FNC_ASSIGN_META_GTV(GRID_LUA_FNC_L_SCREEN_INDEX_short, GRID_LUA_FNC_L_SCREEN_INDEX_index) \",\" GRID_LUA_FNC_ASSIGN_META_GTV(GRID_LUA_FNC_L_SCREEN_WIDTH_short, GRID_LUA_FNC_L_SCREEN_WIDTH_index) \",\" GRID_LUA_FNC_ASSIGN_META_GTV(GRID_LUA_FNC_L_SCREEN_HEIGHT_short, GRID_LUA_FNC_L_SCREEN_HEIGHT_index) \",\" GRID_LUA_FNC_ASSIGN_META_UNDEF(GRID_LUA_FNC_A_INIT_short) \",\" GRID_LUA_FNC_ASSIGN_META_UNDEF(GRID_LUA_FNC_A_DRAW_short) \",post_init_cb = function (self) self:\"GRID_LUA_FNC_A_INIT_short\"() end,\" GRID_LUA_FNC_ASSIGN_META_PAR1(\"gtt\", GRID_LUA_FNC_G_TIMER_START_short) \",\" GRID_LUA_FNC_ASSIGN_META_PAR0(\"gtp\", GRID_LUA_FNC_G_TIMER_STOP_short) \",\" GRID_LUA_FNC_ASSIGN_META_PAR1(\"get\", GRID_LUA_FNC_G_EVENT_TRIGGER_short) \",\" GRID_LUA_FNC_ASSIGN_META_PAR1_RET(\"gen\", GRID_LUA_FNC_G_ELEMENTNAME_short) \",\" GRID_LUA_FNC_ASSIGN_META_DRAW(GRID_LUA_FNC_L_DRAW_SWAP_short, GRID_LUA_FNC_G_GUI_DRAW_SWAP_short) \",\" GRID_LUA_FNC_ASSIGN_META_DRAW(GRID_LUA_FNC_L_DRAW_PIXEL_short, GRID_LUA_FNC_G_GUI_DRAW_PIXEL_short) \",\" GRID_LUA_FNC_ASSIGN_META_DRAW(GRID_LUA_FNC_L_DRAW_LINE_short, GRID_LUA_FNC_G_GUI_DRAW_LINE_short) \",\" GRID_LUA_FNC_ASSIGN_META_DRAW(GRID_LUA_FNC_L_DRAW_RECTANGLE_short, GRID_LUA_FNC_G_GUI_DRAW_RECTANGLE_short) \",\" GRID_LUA_FNC_ASSIGN_META_DRAW(GRID_LUA_FNC_L_DRAW_RECTANGLE_FILLED_short, GRID_LUA_FNC_G_GUI_DRAW_RECTANGLE_FILLED_short) \",\" GRID_LUA_FNC_ASSIGN_META_DRAW(GRID_LUA_FNC_L_DRAW_RECTANGLE_ROUNDED_short, GRID_LUA_FNC_G_GUI_DRAW_RECTANGLE_ROUNDED_short) \",\" GRID_LUA_FNC_ASSIGN_META_DRAW(GRID_LUA_FNC_L_DRAW_RECTANGLE_ROUNDED_FILLED_short, GRID_LUA_FNC_G_GUI_DRAW_RECTANGLE_ROUNDED_FILLED_short) \",\" GRID_LUA_FNC_ASSIGN_META_DRAW(GRID_LUA_FNC_L_DRAW_POLYGON_short, GRID_LUA_FNC_G_GUI_DRAW_POLYGON_short) \",\" GRID_LUA_FNC_ASSIGN_META_DRAW(GRID_LUA_FNC_L_DRAW_POLYGON_FILLED_short, GRID_LUA_FNC_G_GUI_DRAW_POLYGON_FILLED_short) \",\" GRID_LUA_FNC_ASSIGN_META_DRAW(GRID_LUA_FNC_L_DRAW_TEXT_short, GRID_LUA_FNC_G_GUI_DRAW_TEXT_short) \",\" GRID_LUA_FNC_ASSIGN_META_DRAW(GRID_LUA_FNC_L_DRAW_FASTTEXT_short, GRID_LUA_FNC_G_GUI_DRAW_FASTTEXT_short) \",\" GRID_LUA_FNC_ASSIGN_META_DRAW(GRID_LUA_FNC_L_DRAW_AREA_FILLED_short, GRID_LUA_FNC_G_GUI_DRAW_AREA_FILLED_short) \",\" GRID_LUA_FNC_ASSIGN_META_DRAW(GRID_LUA_FNC_L_DRAW_DEMO_short, GRID_LUA_FNC_G_GUI_DRAW_DEMO_short) \",}}";
885
- var GRID_ACTIONSTRING_LCD_INIT = "<?lua --[[@cb]] glsb(255)lcd,pi,s,c,f,v,ids=ele[13],math.pi,64,{{0,0,0},{255,255,255},{glr(),glg(),glb()}},1,{27,0,100},'VSN1'd={[1]='Linear',[2]='Encoder',[3]='Button',[7]='Endless'}xc,yc,p=160,120,s*5/8;self.eventrx_cb=function(self,hdr,e,rxv,n)v=rxv;if#n==0 then n=d[e[3]]..e[2]end;ids=string.sub(n,1,(lcd:lsw()/(s/2)-1)//1)f=10 end;lcd:ldaf(0,0,319,239,c[1])lcd:ldrr(3,3,317,237,10,c[2]) ?>";
886
- var GRID_ACTIONSTRING_LCD_DRAW = "<?lua --[[@cb]] if f>0 then f=f-1;local a,xo=gmaps(v[1],v[2],v[3],0.1,1),#tostring(v[1])/2*s/2-#tostring(v[1])-s//32,lcd:ldaf(10,10,310,230,c[1])lcd:ldrr(xc-p//1-1,yc-p//1-1,xc+p//1+1,yc+p//1+1,s,c[2])lcd:ldrrf(xc-p*a//1,yc-p*a//1,xc+p*a//1,yc+p*a//1,s,c[3])lcd:ldft(v[1],xc-xo,yc+s,s/2,c[2])local xn=(#ids*(s/2))/2-s//32;lcd:ldft(ids,xc-xn,yc-1.5*s,s/2,c[2])lcd:ldsw()end ?>";
888
+ var GRID_ACTIONSTRING_LCD_INIT = "<?lua --[[@cb]] glsb(255)pi,s,c,self.f,self.v,self.id=math.pi,64,{{0,0,0},{255,255,255},{glr(),glg(),glb()}},1,{27,0,100},'VSN1'd={[1]='Linear',[2]='Encoder',[3]='Button',[7]='Endless'}xc,yc,p=160,120,s*5/8;self.eventrx_cb=function(self,hdr,e,v,n)self.v=v;if#n==0 then n=d[e[3]]..e[2]end;self.id=string.sub(n,1,(self:lsw()/(s/2)-1)//1)self.f=1 end;self:ldaf(0,0,319,239,c[1])self:ldrr(3,3,317,237,10,c[2]) ?>";
889
+ var GRID_ACTIONSTRING_LCD_DRAW = "<?lua --[[@cb]] if self.f>0 then self.f=self.f-1;local a,xo=gmaps(self.v[1],self.v[2],self.v[3],0.1,1),#tostring(self.v[1])/2*s/2-#tostring(self.v[1])-s//32;self:ldaf(10,10,310,230,c[1])self:ldrr(xc-p//1-1,yc-p//1-1,xc+p//1+1,yc+p//1+1,s,c[2])self:ldrrf(xc-p*a//1,yc-p*a//1,xc+p*a//1,yc+p*a//1,s,c[3])self:ldft(self.v[1],xc-xo,yc+s,s/2,c[2])local xn=(#self.id*(s/2))/2-s//32;self:ldft(self.id,xc-xn,yc-1.5*s,s/2,c[2])self:ldsw()end ?>";
887
890
  var grid_protocol_bot = {
888
891
  GRID_PROTOCOL_VERSION_MAJOR: GRID_PROTOCOL_VERSION_MAJOR,
889
892
  GRID_PROTOCOL_VERSION_MINOR: GRID_PROTOCOL_VERSION_MINOR,
@@ -1685,6 +1688,9 @@ var grid_protocol_bot = {
1685
1688
  GRID_CLASS_HIDGAMEPADBUTTON_BUTTON_length: GRID_CLASS_HIDGAMEPADBUTTON_BUTTON_length,
1686
1689
  GRID_CLASS_HIDGAMEPADBUTTON_STATE_offset: GRID_CLASS_HIDGAMEPADBUTTON_STATE_offset,
1687
1690
  GRID_CLASS_HIDGAMEPADBUTTON_STATE_length: GRID_CLASS_HIDGAMEPADBUTTON_STATE_length,
1691
+ GRID_LUA_FNC_G_DECODE_source: GRID_LUA_FNC_G_DECODE_source,
1692
+ GRID_LUA_FNC_G_DECODE_short: GRID_LUA_FNC_G_DECODE_short,
1693
+ GRID_LUA_FNC_G_DECODE_human: GRID_LUA_FNC_G_DECODE_human,
1688
1694
  GRID_LUA_FNC_G_LOOKUP_source: GRID_LUA_FNC_G_LOOKUP_source,
1689
1695
  GRID_LUA_FNC_G_LOOKUP_short: GRID_LUA_FNC_G_LOOKUP_short,
1690
1696
  GRID_LUA_FNC_G_LOOKUP_human: GRID_LUA_FNC_G_LOOKUP_human,
@@ -2244,6 +2250,9 @@ var protocol_data = /*#__PURE__*/Object.freeze({
2244
2250
  GRID_LUA_FNC_G_BUTTON_CALIBRATION_SET_human: GRID_LUA_FNC_G_BUTTON_CALIBRATION_SET_human,
2245
2251
  GRID_LUA_FNC_G_BUTTON_CALIBRATION_SET_short: GRID_LUA_FNC_G_BUTTON_CALIBRATION_SET_short,
2246
2252
  GRID_LUA_FNC_G_BUTTON_CALIBRATION_SET_usage: GRID_LUA_FNC_G_BUTTON_CALIBRATION_SET_usage,
2253
+ GRID_LUA_FNC_G_DECODE_human: GRID_LUA_FNC_G_DECODE_human,
2254
+ GRID_LUA_FNC_G_DECODE_short: GRID_LUA_FNC_G_DECODE_short,
2255
+ GRID_LUA_FNC_G_DECODE_source: GRID_LUA_FNC_G_DECODE_source,
2247
2256
  GRID_LUA_FNC_G_ELEMENTNAME_GET_fnptr: GRID_LUA_FNC_G_ELEMENTNAME_GET_fnptr,
2248
2257
  GRID_LUA_FNC_G_ELEMENTNAME_GET_human: GRID_LUA_FNC_G_ELEMENTNAME_GET_human,
2249
2258
  GRID_LUA_FNC_G_ELEMENTNAME_GET_short: GRID_LUA_FNC_G_ELEMENTNAME_GET_short,