mirror of https://github.com/arendst/Tasmota.git
Berry replace `string.format`with `format` (#18945)
* Berry replace `string.format`with `format` * remove import.string
This commit is contained in:
parent
bf36868813
commit
36de007909
|
@ -8,7 +8,7 @@ f.close()
|
|||
|
||||
for elt: j["vendorInfo"]
|
||||
|
||||
print(string.format(' { 0x%04X, "%s"},', elt['vendorID'], elt['vendorName']))
|
||||
print(format(' { 0x%04X, "%s"},', elt['vendorID'], elt['vendorName']))
|
||||
|
||||
end
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ def parse_file(fname, prefix_out)
|
|||
# output solidified
|
||||
var fname_h = string.split(fname, '.be')[0] + '.h' # take whatever is before the first '.be'
|
||||
var fout = open(prefix_out + "solidified_" + fname_h, "w")
|
||||
fout.write(string.format("/* Solidification of %s */\n", fname_h))
|
||||
fout.write(format("/* Solidification of %s */\n", fname_h))
|
||||
fout.write("/********************************************************************\\\n")
|
||||
fout.write("* Generated code, don't edit *\n")
|
||||
fout.write("\\********************************************************************/\n")
|
||||
|
|
|
@ -23,7 +23,7 @@ autoconf_module.init = def (m)
|
|||
if string.find(dir[i], ".autoconf") > 0 # does the file contain '*.autoconf', >0 to skip `.autoconf`
|
||||
if entry != nil
|
||||
# we have multiple configuration files, not allowed
|
||||
tasmota.log(string.format("CFG: multiple autoconf files found, aborting ('%s' + '%s')", entry, dir[i]), 2)
|
||||
tasmota.log(format("CFG: multiple autoconf files found, aborting ('%s' + '%s')", entry, dir[i]), 2)
|
||||
self._error = true
|
||||
return nil
|
||||
end
|
||||
|
@ -88,24 +88,23 @@ autoconf_module.init = def (m)
|
|||
# Load templates from Github
|
||||
#####################################################################################################
|
||||
def load_templates()
|
||||
import string
|
||||
import json
|
||||
try
|
||||
var url = string.format("https://raw.githubusercontent.com/tasmota/autoconf/main/%s_manifest.json", tasmota.arch())
|
||||
tasmota.log(string.format("CFG: loading '%s'", url), 3)
|
||||
var url = format("https://raw.githubusercontent.com/tasmota/autoconf/main/%s_manifest.json", tasmota.arch())
|
||||
tasmota.log(format("CFG: loading '%s'", url), 3)
|
||||
# load the template
|
||||
var cl = webclient()
|
||||
cl.begin(url)
|
||||
var r = cl.GET()
|
||||
if r != 200
|
||||
tasmota.log(string.format("CFG: return_code=%i", r), 2)
|
||||
tasmota.log(format("CFG: return_code=%i", r), 2)
|
||||
return nil
|
||||
end
|
||||
var s = cl.get_string()
|
||||
cl.close()
|
||||
# convert to json
|
||||
var j = json.load(s)
|
||||
tasmota.log(string.format("CFG: loaded '%s'", str(j)), 3)
|
||||
tasmota.log(format("CFG: loaded '%s'", str(j)), 3)
|
||||
|
||||
var t = j.find("files")
|
||||
if isinstance(t, list)
|
||||
|
@ -114,7 +113,7 @@ autoconf_module.init = def (m)
|
|||
|
||||
return nil
|
||||
except .. as e, m
|
||||
tasmota.log(string.format("CFG: exception '%s' - '%s'", e, m), 2)
|
||||
tasmota.log(format("CFG: exception '%s' - '%s'", e, m), 2)
|
||||
return nil
|
||||
end
|
||||
end
|
||||
|
@ -143,8 +142,8 @@ autoconf_module.init = def (m)
|
|||
var cur_module_display = cur_module ? string.tr(self.get_current_module_name(), "_", " ") : self._error ? "<Error: apply new or remove>" : "<None>"
|
||||
|
||||
webserver.content_send("<fieldset><style>.bdis{background:#888;}.bdis:hover{background:#888;}</style>")
|
||||
webserver.content_send(string.format("<legend><b title='Autoconfiguration'> Current auto-configuration</b></legend>"))
|
||||
webserver.content_send(string.format("<p>Current configuration: </p><p><b>%s</b></p>", cur_module_display))
|
||||
webserver.content_send(format("<legend><b title='Autoconfiguration'> Current auto-configuration</b></legend>"))
|
||||
webserver.content_send(format("<p>Current configuration: </p><p><b>%s</b></p>", cur_module_display))
|
||||
|
||||
if cur_module
|
||||
# add button to reapply template
|
||||
|
@ -156,7 +155,7 @@ autoconf_module.init = def (m)
|
|||
webserver.content_send("<p></p></fieldset><p></p>")
|
||||
|
||||
webserver.content_send("<fieldset><style>.bdis{background:#888;}.bdis:hover{background:#888;}</style>")
|
||||
webserver.content_send(string.format("<legend><b title='New autoconf'> Select new auto-configuration</b></legend>"))
|
||||
webserver.content_send(format("<legend><b title='New autoconf'> Select new auto-configuration</b></legend>"))
|
||||
|
||||
webserver.content_send("<p><form id=zip style='display: block;' action='/ac' method='post' ")
|
||||
webserver.content_send("onsubmit='return confirm(\"This will change the current configuration and cause a restart.\");'>")
|
||||
|
@ -166,13 +165,13 @@ autoconf_module.init = def (m)
|
|||
var templates = self.load_templates()
|
||||
webserver.content_send("<option value='reset'><Remove autoconf></option>")
|
||||
for t:templates
|
||||
webserver.content_send(string.format("<option value='%s'>%s</option>", t, string.tr(t, "_", " ")))
|
||||
webserver.content_send(format("<option value='%s'>%s</option>", t, string.tr(t, "_", " ")))
|
||||
end
|
||||
|
||||
webserver.content_send("</select><p></p>")
|
||||
|
||||
webserver.content_send("<button name='zipapply' class='button bgrn'>Apply configuration</button>")
|
||||
# webserver.content_send(string.format("<input name='ota' type='hidden' value='%d'>", ota_num))
|
||||
# webserver.content_send(format("<input name='ota' type='hidden' value='%d'>", ota_num))
|
||||
webserver.content_send("</form></p>")
|
||||
|
||||
|
||||
|
@ -189,7 +188,6 @@ autoconf_module.init = def (m)
|
|||
# This HTTP POST manager handles the submitted web form data
|
||||
def page_autoconf_ctl()
|
||||
import webserver
|
||||
import string
|
||||
import path
|
||||
if !webserver.check_privileged_access() return nil end
|
||||
|
||||
|
@ -211,16 +209,16 @@ autoconf_module.init = def (m)
|
|||
var arch_name = webserver.arg("zip")
|
||||
|
||||
if arch_name != "reset"
|
||||
var url = string.format("https://raw.githubusercontent.com/tasmota/autoconf/main/%s/%s.autoconf", tasmota.arch(), arch_name)
|
||||
tasmota.log(string.format("CFG: downloading '%s'", url), 2);
|
||||
var url = format("https://raw.githubusercontent.com/tasmota/autoconf/main/%s/%s.autoconf", tasmota.arch(), arch_name)
|
||||
tasmota.log(format("CFG: downloading '%s'", url), 2);
|
||||
|
||||
var local_file = string.format("%s.autoconf", arch_name)
|
||||
var local_file = format("%s.autoconf", arch_name)
|
||||
|
||||
# download file and write directly to file system
|
||||
var cl = webclient()
|
||||
cl.begin(url)
|
||||
var r = cl.GET()
|
||||
if r != 200 raise "connection_error", string.format("return code=%i", r) end
|
||||
if r != 200 raise "connection_error", format("return code=%i", r) end
|
||||
cl.write_file(local_file)
|
||||
cl.close()
|
||||
end
|
||||
|
@ -234,12 +232,12 @@ autoconf_module.init = def (m)
|
|||
raise "value_error", "Unknown command"
|
||||
end
|
||||
except .. as e, m
|
||||
print(string.format("CFG: Exception> '%s' - %s", e, m))
|
||||
print(format("CFG: Exception> '%s' - %s", e, m))
|
||||
#- display error page -#
|
||||
webserver.content_start("Parameter error") #- title of the web page -#
|
||||
webserver.content_send_style() #- send standard Tasmota styles -#
|
||||
|
||||
webserver.content_send(string.format("<p style='width:340px;'><b>Exception:</b><br>'%s'<br>%s</p>", e, m))
|
||||
webserver.content_send(format("<p style='width:340px;'><b>Exception:</b><br>'%s'<br>%s</p>", e, m))
|
||||
|
||||
webserver.content_button(webserver.BUTTON_CONFIGURATION) #- button back to management page -#
|
||||
webserver.content_stop() #- end of web page -#
|
||||
|
@ -268,7 +266,7 @@ autoconf_module.init = def (m)
|
|||
var fname = dir[i]
|
||||
if string.find(fname, ".autoconf") > 0 # does the file contain '*.autoconf'
|
||||
path.remove(fname)
|
||||
print(string.format("CFG: removed file '%s'", fname))
|
||||
print(format("CFG: removed file '%s'", fname))
|
||||
end
|
||||
i += 1
|
||||
end
|
||||
|
@ -300,7 +298,6 @@ autoconf_module.init = def (m)
|
|||
# load and run `<fname>.bat` file as Tasmota commands
|
||||
#####################################################################################################
|
||||
def run_bat(fname) # read a '*.bat' file and run each command
|
||||
import string
|
||||
var f
|
||||
try
|
||||
f = open(fname, "r") # open file in read-only mode, it is expected to exist
|
||||
|
@ -315,7 +312,7 @@ autoconf_module.init = def (m)
|
|||
end
|
||||
f.close() # close, we don't expect exception with read-only, could be added later though
|
||||
except .. as e, m
|
||||
tasmota.log(string.format('CFG: could not run %s (%s - %s)', fname, e, m), 1)
|
||||
tasmota.log(format('CFG: could not run %s (%s - %s)', fname, e, m), 1)
|
||||
if f != nil f.close() end
|
||||
end
|
||||
end
|
||||
|
@ -368,7 +365,7 @@ autoconf_module.init = def (m)
|
|||
reboot = true
|
||||
tasmota.log("CFG: 'display.ini' extracted, restarting", 2)
|
||||
except .. as e, m
|
||||
print(string.format("CFG: could not copy 'display.ini' (%s - %s)'", e, m))
|
||||
print(format("CFG: could not copy 'display.ini' (%s - %s)'", e, m))
|
||||
if f != nil f.close() end
|
||||
if f_out != nil f_out.close() end
|
||||
end
|
||||
|
|
|
@ -60,7 +60,6 @@ hue_bridge.init = def (m)
|
|||
def discover()
|
||||
import hue_ntv
|
||||
import json
|
||||
import string
|
||||
|
||||
var fragments = [] # store json elements
|
||||
for id: self.lights.keys()
|
||||
|
|
|
@ -159,8 +159,7 @@ class AXP192 : I2C_Driver
|
|||
#- display sensor value in the web UI -#
|
||||
def web_sensor()
|
||||
if !self.wire return nil end #- exit if not initialized -#
|
||||
import string
|
||||
var msg = string.format(
|
||||
var msg = format(
|
||||
"{s}VBus Voltage{m}%.3f V{e}"..
|
||||
"{s}VBus Current{m}%.1f mA{e}"..
|
||||
"{s}Batt Voltage{m}%.3f V{e}"..
|
||||
|
@ -178,8 +177,7 @@ class AXP192 : I2C_Driver
|
|||
#- add sensor value to teleperiod -#
|
||||
def json_append()
|
||||
if !self.wire return nil end #- exit if not initialized -#
|
||||
import string
|
||||
var msg = string.format(",\"AXP192\":{\"VBusVoltage\":%.3f,\"VBusCurrent\":%.1f,\"BattVoltage\":%.3f,\"BattCurrent\":%.1f,\"Temperature\":%.1f}",
|
||||
var msg = format(",\"AXP192\":{\"VBusVoltage\":%.3f,\"VBusCurrent\":%.1f,\"BattVoltage\":%.3f,\"BattCurrent\":%.1f,\"Temperature\":%.1f}",
|
||||
self.get_vbus_voltage(), self.get_vbus_voltage(),
|
||||
self.get_bat_voltage(), self.get_bat_current(),
|
||||
#self.get_bat_power(),
|
||||
|
|
|
@ -163,8 +163,7 @@ class AXP202 : I2C_Driver
|
|||
# #- display sensor value in the web UI -#
|
||||
# def web_sensor()
|
||||
# if !self.wire return nil end #- exit if not initialized -#
|
||||
# import string
|
||||
# var msg = string.format(
|
||||
# var msg = format(
|
||||
# "{s}VBus Voltage{m}%.3f V{e}"..
|
||||
# "{s}VBus Current{m}%.1f mA{e}"..
|
||||
# "{s}Batt Voltage{m}%.3f V{e}"..
|
||||
|
@ -182,11 +181,10 @@ class AXP202 : I2C_Driver
|
|||
# #- add sensor value to teleperiod -#
|
||||
# def json_append()
|
||||
# if !self.wire return nil end #- exit if not initialized -#
|
||||
# # import string
|
||||
# # var ax = int(self.accel[0] * 1000)
|
||||
# # var ay = int(self.accel[1] * 1000)
|
||||
# # var az = int(self.accel[2] * 1000)
|
||||
# # var msg = string.format(",\"MPU6886\":{\"AX\":%i,\"AY\":%i,\"AZ\":%i,\"GX\":%i,\"GY\":%i,\"GZ\":%i}",
|
||||
# # var msg = format(",\"MPU6886\":{\"AX\":%i,\"AY\":%i,\"AZ\":%i,\"GX\":%i,\"GY\":%i,\"GZ\":%i}",
|
||||
# # ax, ay, az, self.gyro[0], self.gyro[1], self.gyro[2])
|
||||
# # tasmota.response_append(msg)
|
||||
# end
|
||||
|
|
|
@ -37,9 +37,8 @@ class lv_clock: lv_label
|
|||
end
|
||||
|
||||
def set_time(hour, minute, sec)
|
||||
import string
|
||||
if hour != self.hour || minute != self.minute || sec != self.sec
|
||||
var txt = string.format("%02d%s%02d", hour, sec % 2 ? ":" : " ", minute)
|
||||
var txt = format("%02d%s%02d", hour, sec % 2 ? ":" : " ", minute)
|
||||
self.hour = hour
|
||||
self.minute = minute
|
||||
self.sec = sec
|
||||
|
|
|
@ -46,8 +46,7 @@ class MQTT : MQTT_ntv
|
|||
end
|
||||
|
||||
def tostring()
|
||||
import string
|
||||
return string.format("<instance: %s('%s')>", classname(self), self.fulltopic)
|
||||
return format("<instance: %s('%s')>", classname(self), self.fulltopic)
|
||||
end
|
||||
|
||||
def mqtt_data(topic, idx, payload_s, payload_b)
|
||||
|
|
|
@ -76,8 +76,7 @@ class Partition_info
|
|||
|
||||
# elif magic == 0xEBEB #- MD5 -#
|
||||
else
|
||||
import string
|
||||
raise "internal_error", string.format("invalid magic number %02X", magic)
|
||||
raise "internal_error", format("invalid magic number %02X", magic)
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -121,11 +120,11 @@ class Partition_info
|
|||
|
||||
var seg_num = 0
|
||||
while seg_num < seg_count
|
||||
# print(string.format("Reading 0x%08X", seg_offset))
|
||||
# print(format("Reading 0x%08X", seg_offset))
|
||||
var segment_header = flash.read(seg_offset - 8, 8)
|
||||
var seg_start_addr = segment_header.get(0, 4)
|
||||
var seg_size = segment_header.get(4,4)
|
||||
# print(string.format("Segment %i: flash_offset=0x%08X start_addr=0x%08X sz=0x%08X", seg_num, seg_offset, seg_start_addr, seg_size))
|
||||
# print(format("Segment %i: flash_offset=0x%08X start_addr=0x%08X sz=0x%08X", seg_num, seg_offset, seg_start_addr, seg_size))
|
||||
|
||||
seg_offset += seg_size + 8 # add segment_length + sizeof(esp_image_segment_header_t)
|
||||
if seg_offset >= (addr + sz) return -1 end
|
||||
|
@ -134,7 +133,7 @@ class Partition_info
|
|||
end
|
||||
var total_size = seg_offset - addr + 1 # add 1KB for safety
|
||||
|
||||
# print(string.format("Total size = %i KB", total_size/1024))
|
||||
# print(format("Total size = %i KB", total_size/1024))
|
||||
|
||||
return total_size
|
||||
except .. as e, m
|
||||
|
@ -147,8 +146,7 @@ class Partition_info
|
|||
if self.type == 0 return "app"
|
||||
elif self.type == 1 return "data"
|
||||
end
|
||||
import string
|
||||
return string.format("0x%02X", self.type)
|
||||
return format("0x%02X", self.type)
|
||||
end
|
||||
|
||||
def subtype_to_string()
|
||||
|
@ -169,22 +167,20 @@ class Partition_info
|
|||
elif self.subtype == 0x82 return "spiffs"
|
||||
end
|
||||
end
|
||||
import string
|
||||
return string.format("0x%02X", self.subtype)
|
||||
return format("0x%02X", self.subtype)
|
||||
end
|
||||
|
||||
# Human readable version of Partition information
|
||||
# this method is not included in the solidified version to save space,
|
||||
# it is included only in the optional application `tapp` version
|
||||
def tostring()
|
||||
import string
|
||||
var type_s = self.type_to_string()
|
||||
var subtype_s = self.subtype_to_string()
|
||||
|
||||
# reformat strings
|
||||
if type_s != "" type_s = " (" + type_s + ")" end
|
||||
if subtype_s != "" subtype_s = " (" + subtype_s + ")" end
|
||||
return string.format("<instance: Partition_info(%d%s,%d%s,0x%08X,0x%08X,'%s',0x%X)>",
|
||||
return format("<instance: Partition_info(%d%s,%d%s,0x%08X,0x%08X,'%s',0x%X)>",
|
||||
self.type, type_s,
|
||||
self.subtype, subtype_s,
|
||||
self.start, self.sz,
|
||||
|
@ -361,8 +357,7 @@ class Partition_otadata
|
|||
|
||||
# Produce a human-readable representation of the object with relevant information
|
||||
def tostring()
|
||||
import string
|
||||
return string.format("<instance: Partition_otadata(ota_active:%s, ota_seq=[%d,%d], ota_max=%d)>",
|
||||
return format("<instance: Partition_otadata(ota_active:%s, ota_seq=[%d,%d], ota_max=%d)>",
|
||||
self.active_otadata >= 0 ? "ota_" + str(self.active_otadata) : "factory",
|
||||
self.seq0, self.seq1, self.maxota)
|
||||
end
|
||||
|
@ -552,7 +547,6 @@ class Partition
|
|||
var flash_definition_sector = self.get_flash_definition_sector()
|
||||
if (flash_size_k != flash_size_real_k) && flash_definition_sector != nil
|
||||
import flash
|
||||
import string
|
||||
|
||||
flash_size_k = flash_size_real_k # try to expand the flash size definition
|
||||
|
||||
|
@ -576,7 +570,7 @@ class Partition
|
|||
var old_def = flash_def[3]
|
||||
flash_def[3] = (flash_def[3] & 0x0F) | flash_size_code
|
||||
flash.write(flash_definition_sector, flash_def)
|
||||
tasmota.log(string.format("UPL: changing flash definition from 0x02X to 0x%02X", old_def, flash_def[3]), 3)
|
||||
tasmota.log(format("UPL: changing flash definition from 0x02X to 0x%02X", old_def, flash_def[3]), 3)
|
||||
else
|
||||
raise "internal_error", "wrong flash size "+str(flash_size_real_m)
|
||||
end
|
||||
|
@ -586,12 +580,11 @@ class Partition
|
|||
# Called at first boot
|
||||
# Try to expand FS to max of flash size
|
||||
def resize_fs_to_max()
|
||||
import string
|
||||
try
|
||||
var unallocated = self.get_unallocated_k()
|
||||
if unallocated <= 0 return nil end
|
||||
|
||||
tasmota.log(string.format("BRY: Trying to expand FS by %i kB", unallocated), 2)
|
||||
tasmota.log(format("BRY: Trying to expand FS by %i kB", unallocated), 2)
|
||||
|
||||
self.resize_max_flash_size_k() # resize if needed
|
||||
# since unallocated succeeded, we know the last slot is FS
|
||||
|
@ -604,7 +597,7 @@ class Partition
|
|||
tasmota.global.restart_flag = 2
|
||||
tasmota.log("BRY: Successfully resized FS, restarting", 2)
|
||||
except .. as e, m
|
||||
tasmota.log(string.format("BRY: Exception> '%s' - %s", e, m), 2)
|
||||
tasmota.log(format("BRY: Exception> '%s' - %s", e, m), 2)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ tapp_module.init = def (m)
|
|||
|
||||
for d: dir
|
||||
if string.find(d, ".tapp") > 0
|
||||
tasmota.log(string.format("TAP: Loaded Tasmota App '%s'", d), 2)
|
||||
tasmota.log(format("TAP: Loaded Tasmota App '%s'", d), 2)
|
||||
tasmota.load(d + "#autoexec.be")
|
||||
end
|
||||
end
|
||||
|
|
|
@ -336,9 +336,8 @@ class Tasmota
|
|||
end
|
||||
|
||||
def time_str(time)
|
||||
import string
|
||||
var tm = self.time_dump(time)
|
||||
return string.format("%04d-%02d-%02dT%02d:%02d:%02d", tm['year'], tm['month'], tm['day'], tm['hour'], tm['min'], tm['sec'])
|
||||
return format("%04d-%02d-%02dT%02d:%02d:%02d", tm['year'], tm['month'], tm['day'], tm['hour'], tm['min'], tm['sec'])
|
||||
end
|
||||
|
||||
def load(f)
|
||||
|
@ -376,8 +375,7 @@ class Tasmota
|
|||
f.close()
|
||||
except .. as e
|
||||
if f != nil f.close() end
|
||||
import string
|
||||
print(string.format('BRY: failed to load compiled \'%s\' (%s)',fname_bec,e))
|
||||
print(format('BRY: failed to load compiled \'%s\' (%s)',fname_bec,e))
|
||||
end
|
||||
return nil
|
||||
end
|
||||
|
@ -399,8 +397,7 @@ class Tasmota
|
|||
var compiled = compile(f_name, 'file')
|
||||
return compiled
|
||||
except .. as e, m
|
||||
import string
|
||||
print(string.format('BRY: failed to load \'%s\' (%s - %s)',f_name,e,m))
|
||||
print(format('BRY: failed to load \'%s\' (%s - %s)',f_name,e,m))
|
||||
end
|
||||
return nil
|
||||
end
|
||||
|
@ -413,8 +410,7 @@ class Tasmota
|
|||
compiled_code()
|
||||
return true
|
||||
except .. as e, m
|
||||
import string
|
||||
print(string.format("BRY: failed to run compiled code '%s' - %s", e, m))
|
||||
print(format("BRY: failed to run compiled code '%s' - %s", e, m))
|
||||
end
|
||||
end
|
||||
return false
|
||||
|
@ -487,10 +483,10 @@ class Tasmota
|
|||
var bec_version = try_get_bec_version(f_name_bec)
|
||||
var version_ok = true
|
||||
if bec_version == nil
|
||||
print(string.format('BRY: corrupt bytecode \'%s\'',f_name_bec))
|
||||
print(format('BRY: corrupt bytecode \'%s\'',f_name_bec))
|
||||
version_ok = false
|
||||
elif bec_version != 0x04 # -- this is the currenlty supported version
|
||||
print(string.format('BRY: bytecode has wrong version \'%s\' (%i)',f_name_bec,bec_version))
|
||||
print(format('BRY: bytecode has wrong version \'%s\' (%i)',f_name_bec,bec_version))
|
||||
version_ok = false
|
||||
end
|
||||
|
||||
|
@ -516,7 +512,7 @@ class Tasmota
|
|||
try
|
||||
self.save(f_name_bec, compiled_code)
|
||||
except .. as e
|
||||
print(string.format('BRY: could not save compiled file %s (%s)',f_name_bec,e))
|
||||
print(format('BRY: could not save compiled file %s (%s)',f_name_bec,e))
|
||||
end
|
||||
end
|
||||
# call the compiled code
|
||||
|
@ -566,7 +562,6 @@ class Tasmota
|
|||
|
||||
def event(event_type, cmd, idx, payload, raw)
|
||||
import introspect
|
||||
import string
|
||||
if event_type=='every_50ms'
|
||||
self.run_deferred()
|
||||
end #- first run deferred events -#
|
||||
|
@ -596,7 +591,7 @@ class Tasmota
|
|||
done = f(d, cmd, idx, payload, raw) || done
|
||||
if done && !keep_going break end
|
||||
except .. as e,m
|
||||
print(string.format("BRY: Exception> '%s' - %s", e, m))
|
||||
print(format("BRY: Exception> '%s' - %s", e, m))
|
||||
if self._debug_present
|
||||
import debug
|
||||
debug.traceback()
|
||||
|
|
|
@ -20,8 +20,7 @@ class Trigger
|
|||
end
|
||||
|
||||
def tostring()
|
||||
import string
|
||||
return string.format("<instance: %s(%s, %s, %s)", str(classof(self)),
|
||||
return format("<instance: %s(%s, %s, %s)", str(classof(self)),
|
||||
str(self.trig), str(self.f), str(self.id))
|
||||
end
|
||||
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
#@ solidify:uuid
|
||||
uuid = module("uuid")
|
||||
uuid.uuid4 = def ()
|
||||
import string
|
||||
import math
|
||||
return string.format("%08x-%04x-%04x-%04x-%04x%08x",
|
||||
return format("%08x-%04x-%04x-%04x-%04x%08x",
|
||||
math.rand(),
|
||||
math.rand() & 0xFFFF,
|
||||
math.rand() & 0x0FFF | 0x4000,
|
||||
|
|
|
@ -5,10 +5,9 @@ class zb_device
|
|||
|
||||
def tostring()
|
||||
import json
|
||||
import string
|
||||
|
||||
var la = self.longaddr # bytes() of size 8, little-endian
|
||||
return string.format("<instance: %s(0x%04X, 0x%08X%08X, name:'%s', model:'%s', manufacturer:'%s')>",
|
||||
return format("<instance: %s(0x%04X, 0x%08X%08X, name:'%s', model:'%s', manufacturer:'%s')>",
|
||||
classname(self), self.shortaddr,
|
||||
la.get(4,4), la.get(0,4),
|
||||
self.name, self.model, self.manufacturer)
|
||||
|
|
|
@ -49,7 +49,6 @@ class zb_coord : zb_coord_ntv
|
|||
if self._handlers == nil return end
|
||||
|
||||
import introspect
|
||||
import string
|
||||
|
||||
var frame
|
||||
var attr_list
|
||||
|
@ -61,7 +60,7 @@ class zb_coord : zb_coord_ntv
|
|||
attr_list = self.zcl_attribute_list(zcl_attribute_list_ptr)
|
||||
end
|
||||
|
||||
#print(string.format(">ZIG: cmd=%s data_type=%s data=%s idx=%i", event_type, data_type, str(data), idx))
|
||||
#print(format(">ZIG: cmd=%s data_type=%s data=%s idx=%i", event_type, data_type, str(data), idx))
|
||||
|
||||
var i = 0
|
||||
while i < size(self._handlers)
|
||||
|
@ -71,7 +70,7 @@ class zb_coord : zb_coord_ntv
|
|||
try
|
||||
f(h, event_type, frame, attr_list, idx)
|
||||
except .. as e,m
|
||||
print(string.format("BRY: Exception> '%s' - %s", e, m))
|
||||
print(format("BRY: Exception> '%s' - %s", e, m))
|
||||
if tasmota._debug_present
|
||||
import debug
|
||||
debug.traceback()
|
||||
|
|
|
@ -103,7 +103,6 @@ class zcl_attribute : zcl_attribute_ntv
|
|||
end
|
||||
|
||||
def key_tostring()
|
||||
import string
|
||||
var s = "<undefined>"
|
||||
|
||||
var key = self.key
|
||||
|
@ -113,12 +112,12 @@ class zcl_attribute : zcl_attribute_ntv
|
|||
s += str(self.key_suffix)
|
||||
end
|
||||
elif (self.cluster != nil) && (self.attr_id != nil)
|
||||
s = string.format("%04X/%04X", self.cluster, self.attr_id)
|
||||
s = format("%04X/%04X", self.cluster, self.attr_id)
|
||||
if self.key_suffix > 1
|
||||
s += "+" + str(self.key_suffix)
|
||||
end
|
||||
elif (self.cluster != nil) && (self.cmd != nil) && (self.direction != nil)
|
||||
s = string.format("%04X%s%02X", self.cluster, self.direction ? "?" : "!" ,self.cmd)
|
||||
s = format("%04X%s%02X", self.cluster, self.direction ? "?" : "!" ,self.cmd)
|
||||
if self.key_suffix > 1
|
||||
s += "+" + str(self.key_suffix)
|
||||
end
|
||||
|
@ -130,7 +129,6 @@ class zcl_attribute : zcl_attribute_ntv
|
|||
def tostring()
|
||||
import introspect
|
||||
import json
|
||||
import string
|
||||
|
||||
var s = json.dump(self.key_tostring())
|
||||
s += ":"
|
||||
|
@ -142,8 +140,8 @@ class zcl_attribute : zcl_attribute_ntv
|
|||
|
||||
if (self.cluster != nil) && (self.attr_id != nil) && (self.key != nil)
|
||||
# we have an alias
|
||||
var key_alias = string.format("(%s)", self.key_tostring())
|
||||
s += string.format(',%s:"%04X/%04X"', json.dump(key_alias), self.cluster, self.attr_id)
|
||||
var key_alias = format("(%s)", self.key_tostring())
|
||||
s += format(',%s:"%04X/%04X"', json.dump(key_alias), self.cluster, self.attr_id)
|
||||
end
|
||||
|
||||
return s
|
||||
|
@ -200,7 +198,6 @@ class zcl_attribute_list : zcl_attribute_list_ntv
|
|||
end
|
||||
|
||||
def tostring()
|
||||
import string
|
||||
import json
|
||||
|
||||
var items = []
|
||||
|
@ -208,11 +205,11 @@ class zcl_attribute_list : zcl_attribute_list_ntv
|
|||
|
||||
# shortaddr
|
||||
if self.shortaddr != nil
|
||||
items.push(string.format('"Device":"0x%04X"', self.shortaddr))
|
||||
items.push(format('"Device":"0x%04X"', self.shortaddr))
|
||||
end
|
||||
# groupaddr
|
||||
if self.groupaddr != nil
|
||||
items.push(string.format('"Group":"0x%04X"', self.groupaddr))
|
||||
items.push(format('"Group":"0x%04X"', self.groupaddr))
|
||||
end
|
||||
|
||||
# attributes
|
||||
|
@ -226,18 +223,18 @@ class zcl_attribute_list : zcl_attribute_list_ntv
|
|||
|
||||
# Endpoint
|
||||
if self.src_ep != nil
|
||||
items.push(string.format('"Endpoint":%i', self.src_ep))
|
||||
items.push(format('"Endpoint":%i', self.src_ep))
|
||||
end
|
||||
|
||||
# LQI
|
||||
if self.lqi != nil
|
||||
items.push(string.format('"LinkQuality":%i', self.lqi))
|
||||
items.push(format('"LinkQuality":%i', self.lqi))
|
||||
end
|
||||
|
||||
var s = "{" + items.concat(",") + "}"
|
||||
return s
|
||||
|
||||
# return string.format("shortaddr:0x%04X groupaddr:0x%04X %s", self.shortaddr, self.groupaddr, str(self.attr_list))
|
||||
# return format("shortaddr:0x%04X groupaddr:0x%04X %s", self.shortaddr, self.groupaddr, str(self.attr_list))
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -266,7 +263,6 @@ class zcl_attributes
|
|||
end
|
||||
|
||||
def tostring()
|
||||
import string
|
||||
import json
|
||||
|
||||
var items = []
|
||||
|
@ -274,11 +270,11 @@ class zcl_attributes
|
|||
|
||||
# shortaddr
|
||||
if self.shortaddr != nil
|
||||
items.push(string.format('"Device":"0x%04X"', self.shortaddr))
|
||||
items.push(format('"Device":"0x%04X"', self.shortaddr))
|
||||
end
|
||||
# groupaddr
|
||||
if self.shortaddr != nil
|
||||
items.push(string.format('"Group":"0x%04X"', self.groupaddr))
|
||||
items.push(format('"Group":"0x%04X"', self.groupaddr))
|
||||
end
|
||||
|
||||
# attributes
|
||||
|
@ -288,18 +284,18 @@ class zcl_attributes
|
|||
|
||||
# Endpoint
|
||||
if self.src_ep != nil
|
||||
items.push(string.format('"Endpoint":%i', self.src_ep))
|
||||
items.push(format('"Endpoint":%i', self.src_ep))
|
||||
end
|
||||
|
||||
# Endpoint
|
||||
if self.lqi != nil
|
||||
items.push(string.format('"LinkQuality":%i', self.lqi))
|
||||
items.push(format('"LinkQuality":%i', self.lqi))
|
||||
end
|
||||
|
||||
var s = "{" + items.concat(",") + "}"
|
||||
return s
|
||||
|
||||
# return string.format("shortaddr:0x%04X groupaddr:0x%04X %s", self.shortaddr, self.groupaddr, str(self.attr_list))
|
||||
# return format("shortaddr:0x%04X groupaddr:0x%04X %s", self.shortaddr, self.groupaddr, str(self.attr_list))
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -30,9 +30,8 @@ class zcl_frame : zcl_frame_ntv
|
|||
end
|
||||
|
||||
def tomap()
|
||||
import string
|
||||
var m = super(self).tomap()
|
||||
m["shortaddr_hex"] = string.format("0x%04X", self.shortaddr)
|
||||
m["shortaddr_hex"] = format("0x%04X", self.shortaddr)
|
||||
m["payload"] = self.payload # add payload object which is a synthetic attribute not included in tomap()
|
||||
return m
|
||||
end
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -243,7 +243,7 @@ be_local_closure(hue_bridge_monad_init, /* name */
|
|||
********************************************************************/
|
||||
be_local_closure(hue_bridge_monad_discover, /* name */
|
||||
be_nested_proto(
|
||||
11, /* nstack */
|
||||
10, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
|
@ -251,64 +251,62 @@ be_local_closure(hue_bridge_monad_discover, /* name */
|
|||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[13]) { /* constants */
|
||||
( &(const bvalue[12]) { /* constants */
|
||||
/* K0 */ be_nested_str(hue_ntv),
|
||||
/* K1 */ be_nested_str(json),
|
||||
/* K2 */ be_nested_str(string),
|
||||
/* K3 */ be_nested_str(lights),
|
||||
/* K4 */ be_nested_str(keys),
|
||||
/* K5 */ be_nested_str(full_status),
|
||||
/* K6 */ be_nested_str(_X22),
|
||||
/* K7 */ be_nested_str(_X22_X3A),
|
||||
/* K8 */ be_nested_str(push),
|
||||
/* K9 */ be_nested_str(stop_iteration),
|
||||
/* K10 */ be_const_int(0),
|
||||
/* K11 */ be_nested_str(concat),
|
||||
/* K12 */ be_nested_str(_X2C),
|
||||
/* K2 */ be_nested_str(lights),
|
||||
/* K3 */ be_nested_str(keys),
|
||||
/* K4 */ be_nested_str(full_status),
|
||||
/* K5 */ be_nested_str(_X22),
|
||||
/* K6 */ be_nested_str(_X22_X3A),
|
||||
/* K7 */ be_nested_str(push),
|
||||
/* K8 */ be_nested_str(stop_iteration),
|
||||
/* K9 */ be_const_int(0),
|
||||
/* K10 */ be_nested_str(concat),
|
||||
/* K11 */ be_nested_str(_X2C),
|
||||
}),
|
||||
&be_const_str_discover,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[40]) { /* code */
|
||||
( &(const binstruction[39]) { /* code */
|
||||
0xA4060000, // 0000 IMPORT R1 K0
|
||||
0xA40A0200, // 0001 IMPORT R2 K1
|
||||
0xA40E0400, // 0002 IMPORT R3 K2
|
||||
0x60100012, // 0003 GETGBL R4 G18
|
||||
0x7C100000, // 0004 CALL R4 0
|
||||
0x60140010, // 0005 GETGBL R5 G16
|
||||
0x88180103, // 0006 GETMBR R6 R0 K3
|
||||
0x8C180D04, // 0007 GETMET R6 R6 K4
|
||||
0x7C180200, // 0008 CALL R6 1
|
||||
0x7C140200, // 0009 CALL R5 1
|
||||
0xA802000F, // 000A EXBLK 0 #001B
|
||||
0x5C180A00, // 000B MOVE R6 R5
|
||||
0x7C180000, // 000C CALL R6 0
|
||||
0x8C1C0105, // 000D GETMET R7 R0 K5
|
||||
0x5C240C00, // 000E MOVE R9 R6
|
||||
0x7C1C0400, // 000F CALL R7 2
|
||||
0x781E0008, // 0010 JMPF R7 #001A
|
||||
0x60200008, // 0011 GETGBL R8 G8
|
||||
0x5C240C00, // 0012 MOVE R9 R6
|
||||
0x7C200200, // 0013 CALL R8 1
|
||||
0x00220C08, // 0014 ADD R8 K6 R8
|
||||
0x00201107, // 0015 ADD R8 R8 K7
|
||||
0x001C1007, // 0016 ADD R7 R8 R7
|
||||
0x8C200908, // 0017 GETMET R8 R4 K8
|
||||
0x5C280E00, // 0018 MOVE R10 R7
|
||||
0x7C200400, // 0019 CALL R8 2
|
||||
0x7001FFEF, // 001A JMP #000B
|
||||
0x58140009, // 001B LDCONST R5 K9
|
||||
0xAC140200, // 001C CATCH R5 1 0
|
||||
0xB0080000, // 001D RAISE 2 R0 R0
|
||||
0x6014000C, // 001E GETGBL R5 G12
|
||||
0x5C180800, // 001F MOVE R6 R4
|
||||
0x7C140200, // 0020 CALL R5 1
|
||||
0x24140B0A, // 0021 GT R5 R5 K10
|
||||
0x78160003, // 0022 JMPF R5 #0027
|
||||
0x8C14090B, // 0023 GETMET R5 R4 K11
|
||||
0x581C000C, // 0024 LDCONST R7 K12
|
||||
0x7C140400, // 0025 CALL R5 2
|
||||
0x80040A00, // 0026 RET 1 R5
|
||||
0x80000000, // 0027 RET 0
|
||||
0x600C0012, // 0002 GETGBL R3 G18
|
||||
0x7C0C0000, // 0003 CALL R3 0
|
||||
0x60100010, // 0004 GETGBL R4 G16
|
||||
0x88140102, // 0005 GETMBR R5 R0 K2
|
||||
0x8C140B03, // 0006 GETMET R5 R5 K3
|
||||
0x7C140200, // 0007 CALL R5 1
|
||||
0x7C100200, // 0008 CALL R4 1
|
||||
0xA802000F, // 0009 EXBLK 0 #001A
|
||||
0x5C140800, // 000A MOVE R5 R4
|
||||
0x7C140000, // 000B CALL R5 0
|
||||
0x8C180104, // 000C GETMET R6 R0 K4
|
||||
0x5C200A00, // 000D MOVE R8 R5
|
||||
0x7C180400, // 000E CALL R6 2
|
||||
0x781A0008, // 000F JMPF R6 #0019
|
||||
0x601C0008, // 0010 GETGBL R7 G8
|
||||
0x5C200A00, // 0011 MOVE R8 R5
|
||||
0x7C1C0200, // 0012 CALL R7 1
|
||||
0x001E0A07, // 0013 ADD R7 K5 R7
|
||||
0x001C0F06, // 0014 ADD R7 R7 K6
|
||||
0x00180E06, // 0015 ADD R6 R7 R6
|
||||
0x8C1C0707, // 0016 GETMET R7 R3 K7
|
||||
0x5C240C00, // 0017 MOVE R9 R6
|
||||
0x7C1C0400, // 0018 CALL R7 2
|
||||
0x7001FFEF, // 0019 JMP #000A
|
||||
0x58100008, // 001A LDCONST R4 K8
|
||||
0xAC100200, // 001B CATCH R4 1 0
|
||||
0xB0080000, // 001C RAISE 2 R0 R0
|
||||
0x6010000C, // 001D GETGBL R4 G12
|
||||
0x5C140600, // 001E MOVE R5 R3
|
||||
0x7C100200, // 001F CALL R4 1
|
||||
0x24100909, // 0020 GT R4 R4 K9
|
||||
0x78120003, // 0021 JMPF R4 #0026
|
||||
0x8C10070A, // 0022 GETMET R4 R3 K10
|
||||
0x5818000B, // 0023 LDCONST R6 K11
|
||||
0x7C100400, // 0024 CALL R4 2
|
||||
0x80040800, // 0025 RET 1 R4
|
||||
0x80000000, // 0026 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
|
|
|
@ -72,7 +72,7 @@ be_local_closure(AXP192_get_bat_power, /* name */
|
|||
1, /* has constants */
|
||||
( &(const bvalue[ 2]) { /* constants */
|
||||
/* K0 */ be_nested_str(read24),
|
||||
/* K1 */ be_const_real_hex(0x3A102DE0),
|
||||
/* K1 */ be_const_real_hex(0x3A102DE1),
|
||||
}),
|
||||
&be_const_str_get_bat_power,
|
||||
&be_const_str_solidified,
|
||||
|
@ -516,7 +516,7 @@ be_local_closure(AXP192_set_ldo_voltage, /* name */
|
|||
********************************************************************/
|
||||
be_local_closure(AXP192_json_append, /* name */
|
||||
be_nested_proto(
|
||||
11, /* nstack */
|
||||
9, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
|
@ -524,44 +524,41 @@ be_local_closure(AXP192_json_append, /* name */
|
|||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[10]) { /* constants */
|
||||
( &(const bvalue[ 8]) { /* constants */
|
||||
/* K0 */ be_nested_str(wire),
|
||||
/* K1 */ be_nested_str(string),
|
||||
/* K2 */ be_nested_str(format),
|
||||
/* K3 */ be_nested_str(_X2C_X22AXP192_X22_X3A_X7B_X22VBusVoltage_X22_X3A_X25_X2E3f_X2C_X22VBusCurrent_X22_X3A_X25_X2E1f_X2C_X22BattVoltage_X22_X3A_X25_X2E3f_X2C_X22BattCurrent_X22_X3A_X25_X2E1f_X2C_X22Temperature_X22_X3A_X25_X2E1f_X7D),
|
||||
/* K4 */ be_nested_str(get_vbus_voltage),
|
||||
/* K5 */ be_nested_str(get_bat_voltage),
|
||||
/* K6 */ be_nested_str(get_bat_current),
|
||||
/* K7 */ be_nested_str(get_temp),
|
||||
/* K8 */ be_nested_str(tasmota),
|
||||
/* K9 */ be_nested_str(response_append),
|
||||
/* K1 */ be_nested_str(_X2C_X22AXP192_X22_X3A_X7B_X22VBusVoltage_X22_X3A_X25_X2E3f_X2C_X22VBusCurrent_X22_X3A_X25_X2E1f_X2C_X22BattVoltage_X22_X3A_X25_X2E3f_X2C_X22BattCurrent_X22_X3A_X25_X2E1f_X2C_X22Temperature_X22_X3A_X25_X2E1f_X7D),
|
||||
/* K2 */ be_nested_str(get_vbus_voltage),
|
||||
/* K3 */ be_nested_str(get_bat_voltage),
|
||||
/* K4 */ be_nested_str(get_bat_current),
|
||||
/* K5 */ be_nested_str(get_temp),
|
||||
/* K6 */ be_nested_str(tasmota),
|
||||
/* K7 */ be_nested_str(response_append),
|
||||
}),
|
||||
&be_const_str_json_append,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[23]) { /* code */
|
||||
( &(const binstruction[22]) { /* code */
|
||||
0x88040100, // 0000 GETMBR R1 R0 K0
|
||||
0x74060001, // 0001 JMPT R1 #0004
|
||||
0x4C040000, // 0002 LDNIL R1
|
||||
0x80040200, // 0003 RET 1 R1
|
||||
0xA4060200, // 0004 IMPORT R1 K1
|
||||
0x8C080302, // 0005 GETMET R2 R1 K2
|
||||
0x58100003, // 0006 LDCONST R4 K3
|
||||
0x8C140104, // 0007 GETMET R5 R0 K4
|
||||
0x7C140200, // 0008 CALL R5 1
|
||||
0x8C180104, // 0009 GETMET R6 R0 K4
|
||||
0x7C180200, // 000A CALL R6 1
|
||||
0x8C1C0105, // 000B GETMET R7 R0 K5
|
||||
0x7C1C0200, // 000C CALL R7 1
|
||||
0x8C200106, // 000D GETMET R8 R0 K6
|
||||
0x7C200200, // 000E CALL R8 1
|
||||
0x8C240107, // 000F GETMET R9 R0 K7
|
||||
0x7C240200, // 0010 CALL R9 1
|
||||
0x7C080E00, // 0011 CALL R2 7
|
||||
0xB80E1000, // 0012 GETNGBL R3 K8
|
||||
0x8C0C0709, // 0013 GETMET R3 R3 K9
|
||||
0x5C140400, // 0014 MOVE R5 R2
|
||||
0x7C0C0400, // 0015 CALL R3 2
|
||||
0x80000000, // 0016 RET 0
|
||||
0x60040018, // 0004 GETGBL R1 G24
|
||||
0x58080001, // 0005 LDCONST R2 K1
|
||||
0x8C0C0102, // 0006 GETMET R3 R0 K2
|
||||
0x7C0C0200, // 0007 CALL R3 1
|
||||
0x8C100102, // 0008 GETMET R4 R0 K2
|
||||
0x7C100200, // 0009 CALL R4 1
|
||||
0x8C140103, // 000A GETMET R5 R0 K3
|
||||
0x7C140200, // 000B CALL R5 1
|
||||
0x8C180104, // 000C GETMET R6 R0 K4
|
||||
0x7C180200, // 000D CALL R6 1
|
||||
0x8C1C0105, // 000E GETMET R7 R0 K5
|
||||
0x7C1C0200, // 000F CALL R7 1
|
||||
0x7C040C00, // 0010 CALL R1 6
|
||||
0xB80A0C00, // 0011 GETNGBL R2 K6
|
||||
0x8C080507, // 0012 GETMET R2 R2 K7
|
||||
0x5C100200, // 0013 MOVE R4 R1
|
||||
0x7C080400, // 0014 CALL R2 2
|
||||
0x80000000, // 0015 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
|
@ -644,7 +641,7 @@ be_local_closure(AXP192_get_bat_current, /* name */
|
|||
********************************************************************/
|
||||
be_local_closure(AXP192_web_sensor, /* name */
|
||||
be_nested_proto(
|
||||
11, /* nstack */
|
||||
9, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
|
@ -652,51 +649,48 @@ be_local_closure(AXP192_web_sensor, /* name */
|
|||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[14]) { /* constants */
|
||||
( &(const bvalue[12]) { /* constants */
|
||||
/* K0 */ be_nested_str(wire),
|
||||
/* K1 */ be_nested_str(string),
|
||||
/* K2 */ be_nested_str(format),
|
||||
/* K3 */ be_nested_str(_X7Bs_X7DVBus_X20Voltage_X7Bm_X7D_X25_X2E3f_X20V_X7Be_X7D),
|
||||
/* K4 */ be_nested_str(_X7Bs_X7DVBus_X20Current_X7Bm_X7D_X25_X2E1f_X20mA_X7Be_X7D),
|
||||
/* K5 */ be_nested_str(_X7Bs_X7DBatt_X20Voltage_X7Bm_X7D_X25_X2E3f_X20V_X7Be_X7D),
|
||||
/* K6 */ be_nested_str(_X7Bs_X7DBatt_X20Current_X7Bm_X7D_X25_X2E1f_X20mA_X7Be_X7D),
|
||||
/* K7 */ be_nested_str(_X7Bs_X7DTemp_X20AXP_X7Bm_X7D_X25_X2E1f_X20_X26deg_X3BC_X7Be_X7D),
|
||||
/* K8 */ be_nested_str(get_vbus_voltage),
|
||||
/* K9 */ be_nested_str(get_bat_voltage),
|
||||
/* K10 */ be_nested_str(get_bat_current),
|
||||
/* K11 */ be_nested_str(get_temp),
|
||||
/* K12 */ be_nested_str(tasmota),
|
||||
/* K13 */ be_nested_str(web_send_decimal),
|
||||
/* K1 */ be_nested_str(_X7Bs_X7DVBus_X20Voltage_X7Bm_X7D_X25_X2E3f_X20V_X7Be_X7D),
|
||||
/* K2 */ be_nested_str(_X7Bs_X7DVBus_X20Current_X7Bm_X7D_X25_X2E1f_X20mA_X7Be_X7D),
|
||||
/* K3 */ be_nested_str(_X7Bs_X7DBatt_X20Voltage_X7Bm_X7D_X25_X2E3f_X20V_X7Be_X7D),
|
||||
/* K4 */ be_nested_str(_X7Bs_X7DBatt_X20Current_X7Bm_X7D_X25_X2E1f_X20mA_X7Be_X7D),
|
||||
/* K5 */ be_nested_str(_X7Bs_X7DTemp_X20AXP_X7Bm_X7D_X25_X2E1f_X20_X26deg_X3BC_X7Be_X7D),
|
||||
/* K6 */ be_nested_str(get_vbus_voltage),
|
||||
/* K7 */ be_nested_str(get_bat_voltage),
|
||||
/* K8 */ be_nested_str(get_bat_current),
|
||||
/* K9 */ be_nested_str(get_temp),
|
||||
/* K10 */ be_nested_str(tasmota),
|
||||
/* K11 */ be_nested_str(web_send_decimal),
|
||||
}),
|
||||
&be_const_str_web_sensor,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[26]) { /* code */
|
||||
( &(const binstruction[25]) { /* code */
|
||||
0x88040100, // 0000 GETMBR R1 R0 K0
|
||||
0x74060001, // 0001 JMPT R1 #0004
|
||||
0x4C040000, // 0002 LDNIL R1
|
||||
0x80040200, // 0003 RET 1 R1
|
||||
0xA4060200, // 0004 IMPORT R1 K1
|
||||
0x8C080302, // 0005 GETMET R2 R1 K2
|
||||
0x40120704, // 0006 CONNECT R4 K3 K4
|
||||
0x40100905, // 0007 CONNECT R4 R4 K5
|
||||
0x40100906, // 0008 CONNECT R4 R4 K6
|
||||
0x40100907, // 0009 CONNECT R4 R4 K7
|
||||
0x8C140108, // 000A GETMET R5 R0 K8
|
||||
0x7C140200, // 000B CALL R5 1
|
||||
0x8C180108, // 000C GETMET R6 R0 K8
|
||||
0x7C180200, // 000D CALL R6 1
|
||||
0x8C1C0109, // 000E GETMET R7 R0 K9
|
||||
0x7C1C0200, // 000F CALL R7 1
|
||||
0x8C20010A, // 0010 GETMET R8 R0 K10
|
||||
0x7C200200, // 0011 CALL R8 1
|
||||
0x8C24010B, // 0012 GETMET R9 R0 K11
|
||||
0x7C240200, // 0013 CALL R9 1
|
||||
0x7C080E00, // 0014 CALL R2 7
|
||||
0xB80E1800, // 0015 GETNGBL R3 K12
|
||||
0x8C0C070D, // 0016 GETMET R3 R3 K13
|
||||
0x5C140400, // 0017 MOVE R5 R2
|
||||
0x7C0C0400, // 0018 CALL R3 2
|
||||
0x80000000, // 0019 RET 0
|
||||
0x60040018, // 0004 GETGBL R1 G24
|
||||
0x400A0302, // 0005 CONNECT R2 K1 K2
|
||||
0x40080503, // 0006 CONNECT R2 R2 K3
|
||||
0x40080504, // 0007 CONNECT R2 R2 K4
|
||||
0x40080505, // 0008 CONNECT R2 R2 K5
|
||||
0x8C0C0106, // 0009 GETMET R3 R0 K6
|
||||
0x7C0C0200, // 000A CALL R3 1
|
||||
0x8C100106, // 000B GETMET R4 R0 K6
|
||||
0x7C100200, // 000C CALL R4 1
|
||||
0x8C140107, // 000D GETMET R5 R0 K7
|
||||
0x7C140200, // 000E CALL R5 1
|
||||
0x8C180108, // 000F GETMET R6 R0 K8
|
||||
0x7C180200, // 0010 CALL R6 1
|
||||
0x8C1C0109, // 0011 GETMET R7 R0 K9
|
||||
0x7C1C0200, // 0012 CALL R7 1
|
||||
0x7C040C00, // 0013 CALL R1 6
|
||||
0xB80A1400, // 0014 GETNGBL R2 K10
|
||||
0x8C08050B, // 0015 GETMET R2 R2 K11
|
||||
0x5C100200, // 0016 MOVE R4 R1
|
||||
0x7C080400, // 0017 CALL R2 2
|
||||
0x80000000, // 0018 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
|
|
|
@ -172,7 +172,7 @@ be_local_closure(AXP202_get_bat_power, /* name */
|
|||
1, /* has constants */
|
||||
( &(const bvalue[ 2]) { /* constants */
|
||||
/* K0 */ be_nested_str(read24),
|
||||
/* K1 */ be_const_real_hex(0x3A102DE0),
|
||||
/* K1 */ be_const_real_hex(0x3A102DE1),
|
||||
}),
|
||||
&be_const_str_get_bat_power,
|
||||
&be_const_str_solidified,
|
||||
|
|
|
@ -11,7 +11,7 @@ extern const bclass be_class_lv_clock;
|
|||
********************************************************************/
|
||||
be_local_closure(lv_clock_set_time, /* name */
|
||||
be_nested_proto(
|
||||
11, /* nstack */
|
||||
9, /* nstack */
|
||||
4, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
|
@ -19,48 +19,45 @@ be_local_closure(lv_clock_set_time, /* name */
|
|||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[10]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(string),
|
||||
/* K1 */ be_nested_str_weak(hour),
|
||||
/* K2 */ be_nested_str_weak(minute),
|
||||
/* K3 */ be_nested_str_weak(sec),
|
||||
/* K4 */ be_nested_str_weak(format),
|
||||
/* K5 */ be_nested_str_weak(_X2502d_X25s_X2502d),
|
||||
/* K6 */ be_const_int(2),
|
||||
/* K7 */ be_nested_str_weak(_X3A),
|
||||
/* K8 */ be_nested_str_weak(_X20),
|
||||
/* K9 */ be_nested_str_weak(set_text),
|
||||
( &(const bvalue[ 8]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(hour),
|
||||
/* K1 */ be_nested_str_weak(minute),
|
||||
/* K2 */ be_nested_str_weak(sec),
|
||||
/* K3 */ be_nested_str_weak(_X2502d_X25s_X2502d),
|
||||
/* K4 */ be_const_int(2),
|
||||
/* K5 */ be_nested_str_weak(_X3A),
|
||||
/* K6 */ be_nested_str_weak(_X20),
|
||||
/* K7 */ be_nested_str_weak(set_text),
|
||||
}),
|
||||
be_str_weak(set_time),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[27]) { /* code */
|
||||
0xA4120000, // 0000 IMPORT R4 K0
|
||||
0x88140101, // 0001 GETMBR R5 R0 K1
|
||||
0x20140205, // 0002 NE R5 R1 R5
|
||||
0x74160005, // 0003 JMPT R5 #000A
|
||||
0x88140102, // 0004 GETMBR R5 R0 K2
|
||||
0x20140405, // 0005 NE R5 R2 R5
|
||||
0x74160002, // 0006 JMPT R5 #000A
|
||||
0x88140103, // 0007 GETMBR R5 R0 K3
|
||||
0x20140605, // 0008 NE R5 R3 R5
|
||||
0x7816000F, // 0009 JMPF R5 #001A
|
||||
0x8C140904, // 000A GETMET R5 R4 K4
|
||||
0x581C0005, // 000B LDCONST R7 K5
|
||||
0x5C200200, // 000C MOVE R8 R1
|
||||
0x10240706, // 000D MOD R9 R3 K6
|
||||
0x78260001, // 000E JMPF R9 #0011
|
||||
0x58240007, // 000F LDCONST R9 K7
|
||||
0x70020000, // 0010 JMP #0012
|
||||
0x58240008, // 0011 LDCONST R9 K8
|
||||
0x5C280400, // 0012 MOVE R10 R2
|
||||
0x7C140A00, // 0013 CALL R5 5
|
||||
0x90020201, // 0014 SETMBR R0 K1 R1
|
||||
0x90020402, // 0015 SETMBR R0 K2 R2
|
||||
0x90020603, // 0016 SETMBR R0 K3 R3
|
||||
0x8C180109, // 0017 GETMET R6 R0 K9
|
||||
0x5C200A00, // 0018 MOVE R8 R5
|
||||
0x7C180400, // 0019 CALL R6 2
|
||||
0x80000000, // 001A RET 0
|
||||
( &(const binstruction[26]) { /* code */
|
||||
0x88100100, // 0000 GETMBR R4 R0 K0
|
||||
0x20100204, // 0001 NE R4 R1 R4
|
||||
0x74120005, // 0002 JMPT R4 #0009
|
||||
0x88100101, // 0003 GETMBR R4 R0 K1
|
||||
0x20100404, // 0004 NE R4 R2 R4
|
||||
0x74120002, // 0005 JMPT R4 #0009
|
||||
0x88100102, // 0006 GETMBR R4 R0 K2
|
||||
0x20100604, // 0007 NE R4 R3 R4
|
||||
0x7812000F, // 0008 JMPF R4 #0019
|
||||
0x60100018, // 0009 GETGBL R4 G24
|
||||
0x58140003, // 000A LDCONST R5 K3
|
||||
0x5C180200, // 000B MOVE R6 R1
|
||||
0x101C0704, // 000C MOD R7 R3 K4
|
||||
0x781E0001, // 000D JMPF R7 #0010
|
||||
0x581C0005, // 000E LDCONST R7 K5
|
||||
0x70020000, // 000F JMP #0011
|
||||
0x581C0006, // 0010 LDCONST R7 K6
|
||||
0x5C200400, // 0011 MOVE R8 R2
|
||||
0x7C100800, // 0012 CALL R4 4
|
||||
0x90020001, // 0013 SETMBR R0 K0 R1
|
||||
0x90020202, // 0014 SETMBR R0 K1 R2
|
||||
0x90020403, // 0015 SETMBR R0 K2 R3
|
||||
0x8C140107, // 0016 GETMET R5 R0 K7
|
||||
0x5C1C0800, // 0017 MOVE R7 R4
|
||||
0x7C140400, // 0018 CALL R5 2
|
||||
0x80000000, // 0019 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
|
|
|
@ -268,7 +268,7 @@ extern const bclass be_class_mqtt_listener;
|
|||
********************************************************************/
|
||||
be_local_closure(mqtt_listener_tostring, /* name */
|
||||
be_nested_proto(
|
||||
7, /* nstack */
|
||||
5, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
|
@ -276,24 +276,21 @@ be_local_closure(mqtt_listener_tostring, /* name */
|
|||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 4]) { /* constants */
|
||||
/* K0 */ be_nested_str(string),
|
||||
/* K1 */ be_nested_str(format),
|
||||
/* K2 */ be_nested_str(_X3Cinstance_X3A_X20_X25s_X28_X27_X25s_X27_X29_X3E),
|
||||
/* K3 */ be_nested_str(fulltopic),
|
||||
( &(const bvalue[ 2]) { /* constants */
|
||||
/* K0 */ be_nested_str(_X3Cinstance_X3A_X20_X25s_X28_X27_X25s_X27_X29_X3E),
|
||||
/* K1 */ be_nested_str(fulltopic),
|
||||
}),
|
||||
&be_const_str_tostring,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[ 9]) { /* code */
|
||||
0xA4060000, // 0000 IMPORT R1 K0
|
||||
0x8C080301, // 0001 GETMET R2 R1 K1
|
||||
0x58100002, // 0002 LDCONST R4 K2
|
||||
0x60140005, // 0003 GETGBL R5 G5
|
||||
0x5C180000, // 0004 MOVE R6 R0
|
||||
0x7C140200, // 0005 CALL R5 1
|
||||
0x88180103, // 0006 GETMBR R6 R0 K3
|
||||
0x7C080800, // 0007 CALL R2 4
|
||||
0x80040400, // 0008 RET 1 R2
|
||||
( &(const binstruction[ 8]) { /* code */
|
||||
0x60040018, // 0000 GETGBL R1 G24
|
||||
0x58080000, // 0001 LDCONST R2 K0
|
||||
0x600C0005, // 0002 GETGBL R3 G5
|
||||
0x5C100000, // 0003 MOVE R4 R0
|
||||
0x7C0C0200, // 0004 CALL R3 1
|
||||
0x88100101, // 0005 GETMBR R4 R0 K1
|
||||
0x7C040600, // 0006 CALL R1 3
|
||||
0x80040200, // 0007 RET 1 R1
|
||||
})
|
||||
)
|
||||
);
|
||||
|
|
|
@ -99,7 +99,7 @@ be_local_closure(Partition_otadata_save, /* name */
|
|||
********************************************************************/
|
||||
be_local_closure(Partition_otadata_tostring, /* name */
|
||||
be_nested_proto(
|
||||
9, /* nstack */
|
||||
7, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
|
@ -107,38 +107,35 @@ be_local_closure(Partition_otadata_tostring, /* name */
|
|||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[10]) { /* constants */
|
||||
/* K0 */ be_nested_str(string),
|
||||
/* K1 */ be_nested_str(format),
|
||||
/* K2 */ be_nested_str(_X3Cinstance_X3A_X20Partition_otadata_X28ota_active_X3A_X25s_X2C_X20ota_seq_X3D_X5B_X25d_X2C_X25d_X5D_X2C_X20ota_max_X3D_X25d_X29_X3E),
|
||||
/* K3 */ be_nested_str(active_otadata),
|
||||
/* K4 */ be_const_int(0),
|
||||
/* K5 */ be_nested_str(ota_),
|
||||
/* K6 */ be_nested_str(factory),
|
||||
/* K7 */ be_nested_str(seq0),
|
||||
/* K8 */ be_nested_str(seq1),
|
||||
/* K9 */ be_nested_str(maxota),
|
||||
( &(const bvalue[ 8]) { /* constants */
|
||||
/* K0 */ be_nested_str(_X3Cinstance_X3A_X20Partition_otadata_X28ota_active_X3A_X25s_X2C_X20ota_seq_X3D_X5B_X25d_X2C_X25d_X5D_X2C_X20ota_max_X3D_X25d_X29_X3E),
|
||||
/* K1 */ be_nested_str(active_otadata),
|
||||
/* K2 */ be_const_int(0),
|
||||
/* K3 */ be_nested_str(ota_),
|
||||
/* K4 */ be_nested_str(factory),
|
||||
/* K5 */ be_nested_str(seq0),
|
||||
/* K6 */ be_nested_str(seq1),
|
||||
/* K7 */ be_nested_str(maxota),
|
||||
}),
|
||||
&be_const_str_tostring,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[17]) { /* code */
|
||||
0xA4060000, // 0000 IMPORT R1 K0
|
||||
0x8C080301, // 0001 GETMET R2 R1 K1
|
||||
0x58100002, // 0002 LDCONST R4 K2
|
||||
0x88140103, // 0003 GETMBR R5 R0 K3
|
||||
0x28140B04, // 0004 GE R5 R5 K4
|
||||
0x78160004, // 0005 JMPF R5 #000B
|
||||
0x60140008, // 0006 GETGBL R5 G8
|
||||
0x88180103, // 0007 GETMBR R6 R0 K3
|
||||
0x7C140200, // 0008 CALL R5 1
|
||||
0x00160A05, // 0009 ADD R5 K5 R5
|
||||
0x70020000, // 000A JMP #000C
|
||||
0x58140006, // 000B LDCONST R5 K6
|
||||
0x88180107, // 000C GETMBR R6 R0 K7
|
||||
0x881C0108, // 000D GETMBR R7 R0 K8
|
||||
0x88200109, // 000E GETMBR R8 R0 K9
|
||||
0x7C080C00, // 000F CALL R2 6
|
||||
0x80040400, // 0010 RET 1 R2
|
||||
( &(const binstruction[16]) { /* code */
|
||||
0x60040018, // 0000 GETGBL R1 G24
|
||||
0x58080000, // 0001 LDCONST R2 K0
|
||||
0x880C0101, // 0002 GETMBR R3 R0 K1
|
||||
0x280C0702, // 0003 GE R3 R3 K2
|
||||
0x780E0004, // 0004 JMPF R3 #000A
|
||||
0x600C0008, // 0005 GETGBL R3 G8
|
||||
0x88100101, // 0006 GETMBR R4 R0 K1
|
||||
0x7C0C0200, // 0007 CALL R3 1
|
||||
0x000E0603, // 0008 ADD R3 K3 R3
|
||||
0x70020000, // 0009 JMP #000B
|
||||
0x580C0004, // 000A LDCONST R3 K4
|
||||
0x88100105, // 000B GETMBR R4 R0 K5
|
||||
0x88140106, // 000C GETMBR R5 R0 K6
|
||||
0x88180107, // 000D GETMBR R6 R0 K7
|
||||
0x7C040A00, // 000E CALL R1 5
|
||||
0x80040200, // 000F RET 1 R1
|
||||
})
|
||||
)
|
||||
);
|
||||
|
@ -797,7 +794,7 @@ be_local_closure(Partition_get_max_flash_size_k, /* name */
|
|||
********************************************************************/
|
||||
be_local_closure(Partition_resize_max_flash_size_k, /* name */
|
||||
be_nested_proto(
|
||||
18, /* nstack */
|
||||
16, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
|
@ -805,29 +802,27 @@ be_local_closure(Partition_resize_max_flash_size_k, /* name */
|
|||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[18]) { /* constants */
|
||||
( &(const bvalue[16]) { /* constants */
|
||||
/* K0 */ be_nested_str(tasmota),
|
||||
/* K1 */ be_nested_str(memory),
|
||||
/* K2 */ be_nested_str(flash),
|
||||
/* K3 */ be_nested_str(find),
|
||||
/* K4 */ be_nested_str(flash_real),
|
||||
/* K5 */ be_nested_str(get_flash_definition_sector),
|
||||
/* K6 */ be_nested_str(string),
|
||||
/* K7 */ be_nested_str(read),
|
||||
/* K8 */ be_const_int(3),
|
||||
/* K9 */ be_const_int(1),
|
||||
/* K10 */ be_const_int(0),
|
||||
/* K11 */ be_const_int(2),
|
||||
/* K12 */ be_nested_str(write),
|
||||
/* K13 */ be_nested_str(log),
|
||||
/* K14 */ be_nested_str(format),
|
||||
/* K15 */ be_nested_str(UPL_X3A_X20changing_X20flash_X20definition_X20from_X200x02X_X20to_X200x_X2502X),
|
||||
/* K16 */ be_nested_str(wrong_X20flash_X20size_X20),
|
||||
/* K17 */ be_nested_str(internal_error),
|
||||
/* K6 */ be_nested_str(read),
|
||||
/* K7 */ be_const_int(3),
|
||||
/* K8 */ be_const_int(1),
|
||||
/* K9 */ be_const_int(0),
|
||||
/* K10 */ be_const_int(2),
|
||||
/* K11 */ be_nested_str(write),
|
||||
/* K12 */ be_nested_str(log),
|
||||
/* K13 */ be_nested_str(UPL_X3A_X20changing_X20flash_X20definition_X20from_X200x02X_X20to_X200x_X2502X),
|
||||
/* K14 */ be_nested_str(wrong_X20flash_X20size_X20),
|
||||
/* K15 */ be_nested_str(internal_error),
|
||||
}),
|
||||
&be_const_str_resize_max_flash_size_k,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[95]) { /* code */
|
||||
( &(const binstruction[94]) { /* code */
|
||||
0xB8060000, // 0000 GETNGBL R1 K0
|
||||
0x8C040301, // 0001 GETMET R1 R1 K1
|
||||
0x7C040200, // 0002 CALL R1 1
|
||||
|
@ -842,87 +837,86 @@ be_local_closure(Partition_resize_max_flash_size_k, /* name */
|
|||
0x8C0C0105, // 000B GETMET R3 R0 K5
|
||||
0x7C0C0200, // 000C CALL R3 1
|
||||
0x20100202, // 000D NE R4 R1 R2
|
||||
0x7812004E, // 000E JMPF R4 #005E
|
||||
0x7812004D, // 000E JMPF R4 #005D
|
||||
0x4C100000, // 000F LDNIL R4
|
||||
0x20100604, // 0010 NE R4 R3 R4
|
||||
0x7812004B, // 0011 JMPF R4 #005E
|
||||
0x7812004A, // 0011 JMPF R4 #005D
|
||||
0xA4120400, // 0012 IMPORT R4 K2
|
||||
0xA4160C00, // 0013 IMPORT R5 K6
|
||||
0x5C040400, // 0014 MOVE R1 R2
|
||||
0x8C180907, // 0015 GETMET R6 R4 K7
|
||||
0x5C200600, // 0016 MOVE R8 R3
|
||||
0x54260003, // 0017 LDINT R9 4
|
||||
0x7C180600, // 0018 CALL R6 3
|
||||
0x941C0D08, // 0019 GETIDX R7 R6 K8
|
||||
0x4C200000, // 001A LDNIL R8
|
||||
0x542603FF, // 001B LDINT R9 1024
|
||||
0x0C240409, // 001C DIV R9 R2 R9
|
||||
0x1C281309, // 001D EQ R10 R9 K9
|
||||
0x782A0001, // 001E JMPF R10 #0021
|
||||
0x5820000A, // 001F LDCONST R8 K10
|
||||
0x70020020, // 0020 JMP #0042
|
||||
0x1C28130B, // 0021 EQ R10 R9 K11
|
||||
0x782A0001, // 0022 JMPF R10 #0025
|
||||
0x5422000F, // 0023 LDINT R8 16
|
||||
0x7002001C, // 0024 JMP #0042
|
||||
0x542A0003, // 0025 LDINT R10 4
|
||||
0x1C28120A, // 0026 EQ R10 R9 R10
|
||||
0x782A0001, // 0027 JMPF R10 #002A
|
||||
0x5422001F, // 0028 LDINT R8 32
|
||||
0x70020017, // 0029 JMP #0042
|
||||
0x542A0007, // 002A LDINT R10 8
|
||||
0x1C28120A, // 002B EQ R10 R9 R10
|
||||
0x782A0001, // 002C JMPF R10 #002F
|
||||
0x5422002F, // 002D LDINT R8 48
|
||||
0x70020012, // 002E JMP #0042
|
||||
0x542A000F, // 002F LDINT R10 16
|
||||
0x1C28120A, // 0030 EQ R10 R9 R10
|
||||
0x782A0001, // 0031 JMPF R10 #0034
|
||||
0x5422003F, // 0032 LDINT R8 64
|
||||
0x7002000D, // 0033 JMP #0042
|
||||
0x542A001F, // 0034 LDINT R10 32
|
||||
0x1C28120A, // 0035 EQ R10 R9 R10
|
||||
0x782A0001, // 0036 JMPF R10 #0039
|
||||
0x5422004F, // 0037 LDINT R8 80
|
||||
0x70020008, // 0038 JMP #0042
|
||||
0x542A003F, // 0039 LDINT R10 64
|
||||
0x1C28120A, // 003A EQ R10 R9 R10
|
||||
0x782A0001, // 003B JMPF R10 #003E
|
||||
0x5422005F, // 003C LDINT R8 96
|
||||
0x70020003, // 003D JMP #0042
|
||||
0x542A007F, // 003E LDINT R10 128
|
||||
0x1C28120A, // 003F EQ R10 R9 R10
|
||||
0x782A0000, // 0040 JMPF R10 #0042
|
||||
0x5422006F, // 0041 LDINT R8 112
|
||||
0x4C280000, // 0042 LDNIL R10
|
||||
0x2028100A, // 0043 NE R10 R8 R10
|
||||
0x782A0013, // 0044 JMPF R10 #0059
|
||||
0x94280D08, // 0045 GETIDX R10 R6 K8
|
||||
0x942C0D08, // 0046 GETIDX R11 R6 K8
|
||||
0x5432000E, // 0047 LDINT R12 15
|
||||
0x2C2C160C, // 0048 AND R11 R11 R12
|
||||
0x302C1608, // 0049 OR R11 R11 R8
|
||||
0x981A100B, // 004A SETIDX R6 K8 R11
|
||||
0x8C2C090C, // 004B GETMET R11 R4 K12
|
||||
0x5C340600, // 004C MOVE R13 R3
|
||||
0x5C380C00, // 004D MOVE R14 R6
|
||||
0x7C2C0600, // 004E CALL R11 3
|
||||
0xB82E0000, // 004F GETNGBL R11 K0
|
||||
0x8C2C170D, // 0050 GETMET R11 R11 K13
|
||||
0x8C340B0E, // 0051 GETMET R13 R5 K14
|
||||
0x583C000F, // 0052 LDCONST R15 K15
|
||||
0x5C401400, // 0053 MOVE R16 R10
|
||||
0x94440D08, // 0054 GETIDX R17 R6 K8
|
||||
0x7C340800, // 0055 CALL R13 4
|
||||
0x58380008, // 0056 LDCONST R14 K8
|
||||
0x7C2C0600, // 0057 CALL R11 3
|
||||
0x70020004, // 0058 JMP #005E
|
||||
0x60280008, // 0059 GETGBL R10 G8
|
||||
0x5C2C1200, // 005A MOVE R11 R9
|
||||
0x7C280200, // 005B CALL R10 1
|
||||
0x002A200A, // 005C ADD R10 K16 R10
|
||||
0xB006220A, // 005D RAISE 1 K17 R10
|
||||
0x80000000, // 005E RET 0
|
||||
0x5C040400, // 0013 MOVE R1 R2
|
||||
0x8C140906, // 0014 GETMET R5 R4 K6
|
||||
0x5C1C0600, // 0015 MOVE R7 R3
|
||||
0x54220003, // 0016 LDINT R8 4
|
||||
0x7C140600, // 0017 CALL R5 3
|
||||
0x94180B07, // 0018 GETIDX R6 R5 K7
|
||||
0x4C1C0000, // 0019 LDNIL R7
|
||||
0x542203FF, // 001A LDINT R8 1024
|
||||
0x0C200408, // 001B DIV R8 R2 R8
|
||||
0x1C241108, // 001C EQ R9 R8 K8
|
||||
0x78260001, // 001D JMPF R9 #0020
|
||||
0x581C0009, // 001E LDCONST R7 K9
|
||||
0x70020020, // 001F JMP #0041
|
||||
0x1C24110A, // 0020 EQ R9 R8 K10
|
||||
0x78260001, // 0021 JMPF R9 #0024
|
||||
0x541E000F, // 0022 LDINT R7 16
|
||||
0x7002001C, // 0023 JMP #0041
|
||||
0x54260003, // 0024 LDINT R9 4
|
||||
0x1C241009, // 0025 EQ R9 R8 R9
|
||||
0x78260001, // 0026 JMPF R9 #0029
|
||||
0x541E001F, // 0027 LDINT R7 32
|
||||
0x70020017, // 0028 JMP #0041
|
||||
0x54260007, // 0029 LDINT R9 8
|
||||
0x1C241009, // 002A EQ R9 R8 R9
|
||||
0x78260001, // 002B JMPF R9 #002E
|
||||
0x541E002F, // 002C LDINT R7 48
|
||||
0x70020012, // 002D JMP #0041
|
||||
0x5426000F, // 002E LDINT R9 16
|
||||
0x1C241009, // 002F EQ R9 R8 R9
|
||||
0x78260001, // 0030 JMPF R9 #0033
|
||||
0x541E003F, // 0031 LDINT R7 64
|
||||
0x7002000D, // 0032 JMP #0041
|
||||
0x5426001F, // 0033 LDINT R9 32
|
||||
0x1C241009, // 0034 EQ R9 R8 R9
|
||||
0x78260001, // 0035 JMPF R9 #0038
|
||||
0x541E004F, // 0036 LDINT R7 80
|
||||
0x70020008, // 0037 JMP #0041
|
||||
0x5426003F, // 0038 LDINT R9 64
|
||||
0x1C241009, // 0039 EQ R9 R8 R9
|
||||
0x78260001, // 003A JMPF R9 #003D
|
||||
0x541E005F, // 003B LDINT R7 96
|
||||
0x70020003, // 003C JMP #0041
|
||||
0x5426007F, // 003D LDINT R9 128
|
||||
0x1C241009, // 003E EQ R9 R8 R9
|
||||
0x78260000, // 003F JMPF R9 #0041
|
||||
0x541E006F, // 0040 LDINT R7 112
|
||||
0x4C240000, // 0041 LDNIL R9
|
||||
0x20240E09, // 0042 NE R9 R7 R9
|
||||
0x78260013, // 0043 JMPF R9 #0058
|
||||
0x94240B07, // 0044 GETIDX R9 R5 K7
|
||||
0x94280B07, // 0045 GETIDX R10 R5 K7
|
||||
0x542E000E, // 0046 LDINT R11 15
|
||||
0x2C28140B, // 0047 AND R10 R10 R11
|
||||
0x30281407, // 0048 OR R10 R10 R7
|
||||
0x98160E0A, // 0049 SETIDX R5 K7 R10
|
||||
0x8C28090B, // 004A GETMET R10 R4 K11
|
||||
0x5C300600, // 004B MOVE R12 R3
|
||||
0x5C340A00, // 004C MOVE R13 R5
|
||||
0x7C280600, // 004D CALL R10 3
|
||||
0xB82A0000, // 004E GETNGBL R10 K0
|
||||
0x8C28150C, // 004F GETMET R10 R10 K12
|
||||
0x60300018, // 0050 GETGBL R12 G24
|
||||
0x5834000D, // 0051 LDCONST R13 K13
|
||||
0x5C381200, // 0052 MOVE R14 R9
|
||||
0x943C0B07, // 0053 GETIDX R15 R5 K7
|
||||
0x7C300600, // 0054 CALL R12 3
|
||||
0x58340007, // 0055 LDCONST R13 K7
|
||||
0x7C280600, // 0056 CALL R10 3
|
||||
0x70020004, // 0057 JMP #005D
|
||||
0x60240008, // 0058 GETGBL R9 G8
|
||||
0x5C281000, // 0059 MOVE R10 R8
|
||||
0x7C240200, // 005A CALL R9 1
|
||||
0x00261C09, // 005B ADD R9 K14 R9
|
||||
0xB0061E09, // 005C RAISE 1 K15 R9
|
||||
0x80000000, // 005D RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
|
@ -991,7 +985,7 @@ be_local_closure(Partition_get_flash_definition_sector, /* name */
|
|||
********************************************************************/
|
||||
be_local_closure(Partition_resize_fs_to_max, /* name */
|
||||
be_nested_proto(
|
||||
11, /* nstack */
|
||||
9, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
|
@ -999,83 +993,80 @@ be_local_closure(Partition_resize_fs_to_max, /* name */
|
|||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[17]) { /* constants */
|
||||
/* K0 */ be_nested_str(string),
|
||||
/* K1 */ be_nested_str(get_unallocated_k),
|
||||
/* K2 */ be_const_int(0),
|
||||
/* K3 */ be_nested_str(tasmota),
|
||||
/* K4 */ be_nested_str(log),
|
||||
/* K5 */ be_nested_str(format),
|
||||
/* K6 */ be_nested_str(BRY_X3A_X20Trying_X20to_X20expand_X20FS_X20by_X20_X25i_X20kB),
|
||||
/* K7 */ be_const_int(2),
|
||||
/* K8 */ be_nested_str(resize_max_flash_size_k),
|
||||
/* K9 */ be_nested_str(slots),
|
||||
/* K10 */ be_nested_str(sz),
|
||||
/* K11 */ be_nested_str(save),
|
||||
/* K12 */ be_nested_str(invalidate_spiffs),
|
||||
/* K13 */ be_nested_str(global),
|
||||
/* K14 */ be_nested_str(restart_flag),
|
||||
/* K15 */ be_nested_str(BRY_X3A_X20Successfully_X20resized_X20FS_X2C_X20restarting),
|
||||
/* K16 */ be_nested_str(BRY_X3A_X20Exception_X3E_X20_X27_X25s_X27_X20_X2D_X20_X25s),
|
||||
( &(const bvalue[15]) { /* constants */
|
||||
/* K0 */ be_nested_str(get_unallocated_k),
|
||||
/* K1 */ be_const_int(0),
|
||||
/* K2 */ be_nested_str(tasmota),
|
||||
/* K3 */ be_nested_str(log),
|
||||
/* K4 */ be_nested_str(BRY_X3A_X20Trying_X20to_X20expand_X20FS_X20by_X20_X25i_X20kB),
|
||||
/* K5 */ be_const_int(2),
|
||||
/* K6 */ be_nested_str(resize_max_flash_size_k),
|
||||
/* K7 */ be_nested_str(slots),
|
||||
/* K8 */ be_nested_str(sz),
|
||||
/* K9 */ be_nested_str(save),
|
||||
/* K10 */ be_nested_str(invalidate_spiffs),
|
||||
/* K11 */ be_nested_str(global),
|
||||
/* K12 */ be_nested_str(restart_flag),
|
||||
/* K13 */ be_nested_str(BRY_X3A_X20Successfully_X20resized_X20FS_X2C_X20restarting),
|
||||
/* K14 */ be_nested_str(BRY_X3A_X20Exception_X3E_X20_X27_X25s_X27_X20_X2D_X20_X25s),
|
||||
}),
|
||||
&be_const_str_resize_fs_to_max,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[55]) { /* code */
|
||||
0xA4060000, // 0000 IMPORT R1 K0
|
||||
0xA8020026, // 0001 EXBLK 0 #0029
|
||||
0x8C080101, // 0002 GETMET R2 R0 K1
|
||||
0x7C080200, // 0003 CALL R2 1
|
||||
0x180C0502, // 0004 LE R3 R2 K2
|
||||
0x780E0002, // 0005 JMPF R3 #0009
|
||||
0x4C0C0000, // 0006 LDNIL R3
|
||||
0xA8040001, // 0007 EXBLK 1 1
|
||||
0x80040600, // 0008 RET 1 R3
|
||||
0xB80E0600, // 0009 GETNGBL R3 K3
|
||||
0x8C0C0704, // 000A GETMET R3 R3 K4
|
||||
0x8C140305, // 000B GETMET R5 R1 K5
|
||||
0x581C0006, // 000C LDCONST R7 K6
|
||||
0x5C200400, // 000D MOVE R8 R2
|
||||
0x7C140600, // 000E CALL R5 3
|
||||
0x58180007, // 000F LDCONST R6 K7
|
||||
0x7C0C0600, // 0010 CALL R3 3
|
||||
0x8C0C0108, // 0011 GETMET R3 R0 K8
|
||||
0x7C0C0200, // 0012 CALL R3 1
|
||||
0x540DFFFE, // 0013 LDINT R3 -1
|
||||
0x88100109, // 0014 GETMBR R4 R0 K9
|
||||
0x940C0803, // 0015 GETIDX R3 R4 R3
|
||||
0x541A03FF, // 0016 LDINT R6 1024
|
||||
0x08180406, // 0017 MUL R6 R2 R6
|
||||
0x8814070A, // 0018 GETMBR R5 R3 K10
|
||||
0x00140A06, // 0019 ADD R5 R5 R6
|
||||
0x900E1405, // 001A SETMBR R3 K10 R5
|
||||
0x8C14010B, // 001B GETMET R5 R0 K11
|
||||
0x7C140200, // 001C CALL R5 1
|
||||
0x8C10010C, // 001D GETMET R4 R0 K12
|
||||
0x7C100200, // 001E CALL R4 1
|
||||
0xB8120600, // 001F GETNGBL R4 K3
|
||||
0x8810090D, // 0020 GETMBR R4 R4 K13
|
||||
0x90121D07, // 0021 SETMBR R4 K14 K7
|
||||
0xB8120600, // 0022 GETNGBL R4 K3
|
||||
0x8C100904, // 0023 GETMET R4 R4 K4
|
||||
0x5818000F, // 0024 LDCONST R6 K15
|
||||
0x581C0007, // 0025 LDCONST R7 K7
|
||||
0x7C100600, // 0026 CALL R4 3
|
||||
0xA8040001, // 0027 EXBLK 1 1
|
||||
0x7002000C, // 0028 JMP #0036
|
||||
0xAC080002, // 0029 CATCH R2 0 2
|
||||
0x70020009, // 002A JMP #0035
|
||||
0xB8120600, // 002B GETNGBL R4 K3
|
||||
0x8C100904, // 002C GETMET R4 R4 K4
|
||||
0x8C180305, // 002D GETMET R6 R1 K5
|
||||
0x58200010, // 002E LDCONST R8 K16
|
||||
0x5C240400, // 002F MOVE R9 R2
|
||||
0x5C280600, // 0030 MOVE R10 R3
|
||||
0x7C180800, // 0031 CALL R6 4
|
||||
0x581C0007, // 0032 LDCONST R7 K7
|
||||
0x7C100600, // 0033 CALL R4 3
|
||||
0x70020000, // 0034 JMP #0036
|
||||
0xB0080000, // 0035 RAISE 2 R0 R0
|
||||
0x80000000, // 0036 RET 0
|
||||
( &(const binstruction[54]) { /* code */
|
||||
0xA8020026, // 0000 EXBLK 0 #0028
|
||||
0x8C040100, // 0001 GETMET R1 R0 K0
|
||||
0x7C040200, // 0002 CALL R1 1
|
||||
0x18080301, // 0003 LE R2 R1 K1
|
||||
0x780A0002, // 0004 JMPF R2 #0008
|
||||
0x4C080000, // 0005 LDNIL R2
|
||||
0xA8040001, // 0006 EXBLK 1 1
|
||||
0x80040400, // 0007 RET 1 R2
|
||||
0xB80A0400, // 0008 GETNGBL R2 K2
|
||||
0x8C080503, // 0009 GETMET R2 R2 K3
|
||||
0x60100018, // 000A GETGBL R4 G24
|
||||
0x58140004, // 000B LDCONST R5 K4
|
||||
0x5C180200, // 000C MOVE R6 R1
|
||||
0x7C100400, // 000D CALL R4 2
|
||||
0x58140005, // 000E LDCONST R5 K5
|
||||
0x7C080600, // 000F CALL R2 3
|
||||
0x8C080106, // 0010 GETMET R2 R0 K6
|
||||
0x7C080200, // 0011 CALL R2 1
|
||||
0x5409FFFE, // 0012 LDINT R2 -1
|
||||
0x880C0107, // 0013 GETMBR R3 R0 K7
|
||||
0x94080602, // 0014 GETIDX R2 R3 R2
|
||||
0x541603FF, // 0015 LDINT R5 1024
|
||||
0x08140205, // 0016 MUL R5 R1 R5
|
||||
0x88100508, // 0017 GETMBR R4 R2 K8
|
||||
0x00100805, // 0018 ADD R4 R4 R5
|
||||
0x900A1004, // 0019 SETMBR R2 K8 R4
|
||||
0x8C100109, // 001A GETMET R4 R0 K9
|
||||
0x7C100200, // 001B CALL R4 1
|
||||
0x8C0C010A, // 001C GETMET R3 R0 K10
|
||||
0x7C0C0200, // 001D CALL R3 1
|
||||
0xB80E0400, // 001E GETNGBL R3 K2
|
||||
0x880C070B, // 001F GETMBR R3 R3 K11
|
||||
0x900E1905, // 0020 SETMBR R3 K12 K5
|
||||
0xB80E0400, // 0021 GETNGBL R3 K2
|
||||
0x8C0C0703, // 0022 GETMET R3 R3 K3
|
||||
0x5814000D, // 0023 LDCONST R5 K13
|
||||
0x58180005, // 0024 LDCONST R6 K5
|
||||
0x7C0C0600, // 0025 CALL R3 3
|
||||
0xA8040001, // 0026 EXBLK 1 1
|
||||
0x7002000C, // 0027 JMP #0035
|
||||
0xAC040002, // 0028 CATCH R1 0 2
|
||||
0x70020009, // 0029 JMP #0034
|
||||
0xB80E0400, // 002A GETNGBL R3 K2
|
||||
0x8C0C0703, // 002B GETMET R3 R3 K3
|
||||
0x60140018, // 002C GETGBL R5 G24
|
||||
0x5818000E, // 002D LDCONST R6 K14
|
||||
0x5C1C0200, // 002E MOVE R7 R1
|
||||
0x5C200400, // 002F MOVE R8 R2
|
||||
0x7C140600, // 0030 CALL R5 3
|
||||
0x58180005, // 0031 LDCONST R6 K5
|
||||
0x7C0C0600, // 0032 CALL R3 3
|
||||
0x70020000, // 0033 JMP #0035
|
||||
0xB0080000, // 0034 RAISE 2 R0 R0
|
||||
0x80000000, // 0035 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
|
@ -1711,7 +1702,7 @@ be_local_closure(Partition_info_is_factory, /* name */
|
|||
********************************************************************/
|
||||
be_local_closure(Partition_info_type_to_string, /* name */
|
||||
be_nested_proto(
|
||||
6, /* nstack */
|
||||
4, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
|
@ -1719,19 +1710,17 @@ be_local_closure(Partition_info_type_to_string, /* name */
|
|||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 8]) { /* constants */
|
||||
( &(const bvalue[ 6]) { /* constants */
|
||||
/* K0 */ be_nested_str(type),
|
||||
/* K1 */ be_const_int(0),
|
||||
/* K2 */ be_nested_str(app),
|
||||
/* K3 */ be_const_int(1),
|
||||
/* K4 */ be_nested_str(data),
|
||||
/* K5 */ be_nested_str(string),
|
||||
/* K6 */ be_nested_str(format),
|
||||
/* K7 */ be_nested_str(0x_X2502X),
|
||||
/* K5 */ be_nested_str(0x_X2502X),
|
||||
}),
|
||||
&be_const_str_type_to_string,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[15]) { /* code */
|
||||
( &(const binstruction[14]) { /* code */
|
||||
0x88040100, // 0000 GETMBR R1 R0 K0
|
||||
0x1C040301, // 0001 EQ R1 R1 K1
|
||||
0x78060001, // 0002 JMPF R1 #0005
|
||||
|
@ -1741,12 +1730,11 @@ be_local_closure(Partition_info_type_to_string, /* name */
|
|||
0x1C040303, // 0006 EQ R1 R1 K3
|
||||
0x78060000, // 0007 JMPF R1 #0009
|
||||
0x80060800, // 0008 RET 1 K4
|
||||
0xA4060A00, // 0009 IMPORT R1 K5
|
||||
0x8C080306, // 000A GETMET R2 R1 K6
|
||||
0x58100007, // 000B LDCONST R4 K7
|
||||
0x88140100, // 000C GETMBR R5 R0 K0
|
||||
0x7C080600, // 000D CALL R2 3
|
||||
0x80040400, // 000E RET 1 R2
|
||||
0x60040018, // 0009 GETGBL R1 G24
|
||||
0x58080005, // 000A LDCONST R2 K5
|
||||
0x880C0100, // 000B GETMBR R3 R0 K0
|
||||
0x7C040400, // 000C CALL R1 2
|
||||
0x80040200, // 000D RET 1 R1
|
||||
})
|
||||
)
|
||||
);
|
||||
|
@ -1758,7 +1746,7 @@ be_local_closure(Partition_info_type_to_string, /* name */
|
|||
********************************************************************/
|
||||
be_local_closure(Partition_info_init, /* name */
|
||||
be_nested_proto(
|
||||
8, /* nstack */
|
||||
7, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
|
@ -1766,7 +1754,7 @@ be_local_closure(Partition_info_init, /* name */
|
|||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[18]) { /* constants */
|
||||
( &(const bvalue[16]) { /* constants */
|
||||
/* K0 */ be_nested_str(type),
|
||||
/* K1 */ be_const_int(0),
|
||||
/* K2 */ be_nested_str(subtype),
|
||||
|
@ -1781,14 +1769,12 @@ be_local_closure(Partition_info_init, /* name */
|
|||
/* K11 */ be_const_int(3),
|
||||
/* K12 */ be_nested_str(remove_trailing_zeroes),
|
||||
/* K13 */ be_nested_str(asstring),
|
||||
/* K14 */ be_nested_str(string),
|
||||
/* K15 */ be_nested_str(format),
|
||||
/* K16 */ be_nested_str(invalid_X20magic_X20number_X20_X2502X),
|
||||
/* K17 */ be_nested_str(internal_error),
|
||||
/* K14 */ be_nested_str(invalid_X20magic_X20number_X20_X2502X),
|
||||
/* K15 */ be_nested_str(internal_error),
|
||||
}),
|
||||
&be_const_str_init,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[61]) { /* code */
|
||||
( &(const binstruction[60]) { /* code */
|
||||
0x90020101, // 0000 SETMBR R0 K0 K1
|
||||
0x90020501, // 0001 SETMBR R0 K2 K1
|
||||
0x90020701, // 0002 SETMBR R0 K3 K1
|
||||
|
@ -1842,14 +1828,13 @@ be_local_closure(Partition_info_init, /* name */
|
|||
0x541A0003, // 0032 LDINT R6 4
|
||||
0x7C0C0600, // 0033 CALL R3 3
|
||||
0x90020E03, // 0034 SETMBR R0 K7 R3
|
||||
0x70020005, // 0035 JMP #003C
|
||||
0xA40E1C00, // 0036 IMPORT R3 K14
|
||||
0x8C10070F, // 0037 GETMET R4 R3 K15
|
||||
0x58180010, // 0038 LDCONST R6 K16
|
||||
0x5C1C0400, // 0039 MOVE R7 R2
|
||||
0x7C100600, // 003A CALL R4 3
|
||||
0xB0062204, // 003B RAISE 1 K17 R4
|
||||
0x80000000, // 003C RET 0
|
||||
0x70020004, // 0035 JMP #003B
|
||||
0x600C0018, // 0036 GETGBL R3 G24
|
||||
0x5810000E, // 0037 LDCONST R4 K14
|
||||
0x5C140400, // 0038 MOVE R5 R2
|
||||
0x7C0C0400, // 0039 CALL R3 2
|
||||
0xB0061E03, // 003A RAISE 1 K15 R3
|
||||
0x80000000, // 003B RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
|
@ -1861,7 +1846,7 @@ be_local_closure(Partition_info_init, /* name */
|
|||
********************************************************************/
|
||||
be_local_closure(Partition_info_subtype_to_string, /* name */
|
||||
be_nested_proto(
|
||||
6, /* nstack */
|
||||
4, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
|
@ -1869,7 +1854,7 @@ be_local_closure(Partition_info_subtype_to_string, /* name */
|
|||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[21]) { /* constants */
|
||||
( &(const bvalue[19]) { /* constants */
|
||||
/* K0 */ be_nested_str(type),
|
||||
/* K1 */ be_const_int(0),
|
||||
/* K2 */ be_nested_str(subtype),
|
||||
|
@ -1888,13 +1873,11 @@ be_local_closure(Partition_info_subtype_to_string, /* name */
|
|||
/* K15 */ be_nested_str(esphttpd),
|
||||
/* K16 */ be_nested_str(fat),
|
||||
/* K17 */ be_nested_str(spiffs),
|
||||
/* K18 */ be_nested_str(string),
|
||||
/* K19 */ be_nested_str(format),
|
||||
/* K20 */ be_nested_str(0x_X2502X),
|
||||
/* K18 */ be_nested_str(0x_X2502X),
|
||||
}),
|
||||
&be_const_str_subtype_to_string,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[88]) { /* code */
|
||||
( &(const binstruction[87]) { /* code */
|
||||
0x88040100, // 0000 GETMBR R1 R0 K0
|
||||
0x1C040301, // 0001 EQ R1 R1 K1
|
||||
0x7806001A, // 0002 JMPF R1 #001E
|
||||
|
@ -1977,12 +1960,11 @@ be_local_closure(Partition_info_subtype_to_string, /* name */
|
|||
0x1C040202, // 004F EQ R1 R1 R2
|
||||
0x78060000, // 0050 JMPF R1 #0052
|
||||
0x80062200, // 0051 RET 1 K17
|
||||
0xA4062400, // 0052 IMPORT R1 K18
|
||||
0x8C080313, // 0053 GETMET R2 R1 K19
|
||||
0x58100014, // 0054 LDCONST R4 K20
|
||||
0x88140102, // 0055 GETMBR R5 R0 K2
|
||||
0x7C080600, // 0056 CALL R2 3
|
||||
0x80040400, // 0057 RET 1 R2
|
||||
0x60040018, // 0052 GETGBL R1 G24
|
||||
0x58080012, // 0053 LDCONST R2 K18
|
||||
0x880C0102, // 0054 GETMBR R3 R0 K2
|
||||
0x7C040400, // 0055 CALL R1 2
|
||||
0x80040200, // 0056 RET 1 R1
|
||||
})
|
||||
)
|
||||
);
|
||||
|
@ -1994,7 +1976,7 @@ be_local_closure(Partition_info_subtype_to_string, /* name */
|
|||
********************************************************************/
|
||||
be_local_closure(Partition_info_tostring, /* name */
|
||||
be_nested_proto(
|
||||
15, /* nstack */
|
||||
13, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
|
@ -2002,52 +1984,49 @@ be_local_closure(Partition_info_tostring, /* name */
|
|||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[14]) { /* constants */
|
||||
/* K0 */ be_nested_str(string),
|
||||
/* K1 */ be_nested_str(type_to_string),
|
||||
/* K2 */ be_nested_str(subtype_to_string),
|
||||
/* K3 */ be_nested_str(),
|
||||
/* K4 */ be_nested_str(_X20_X28),
|
||||
/* K5 */ be_nested_str(_X29),
|
||||
/* K6 */ be_nested_str(format),
|
||||
/* K7 */ be_nested_str(_X3Cinstance_X3A_X20Partition_info_X28_X25d_X25s_X2C_X25d_X25s_X2C0x_X2508X_X2C0x_X2508X_X2C_X27_X25s_X27_X2C0x_X25X_X29_X3E),
|
||||
/* K8 */ be_nested_str(type),
|
||||
/* K9 */ be_nested_str(subtype),
|
||||
/* K10 */ be_nested_str(start),
|
||||
/* K11 */ be_nested_str(sz),
|
||||
/* K12 */ be_nested_str(label),
|
||||
/* K13 */ be_nested_str(flags),
|
||||
( &(const bvalue[12]) { /* constants */
|
||||
/* K0 */ be_nested_str(type_to_string),
|
||||
/* K1 */ be_nested_str(subtype_to_string),
|
||||
/* K2 */ be_nested_str(),
|
||||
/* K3 */ be_nested_str(_X20_X28),
|
||||
/* K4 */ be_nested_str(_X29),
|
||||
/* K5 */ be_nested_str(_X3Cinstance_X3A_X20Partition_info_X28_X25d_X25s_X2C_X25d_X25s_X2C0x_X2508X_X2C0x_X2508X_X2C_X27_X25s_X27_X2C0x_X25X_X29_X3E),
|
||||
/* K6 */ be_nested_str(type),
|
||||
/* K7 */ be_nested_str(subtype),
|
||||
/* K8 */ be_nested_str(start),
|
||||
/* K9 */ be_nested_str(sz),
|
||||
/* K10 */ be_nested_str(label),
|
||||
/* K11 */ be_nested_str(flags),
|
||||
}),
|
||||
&be_const_str_tostring,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[27]) { /* code */
|
||||
0xA4060000, // 0000 IMPORT R1 K0
|
||||
0x8C080101, // 0001 GETMET R2 R0 K1
|
||||
0x7C080200, // 0002 CALL R2 1
|
||||
0x8C0C0102, // 0003 GETMET R3 R0 K2
|
||||
0x7C0C0200, // 0004 CALL R3 1
|
||||
0x20100503, // 0005 NE R4 R2 K3
|
||||
0x78120002, // 0006 JMPF R4 #000A
|
||||
0x00120802, // 0007 ADD R4 K4 R2
|
||||
0x00100905, // 0008 ADD R4 R4 K5
|
||||
0x5C080800, // 0009 MOVE R2 R4
|
||||
0x20100703, // 000A NE R4 R3 K3
|
||||
0x78120002, // 000B JMPF R4 #000F
|
||||
0x00120803, // 000C ADD R4 K4 R3
|
||||
0x00100905, // 000D ADD R4 R4 K5
|
||||
0x5C0C0800, // 000E MOVE R3 R4
|
||||
0x8C100306, // 000F GETMET R4 R1 K6
|
||||
0x58180007, // 0010 LDCONST R6 K7
|
||||
0x881C0108, // 0011 GETMBR R7 R0 K8
|
||||
0x5C200400, // 0012 MOVE R8 R2
|
||||
0x88240109, // 0013 GETMBR R9 R0 K9
|
||||
0x5C280600, // 0014 MOVE R10 R3
|
||||
0x882C010A, // 0015 GETMBR R11 R0 K10
|
||||
0x8830010B, // 0016 GETMBR R12 R0 K11
|
||||
0x8834010C, // 0017 GETMBR R13 R0 K12
|
||||
0x8838010D, // 0018 GETMBR R14 R0 K13
|
||||
0x7C101400, // 0019 CALL R4 10
|
||||
0x80040800, // 001A RET 1 R4
|
||||
( &(const binstruction[26]) { /* code */
|
||||
0x8C040100, // 0000 GETMET R1 R0 K0
|
||||
0x7C040200, // 0001 CALL R1 1
|
||||
0x8C080101, // 0002 GETMET R2 R0 K1
|
||||
0x7C080200, // 0003 CALL R2 1
|
||||
0x200C0302, // 0004 NE R3 R1 K2
|
||||
0x780E0002, // 0005 JMPF R3 #0009
|
||||
0x000E0601, // 0006 ADD R3 K3 R1
|
||||
0x000C0704, // 0007 ADD R3 R3 K4
|
||||
0x5C040600, // 0008 MOVE R1 R3
|
||||
0x200C0502, // 0009 NE R3 R2 K2
|
||||
0x780E0002, // 000A JMPF R3 #000E
|
||||
0x000E0602, // 000B ADD R3 K3 R2
|
||||
0x000C0704, // 000C ADD R3 R3 K4
|
||||
0x5C080600, // 000D MOVE R2 R3
|
||||
0x600C0018, // 000E GETGBL R3 G24
|
||||
0x58100005, // 000F LDCONST R4 K5
|
||||
0x88140106, // 0010 GETMBR R5 R0 K6
|
||||
0x5C180200, // 0011 MOVE R6 R1
|
||||
0x881C0107, // 0012 GETMBR R7 R0 K7
|
||||
0x5C200400, // 0013 MOVE R8 R2
|
||||
0x88240108, // 0014 GETMBR R9 R0 K8
|
||||
0x88280109, // 0015 GETMBR R10 R0 K9
|
||||
0x882C010A, // 0016 GETMBR R11 R0 K10
|
||||
0x8830010B, // 0017 GETMBR R12 R0 K11
|
||||
0x7C0C1200, // 0018 CALL R3 9
|
||||
0x80040600, // 0019 RET 1 R3
|
||||
})
|
||||
)
|
||||
);
|
||||
|
|
|
@ -42,7 +42,7 @@ be_local_closure(Tapp_init, /* name */
|
|||
********************************************************************/
|
||||
be_local_closure(Tapp_autoexec, /* name */
|
||||
be_nested_proto(
|
||||
12, /* nstack */
|
||||
11, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
|
@ -50,7 +50,7 @@ be_local_closure(Tapp_autoexec, /* name */
|
|||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[15]) { /* constants */
|
||||
( &(const bvalue[14]) { /* constants */
|
||||
/* K0 */ be_nested_str(path),
|
||||
/* K1 */ be_nested_str(string),
|
||||
/* K2 */ be_nested_str(listdir),
|
||||
|
@ -60,12 +60,11 @@ be_local_closure(Tapp_autoexec, /* name */
|
|||
/* K6 */ be_const_int(0),
|
||||
/* K7 */ be_nested_str(tasmota),
|
||||
/* K8 */ be_nested_str(log),
|
||||
/* K9 */ be_nested_str(format),
|
||||
/* K10 */ be_nested_str(TAP_X3A_X20Loaded_X20Tasmota_X20App_X20_X27_X25s_X27),
|
||||
/* K11 */ be_const_int(2),
|
||||
/* K12 */ be_nested_str(load),
|
||||
/* K13 */ be_nested_str(_X23autoexec_X2Ebe),
|
||||
/* K14 */ be_nested_str(stop_iteration),
|
||||
/* K9 */ be_nested_str(TAP_X3A_X20Loaded_X20Tasmota_X20App_X20_X27_X25s_X27),
|
||||
/* K10 */ be_const_int(2),
|
||||
/* K11 */ be_nested_str(load),
|
||||
/* K12 */ be_nested_str(_X23autoexec_X2Ebe),
|
||||
/* K13 */ be_nested_str(stop_iteration),
|
||||
}),
|
||||
&be_const_str_autoexec,
|
||||
&be_const_str_solidified,
|
||||
|
@ -89,18 +88,18 @@ be_local_closure(Tapp_autoexec, /* name */
|
|||
0x781A000B, // 0010 JMPF R6 #001D
|
||||
0xB81A0E00, // 0011 GETNGBL R6 K7
|
||||
0x8C180D08, // 0012 GETMET R6 R6 K8
|
||||
0x8C200509, // 0013 GETMET R8 R2 K9
|
||||
0x5828000A, // 0014 LDCONST R10 K10
|
||||
0x5C2C0A00, // 0015 MOVE R11 R5
|
||||
0x7C200600, // 0016 CALL R8 3
|
||||
0x5824000B, // 0017 LDCONST R9 K11
|
||||
0x60200018, // 0013 GETGBL R8 G24
|
||||
0x58240009, // 0014 LDCONST R9 K9
|
||||
0x5C280A00, // 0015 MOVE R10 R5
|
||||
0x7C200400, // 0016 CALL R8 2
|
||||
0x5824000A, // 0017 LDCONST R9 K10
|
||||
0x7C180600, // 0018 CALL R6 3
|
||||
0xB81A0E00, // 0019 GETNGBL R6 K7
|
||||
0x8C180D0C, // 001A GETMET R6 R6 K12
|
||||
0x00200B0D, // 001B ADD R8 R5 K13
|
||||
0x8C180D0B, // 001A GETMET R6 R6 K11
|
||||
0x00200B0C, // 001B ADD R8 R5 K12
|
||||
0x7C180400, // 001C CALL R6 2
|
||||
0x7001FFEA, // 001D JMP #0009
|
||||
0x5810000E, // 001E LDCONST R4 K14
|
||||
0x5810000D, // 001E LDCONST R4 K13
|
||||
0xAC100200, // 001F CATCH R4 1 0
|
||||
0xB0080000, // 0020 RAISE 2 R0 R0
|
||||
0x80000000, // 0021 RET 0
|
||||
|
|
|
@ -1104,7 +1104,7 @@ be_local_closure(Tasmota_add_driver, /* name */
|
|||
********************************************************************/
|
||||
be_local_closure(Tasmota_load, /* name */
|
||||
be_nested_proto(
|
||||
27, /* nstack */
|
||||
26, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
|
@ -1178,7 +1178,7 @@ be_local_closure(Tasmota_load, /* name */
|
|||
})
|
||||
),
|
||||
be_nested_proto(
|
||||
10, /* nstack */
|
||||
8, /* nstack */
|
||||
1, /* argc */
|
||||
0, /* varg */
|
||||
0, /* has upvals */
|
||||
|
@ -1186,7 +1186,7 @@ be_local_closure(Tasmota_load, /* name */
|
|||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[10]) { /* constants */
|
||||
( &(const bvalue[ 8]) { /* constants */
|
||||
/* K0 */ be_nested_str(r),
|
||||
/* K1 */ be_nested_str(readbytes),
|
||||
/* K2 */ be_const_int(3),
|
||||
|
@ -1194,13 +1194,11 @@ be_local_closure(Tasmota_load, /* name */
|
|||
/* K4 */ be_nested_str(BECDFE),
|
||||
/* K5 */ be_const_int(0),
|
||||
/* K6 */ be_nested_str(close),
|
||||
/* K7 */ be_nested_str(string),
|
||||
/* K8 */ be_nested_str(format),
|
||||
/* K9 */ be_nested_str(BRY_X3A_X20failed_X20to_X20load_X20compiled_X20_X27_X25s_X27_X20_X28_X25s_X29),
|
||||
/* K7 */ be_nested_str(BRY_X3A_X20failed_X20to_X20load_X20compiled_X20_X27_X25s_X27_X20_X28_X25s_X29),
|
||||
}),
|
||||
&be_const_str_try_get_bec_version,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[44]) { /* code */
|
||||
( &(const binstruction[43]) { /* code */
|
||||
0x4C040000, // 0000 LDNIL R1
|
||||
0xA8020016, // 0001 EXBLK 0 #0019
|
||||
0x60080011, // 0002 GETGBL R2 G17
|
||||
|
@ -1225,26 +1223,25 @@ be_local_closure(Tasmota_load, /* name */
|
|||
0x8C100306, // 0015 GETMET R4 R1 K6
|
||||
0x7C100200, // 0016 CALL R4 1
|
||||
0xA8040001, // 0017 EXBLK 1 1
|
||||
0x70020010, // 0018 JMP #002A
|
||||
0x7002000F, // 0018 JMP #0029
|
||||
0xAC080001, // 0019 CATCH R2 0 1
|
||||
0x7002000D, // 001A JMP #0029
|
||||
0x7002000C, // 001A JMP #0028
|
||||
0x4C0C0000, // 001B LDNIL R3
|
||||
0x200C0203, // 001C NE R3 R1 R3
|
||||
0x780E0001, // 001D JMPF R3 #0020
|
||||
0x8C0C0306, // 001E GETMET R3 R1 K6
|
||||
0x7C0C0200, // 001F CALL R3 1
|
||||
0xA40E0E00, // 0020 IMPORT R3 K7
|
||||
0x60100001, // 0021 GETGBL R4 G1
|
||||
0x8C140708, // 0022 GETMET R5 R3 K8
|
||||
0x581C0009, // 0023 LDCONST R7 K9
|
||||
0x5C200000, // 0024 MOVE R8 R0
|
||||
0x5C240400, // 0025 MOVE R9 R2
|
||||
0x7C140800, // 0026 CALL R5 4
|
||||
0x7C100200, // 0027 CALL R4 1
|
||||
0x70020000, // 0028 JMP #002A
|
||||
0xB0080000, // 0029 RAISE 2 R0 R0
|
||||
0x4C080000, // 002A LDNIL R2
|
||||
0x80040400, // 002B RET 1 R2
|
||||
0x600C0001, // 0020 GETGBL R3 G1
|
||||
0x60100018, // 0021 GETGBL R4 G24
|
||||
0x58140007, // 0022 LDCONST R5 K7
|
||||
0x5C180000, // 0023 MOVE R6 R0
|
||||
0x5C1C0400, // 0024 MOVE R7 R2
|
||||
0x7C100600, // 0025 CALL R4 3
|
||||
0x7C0C0200, // 0026 CALL R3 1
|
||||
0x70020000, // 0027 JMP #0029
|
||||
0xB0080000, // 0028 RAISE 2 R0 R0
|
||||
0x4C080000, // 0029 LDNIL R2
|
||||
0x80040400, // 002A RET 1 R2
|
||||
})
|
||||
),
|
||||
be_nested_proto(
|
||||
|
@ -1281,7 +1278,7 @@ be_local_closure(Tasmota_load, /* name */
|
|||
})
|
||||
),
|
||||
be_nested_proto(
|
||||
11, /* nstack */
|
||||
9, /* nstack */
|
||||
1, /* argc */
|
||||
0, /* varg */
|
||||
0, /* has upvals */
|
||||
|
@ -1289,15 +1286,13 @@ be_local_closure(Tasmota_load, /* name */
|
|||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 4]) { /* constants */
|
||||
( &(const bvalue[ 2]) { /* constants */
|
||||
/* K0 */ be_nested_str(file),
|
||||
/* K1 */ be_nested_str(string),
|
||||
/* K2 */ be_nested_str(format),
|
||||
/* K3 */ be_nested_str(BRY_X3A_X20failed_X20to_X20load_X20_X27_X25s_X27_X20_X28_X25s_X20_X2D_X20_X25s_X29),
|
||||
/* K1 */ be_nested_str(BRY_X3A_X20failed_X20to_X20load_X20_X27_X25s_X27_X20_X28_X25s_X20_X2D_X20_X25s_X29),
|
||||
}),
|
||||
&be_const_str_try_compile,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[24]) { /* code */
|
||||
( &(const binstruction[23]) { /* code */
|
||||
0xA8020007, // 0000 EXBLK 0 #0009
|
||||
0x6004000D, // 0001 GETGBL R1 G13
|
||||
0x5C080000, // 0002 MOVE R2 R0
|
||||
|
@ -1306,26 +1301,25 @@ be_local_closure(Tasmota_load, /* name */
|
|||
0xA8040001, // 0005 EXBLK 1 1
|
||||
0x80040200, // 0006 RET 1 R1
|
||||
0xA8040001, // 0007 EXBLK 1 1
|
||||
0x7002000C, // 0008 JMP #0016
|
||||
0x7002000B, // 0008 JMP #0015
|
||||
0xAC040002, // 0009 CATCH R1 0 2
|
||||
0x70020009, // 000A JMP #0015
|
||||
0xA40E0200, // 000B IMPORT R3 K1
|
||||
0x60100001, // 000C GETGBL R4 G1
|
||||
0x8C140702, // 000D GETMET R5 R3 K2
|
||||
0x581C0003, // 000E LDCONST R7 K3
|
||||
0x5C200000, // 000F MOVE R8 R0
|
||||
0x5C240200, // 0010 MOVE R9 R1
|
||||
0x5C280400, // 0011 MOVE R10 R2
|
||||
0x7C140A00, // 0012 CALL R5 5
|
||||
0x7C100200, // 0013 CALL R4 1
|
||||
0x70020000, // 0014 JMP #0016
|
||||
0xB0080000, // 0015 RAISE 2 R0 R0
|
||||
0x4C040000, // 0016 LDNIL R1
|
||||
0x80040200, // 0017 RET 1 R1
|
||||
0x70020008, // 000A JMP #0014
|
||||
0x600C0001, // 000B GETGBL R3 G1
|
||||
0x60100018, // 000C GETGBL R4 G24
|
||||
0x58140001, // 000D LDCONST R5 K1
|
||||
0x5C180000, // 000E MOVE R6 R0
|
||||
0x5C1C0200, // 000F MOVE R7 R1
|
||||
0x5C200400, // 0010 MOVE R8 R2
|
||||
0x7C100800, // 0011 CALL R4 4
|
||||
0x7C0C0200, // 0012 CALL R3 1
|
||||
0x70020000, // 0013 JMP #0015
|
||||
0xB0080000, // 0014 RAISE 2 R0 R0
|
||||
0x4C040000, // 0015 LDNIL R1
|
||||
0x80040200, // 0016 RET 1 R1
|
||||
})
|
||||
),
|
||||
be_nested_proto(
|
||||
10, /* nstack */
|
||||
8, /* nstack */
|
||||
1, /* argc */
|
||||
0, /* varg */
|
||||
0, /* has upvals */
|
||||
|
@ -1333,17 +1327,15 @@ be_local_closure(Tasmota_load, /* name */
|
|||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 3]) { /* constants */
|
||||
/* K0 */ be_nested_str(string),
|
||||
/* K1 */ be_nested_str(format),
|
||||
/* K2 */ be_nested_str(BRY_X3A_X20failed_X20to_X20run_X20compiled_X20code_X20_X27_X25s_X27_X20_X2D_X20_X25s),
|
||||
( &(const bvalue[ 1]) { /* constants */
|
||||
/* K0 */ be_nested_str(BRY_X3A_X20failed_X20to_X20run_X20compiled_X20code_X20_X27_X25s_X27_X20_X2D_X20_X25s),
|
||||
}),
|
||||
&be_const_str_try_run_compiled,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[25]) { /* code */
|
||||
( &(const binstruction[24]) { /* code */
|
||||
0x4C040000, // 0000 LDNIL R1
|
||||
0x20040001, // 0001 NE R1 R0 R1
|
||||
0x78060013, // 0002 JMPF R1 #0017
|
||||
0x78060012, // 0002 JMPF R1 #0016
|
||||
0xA8020006, // 0003 EXBLK 0 #000B
|
||||
0x5C040000, // 0004 MOVE R1 R0
|
||||
0x7C040000, // 0005 CALL R1 0
|
||||
|
@ -1351,26 +1343,25 @@ be_local_closure(Tasmota_load, /* name */
|
|||
0xA8040001, // 0007 EXBLK 1 1
|
||||
0x80040200, // 0008 RET 1 R1
|
||||
0xA8040001, // 0009 EXBLK 1 1
|
||||
0x7002000B, // 000A JMP #0017
|
||||
0x7002000A, // 000A JMP #0016
|
||||
0xAC040002, // 000B CATCH R1 0 2
|
||||
0x70020008, // 000C JMP #0016
|
||||
0xA40E0000, // 000D IMPORT R3 K0
|
||||
0x60100001, // 000E GETGBL R4 G1
|
||||
0x8C140701, // 000F GETMET R5 R3 K1
|
||||
0x581C0002, // 0010 LDCONST R7 K2
|
||||
0x5C200200, // 0011 MOVE R8 R1
|
||||
0x5C240400, // 0012 MOVE R9 R2
|
||||
0x7C140800, // 0013 CALL R5 4
|
||||
0x7C100200, // 0014 CALL R4 1
|
||||
0x70020000, // 0015 JMP #0017
|
||||
0xB0080000, // 0016 RAISE 2 R0 R0
|
||||
0x50040000, // 0017 LDBOOL R1 0 0
|
||||
0x80040200, // 0018 RET 1 R1
|
||||
0x70020007, // 000C JMP #0015
|
||||
0x600C0001, // 000D GETGBL R3 G1
|
||||
0x60100018, // 000E GETGBL R4 G24
|
||||
0x58140000, // 000F LDCONST R5 K0
|
||||
0x5C180200, // 0010 MOVE R6 R1
|
||||
0x5C1C0400, // 0011 MOVE R7 R2
|
||||
0x7C100600, // 0012 CALL R4 3
|
||||
0x7C0C0200, // 0013 CALL R3 1
|
||||
0x70020000, // 0014 JMP #0016
|
||||
0xB0080000, // 0015 RAISE 2 R0 R0
|
||||
0x50040000, // 0016 LDBOOL R1 0 0
|
||||
0x80040200, // 0017 RET 1 R1
|
||||
})
|
||||
),
|
||||
}),
|
||||
1, /* has constants */
|
||||
( &(const bvalue[22]) { /* constants */
|
||||
( &(const bvalue[21]) { /* constants */
|
||||
/* K0 */ be_nested_str(string),
|
||||
/* K1 */ be_nested_str(path),
|
||||
/* K2 */ be_const_int(0),
|
||||
|
@ -1388,11 +1379,10 @@ be_local_closure(Tasmota_load, /* name */
|
|||
/* K14 */ be_nested_str(c),
|
||||
/* K15 */ be_nested_str(wd),
|
||||
/* K16 */ be_nested_str(),
|
||||
/* K17 */ be_nested_str(format),
|
||||
/* K18 */ be_nested_str(BRY_X3A_X20corrupt_X20bytecode_X20_X27_X25s_X27),
|
||||
/* K19 */ be_nested_str(BRY_X3A_X20bytecode_X20has_X20wrong_X20version_X20_X27_X25s_X27_X20_X28_X25i_X29),
|
||||
/* K20 */ be_nested_str(save),
|
||||
/* K21 */ be_nested_str(BRY_X3A_X20could_X20not_X20save_X20compiled_X20file_X20_X25s_X20_X28_X25s_X29),
|
||||
/* K17 */ be_nested_str(BRY_X3A_X20corrupt_X20bytecode_X20_X27_X25s_X27),
|
||||
/* K18 */ be_nested_str(BRY_X3A_X20bytecode_X20has_X20wrong_X20version_X20_X27_X25s_X27_X20_X28_X25i_X29),
|
||||
/* K19 */ be_nested_str(save),
|
||||
/* K20 */ be_nested_str(BRY_X3A_X20could_X20not_X20save_X20compiled_X20file_X20_X25s_X20_X28_X25s_X29),
|
||||
}),
|
||||
&be_const_str_load,
|
||||
&be_const_str_solidified,
|
||||
|
@ -1502,10 +1492,10 @@ be_local_closure(Tasmota_load, /* name */
|
|||
0x1C542615, // 0066 EQ R21 R19 R21
|
||||
0x78560007, // 0067 JMPF R21 #0070
|
||||
0x60540001, // 0068 GETGBL R21 G1
|
||||
0x8C581111, // 0069 GETMET R22 R8 K17
|
||||
0x58600012, // 006A LDCONST R24 K18
|
||||
0x5C642200, // 006B MOVE R25 R17
|
||||
0x7C580600, // 006C CALL R22 3
|
||||
0x60580018, // 0069 GETGBL R22 G24
|
||||
0x585C0011, // 006A LDCONST R23 K17
|
||||
0x5C602200, // 006B MOVE R24 R17
|
||||
0x7C580400, // 006C CALL R22 2
|
||||
0x7C540200, // 006D CALL R21 1
|
||||
0x50500000, // 006E LDBOOL R20 0 0
|
||||
0x7002000A, // 006F JMP #007B
|
||||
|
@ -1513,11 +1503,11 @@ be_local_closure(Tasmota_load, /* name */
|
|||
0x20542615, // 0071 NE R21 R19 R21
|
||||
0x78560007, // 0072 JMPF R21 #007B
|
||||
0x60540001, // 0073 GETGBL R21 G1
|
||||
0x8C581111, // 0074 GETMET R22 R8 K17
|
||||
0x58600013, // 0075 LDCONST R24 K19
|
||||
0x5C642200, // 0076 MOVE R25 R17
|
||||
0x5C682600, // 0077 MOVE R26 R19
|
||||
0x7C580800, // 0078 CALL R22 4
|
||||
0x60580018, // 0074 GETGBL R22 G24
|
||||
0x585C0012, // 0075 LDCONST R23 K18
|
||||
0x5C602200, // 0076 MOVE R24 R17
|
||||
0x5C642600, // 0077 MOVE R25 R19
|
||||
0x7C580600, // 0078 CALL R22 3
|
||||
0x7C540200, // 0079 CALL R21 1
|
||||
0x50500000, // 007A LDBOOL R20 0 0
|
||||
0x78520003, // 007B JMPF R20 #0080
|
||||
|
@ -1548,7 +1538,7 @@ be_local_closure(Tasmota_load, /* name */
|
|||
0x5C4C1A00, // 0094 MOVE R19 R13
|
||||
0x744E0011, // 0095 JMPT R19 #00A8
|
||||
0xA8020005, // 0096 EXBLK 0 #009D
|
||||
0x8C4C0114, // 0097 GETMET R19 R0 K20
|
||||
0x8C4C0113, // 0097 GETMET R19 R0 K19
|
||||
0x5C542200, // 0098 MOVE R21 R17
|
||||
0x5C582400, // 0099 MOVE R22 R18
|
||||
0x7C4C0600, // 009A CALL R19 3
|
||||
|
@ -1557,11 +1547,11 @@ be_local_closure(Tasmota_load, /* name */
|
|||
0xAC4C0001, // 009D CATCH R19 0 1
|
||||
0x70020007, // 009E JMP #00A7
|
||||
0x60500001, // 009F GETGBL R20 G1
|
||||
0x8C541111, // 00A0 GETMET R21 R8 K17
|
||||
0x585C0015, // 00A1 LDCONST R23 K21
|
||||
0x5C602200, // 00A2 MOVE R24 R17
|
||||
0x5C642600, // 00A3 MOVE R25 R19
|
||||
0x7C540800, // 00A4 CALL R21 4
|
||||
0x60540018, // 00A0 GETGBL R21 G24
|
||||
0x58580014, // 00A1 LDCONST R22 K20
|
||||
0x5C5C2200, // 00A2 MOVE R23 R17
|
||||
0x5C602600, // 00A3 MOVE R24 R19
|
||||
0x7C540600, // 00A4 CALL R21 3
|
||||
0x7C500200, // 00A5 CALL R20 1
|
||||
0x70020000, // 00A6 JMP #00A8
|
||||
0xB0080000, // 00A7 RAISE 2 R0 R0
|
||||
|
@ -1750,7 +1740,7 @@ be_local_closure(Tasmota_exec_tele, /* name */
|
|||
********************************************************************/
|
||||
be_local_closure(Tasmota_time_str, /* name */
|
||||
be_nested_proto(
|
||||
13, /* nstack */
|
||||
11, /* nstack */
|
||||
2, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
|
@ -1758,35 +1748,32 @@ be_local_closure(Tasmota_time_str, /* name */
|
|||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[10]) { /* constants */
|
||||
/* K0 */ be_nested_str(string),
|
||||
/* K1 */ be_nested_str(time_dump),
|
||||
/* K2 */ be_nested_str(format),
|
||||
/* K3 */ be_nested_str(_X2504d_X2D_X2502d_X2D_X2502dT_X2502d_X3A_X2502d_X3A_X2502d),
|
||||
/* K4 */ be_nested_str(year),
|
||||
/* K5 */ be_nested_str(month),
|
||||
/* K6 */ be_nested_str(day),
|
||||
/* K7 */ be_nested_str(hour),
|
||||
/* K8 */ be_nested_str(min),
|
||||
/* K9 */ be_nested_str(sec),
|
||||
( &(const bvalue[ 8]) { /* constants */
|
||||
/* K0 */ be_nested_str(time_dump),
|
||||
/* K1 */ be_nested_str(_X2504d_X2D_X2502d_X2D_X2502dT_X2502d_X3A_X2502d_X3A_X2502d),
|
||||
/* K2 */ be_nested_str(year),
|
||||
/* K3 */ be_nested_str(month),
|
||||
/* K4 */ be_nested_str(day),
|
||||
/* K5 */ be_nested_str(hour),
|
||||
/* K6 */ be_nested_str(min),
|
||||
/* K7 */ be_nested_str(sec),
|
||||
}),
|
||||
&be_const_str_time_str,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[14]) { /* code */
|
||||
0xA40A0000, // 0000 IMPORT R2 K0
|
||||
0x8C0C0101, // 0001 GETMET R3 R0 K1
|
||||
0x5C140200, // 0002 MOVE R5 R1
|
||||
0x7C0C0400, // 0003 CALL R3 2
|
||||
0x8C100502, // 0004 GETMET R4 R2 K2
|
||||
0x58180003, // 0005 LDCONST R6 K3
|
||||
0x941C0704, // 0006 GETIDX R7 R3 K4
|
||||
0x94200705, // 0007 GETIDX R8 R3 K5
|
||||
0x94240706, // 0008 GETIDX R9 R3 K6
|
||||
0x94280707, // 0009 GETIDX R10 R3 K7
|
||||
0x942C0708, // 000A GETIDX R11 R3 K8
|
||||
0x94300709, // 000B GETIDX R12 R3 K9
|
||||
0x7C101000, // 000C CALL R4 8
|
||||
0x80040800, // 000D RET 1 R4
|
||||
( &(const binstruction[13]) { /* code */
|
||||
0x8C080100, // 0000 GETMET R2 R0 K0
|
||||
0x5C100200, // 0001 MOVE R4 R1
|
||||
0x7C080400, // 0002 CALL R2 2
|
||||
0x600C0018, // 0003 GETGBL R3 G24
|
||||
0x58100001, // 0004 LDCONST R4 K1
|
||||
0x94140502, // 0005 GETIDX R5 R2 K2
|
||||
0x94180503, // 0006 GETIDX R6 R2 K3
|
||||
0x941C0504, // 0007 GETIDX R7 R2 K4
|
||||
0x94200505, // 0008 GETIDX R8 R2 K5
|
||||
0x94240506, // 0009 GETIDX R9 R2 K6
|
||||
0x94280507, // 000A GETIDX R10 R2 K7
|
||||
0x7C0C0E00, // 000B CALL R3 7
|
||||
0x80040600, // 000C RET 1 R3
|
||||
})
|
||||
)
|
||||
);
|
||||
|
@ -2315,7 +2302,7 @@ be_local_closure(Tasmota_gen_cb, /* name */
|
|||
********************************************************************/
|
||||
be_local_closure(Tasmota_event, /* name */
|
||||
be_nested_proto(
|
||||
21, /* nstack */
|
||||
19, /* nstack */
|
||||
6, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
|
@ -2323,147 +2310,144 @@ be_local_closure(Tasmota_event, /* name */
|
|||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[27]) { /* constants */
|
||||
( &(const bvalue[25]) { /* constants */
|
||||
/* K0 */ be_nested_str(introspect),
|
||||
/* K1 */ be_nested_str(string),
|
||||
/* K2 */ be_nested_str(every_50ms),
|
||||
/* K3 */ be_nested_str(run_deferred),
|
||||
/* K4 */ be_nested_str(every_250ms),
|
||||
/* K5 */ be_nested_str(run_cron),
|
||||
/* K6 */ be_nested_str(mqtt_data),
|
||||
/* K7 */ be_nested_str(cmd),
|
||||
/* K8 */ be_nested_str(exec_cmd),
|
||||
/* K9 */ be_nested_str(tele),
|
||||
/* K10 */ be_nested_str(exec_tele),
|
||||
/* K11 */ be_nested_str(rule),
|
||||
/* K12 */ be_nested_str(exec_rules),
|
||||
/* K13 */ be_nested_str(gc),
|
||||
/* K14 */ be_nested_str(_drivers),
|
||||
/* K15 */ be_const_int(0),
|
||||
/* K16 */ be_nested_str(get),
|
||||
/* K17 */ be_nested_str(function),
|
||||
/* K18 */ be_nested_str(format),
|
||||
/* K19 */ be_nested_str(BRY_X3A_X20Exception_X3E_X20_X27_X25s_X27_X20_X2D_X20_X25s),
|
||||
/* K20 */ be_nested_str(_debug_present),
|
||||
/* K21 */ be_nested_str(debug),
|
||||
/* K22 */ be_nested_str(traceback),
|
||||
/* K23 */ be_const_int(1),
|
||||
/* K24 */ be_nested_str(save_before_restart),
|
||||
/* K25 */ be_nested_str(persist),
|
||||
/* K26 */ be_nested_str(save),
|
||||
/* K1 */ be_nested_str(every_50ms),
|
||||
/* K2 */ be_nested_str(run_deferred),
|
||||
/* K3 */ be_nested_str(every_250ms),
|
||||
/* K4 */ be_nested_str(run_cron),
|
||||
/* K5 */ be_nested_str(mqtt_data),
|
||||
/* K6 */ be_nested_str(cmd),
|
||||
/* K7 */ be_nested_str(exec_cmd),
|
||||
/* K8 */ be_nested_str(tele),
|
||||
/* K9 */ be_nested_str(exec_tele),
|
||||
/* K10 */ be_nested_str(rule),
|
||||
/* K11 */ be_nested_str(exec_rules),
|
||||
/* K12 */ be_nested_str(gc),
|
||||
/* K13 */ be_nested_str(_drivers),
|
||||
/* K14 */ be_const_int(0),
|
||||
/* K15 */ be_nested_str(get),
|
||||
/* K16 */ be_nested_str(function),
|
||||
/* K17 */ be_nested_str(BRY_X3A_X20Exception_X3E_X20_X27_X25s_X27_X20_X2D_X20_X25s),
|
||||
/* K18 */ be_nested_str(_debug_present),
|
||||
/* K19 */ be_nested_str(debug),
|
||||
/* K20 */ be_nested_str(traceback),
|
||||
/* K21 */ be_const_int(1),
|
||||
/* K22 */ be_nested_str(save_before_restart),
|
||||
/* K23 */ be_nested_str(persist),
|
||||
/* K24 */ be_nested_str(save),
|
||||
}),
|
||||
&be_const_str_event,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[109]) { /* code */
|
||||
( &(const binstruction[108]) { /* code */
|
||||
0xA41A0000, // 0000 IMPORT R6 K0
|
||||
0xA41E0200, // 0001 IMPORT R7 K1
|
||||
0x1C200302, // 0002 EQ R8 R1 K2
|
||||
0x78220001, // 0003 JMPF R8 #0006
|
||||
0x8C200103, // 0004 GETMET R8 R0 K3
|
||||
0x7C200200, // 0005 CALL R8 1
|
||||
0x1C200304, // 0006 EQ R8 R1 K4
|
||||
0x78220001, // 0007 JMPF R8 #000A
|
||||
0x8C200105, // 0008 GETMET R8 R0 K5
|
||||
0x7C200200, // 0009 CALL R8 1
|
||||
0x1C1C0301, // 0001 EQ R7 R1 K1
|
||||
0x781E0001, // 0002 JMPF R7 #0005
|
||||
0x8C1C0102, // 0003 GETMET R7 R0 K2
|
||||
0x7C1C0200, // 0004 CALL R7 1
|
||||
0x1C1C0303, // 0005 EQ R7 R1 K3
|
||||
0x781E0001, // 0006 JMPF R7 #0009
|
||||
0x8C1C0104, // 0007 GETMET R7 R0 K4
|
||||
0x7C1C0200, // 0008 CALL R7 1
|
||||
0x501C0000, // 0009 LDBOOL R7 0 0
|
||||
0x50200000, // 000A LDBOOL R8 0 0
|
||||
0x50240000, // 000B LDBOOL R9 0 0
|
||||
0x1C280306, // 000C EQ R10 R1 K6
|
||||
0x782A0000, // 000D JMPF R10 #000F
|
||||
0x50240200, // 000E LDBOOL R9 1 0
|
||||
0x1C280307, // 000F EQ R10 R1 K7
|
||||
0x782A0006, // 0010 JMPF R10 #0018
|
||||
0x8C280108, // 0011 GETMET R10 R0 K8
|
||||
0x5C300400, // 0012 MOVE R12 R2
|
||||
0x5C340600, // 0013 MOVE R13 R3
|
||||
0x5C380800, // 0014 MOVE R14 R4
|
||||
0x7C280800, // 0015 CALL R10 4
|
||||
0x80041400, // 0016 RET 1 R10
|
||||
0x7002004E, // 0017 JMP #0067
|
||||
0x1C280309, // 0018 EQ R10 R1 K9
|
||||
0x782A0004, // 0019 JMPF R10 #001F
|
||||
0x8C28010A, // 001A GETMET R10 R0 K10
|
||||
0x5C300800, // 001B MOVE R12 R4
|
||||
0x7C280400, // 001C CALL R10 2
|
||||
0x80041400, // 001D RET 1 R10
|
||||
0x70020047, // 001E JMP #0067
|
||||
0x1C28030B, // 001F EQ R10 R1 K11
|
||||
0x782A0007, // 0020 JMPF R10 #0029
|
||||
0x8C28010C, // 0021 GETMET R10 R0 K12
|
||||
0x5C300800, // 0022 MOVE R12 R4
|
||||
0x60340017, // 0023 GETGBL R13 G23
|
||||
0x5C380600, // 0024 MOVE R14 R3
|
||||
0x7C340200, // 0025 CALL R13 1
|
||||
0x7C280600, // 0026 CALL R10 3
|
||||
0x80041400, // 0027 RET 1 R10
|
||||
0x7002003D, // 0028 JMP #0067
|
||||
0x1C28030D, // 0029 EQ R10 R1 K13
|
||||
0x782A0003, // 002A JMPF R10 #002F
|
||||
0x8C28010D, // 002B GETMET R10 R0 K13
|
||||
0x7C280200, // 002C CALL R10 1
|
||||
0x80041400, // 002D RET 1 R10
|
||||
0x70020037, // 002E JMP #0067
|
||||
0x8828010E, // 002F GETMBR R10 R0 K14
|
||||
0x782A0035, // 0030 JMPF R10 #0067
|
||||
0x5828000F, // 0031 LDCONST R10 K15
|
||||
0x602C000C, // 0032 GETGBL R11 G12
|
||||
0x8830010E, // 0033 GETMBR R12 R0 K14
|
||||
0x7C2C0200, // 0034 CALL R11 1
|
||||
0x142C140B, // 0035 LT R11 R10 R11
|
||||
0x782E002F, // 0036 JMPF R11 #0067
|
||||
0x882C010E, // 0037 GETMBR R11 R0 K14
|
||||
0x942C160A, // 0038 GETIDX R11 R11 R10
|
||||
0x8C300D10, // 0039 GETMET R12 R6 K16
|
||||
0x5C381600, // 003A MOVE R14 R11
|
||||
0x5C3C0200, // 003B MOVE R15 R1
|
||||
0x7C300600, // 003C CALL R12 3
|
||||
0x60340004, // 003D GETGBL R13 G4
|
||||
0x5C381800, // 003E MOVE R14 R12
|
||||
0x7C340200, // 003F CALL R13 1
|
||||
0x1C341B11, // 0040 EQ R13 R13 K17
|
||||
0x78360022, // 0041 JMPF R13 #0065
|
||||
0xA8020011, // 0042 EXBLK 0 #0055
|
||||
0x5C341800, // 0043 MOVE R13 R12
|
||||
0x5C381600, // 0044 MOVE R14 R11
|
||||
0x5C3C0400, // 0045 MOVE R15 R2
|
||||
0x5C400600, // 0046 MOVE R16 R3
|
||||
0x5C440800, // 0047 MOVE R17 R4
|
||||
0x5C480A00, // 0048 MOVE R18 R5
|
||||
0x7C340A00, // 0049 CALL R13 5
|
||||
0x74360001, // 004A JMPT R13 #004D
|
||||
0x74220000, // 004B JMPT R8 #004D
|
||||
0x50200001, // 004C LDBOOL R8 0 1
|
||||
0x50200200, // 004D LDBOOL R8 1 0
|
||||
0x78220003, // 004E JMPF R8 #0053
|
||||
0x5C341200, // 004F MOVE R13 R9
|
||||
0x74360001, // 0050 JMPT R13 #0053
|
||||
0xA8040001, // 0051 EXBLK 1 1
|
||||
0x70020013, // 0052 JMP #0067
|
||||
0xA8040001, // 0053 EXBLK 1 1
|
||||
0x7002000F, // 0054 JMP #0065
|
||||
0xAC340002, // 0055 CATCH R13 0 2
|
||||
0x7002000C, // 0056 JMP #0064
|
||||
0x603C0001, // 0057 GETGBL R15 G1
|
||||
0x8C400F12, // 0058 GETMET R16 R7 K18
|
||||
0x58480013, // 0059 LDCONST R18 K19
|
||||
0x5C4C1A00, // 005A MOVE R19 R13
|
||||
0x5C501C00, // 005B MOVE R20 R14
|
||||
0x7C400800, // 005C CALL R16 4
|
||||
0x7C3C0200, // 005D CALL R15 1
|
||||
0x883C0114, // 005E GETMBR R15 R0 K20
|
||||
0x783E0002, // 005F JMPF R15 #0063
|
||||
0xA43E2A00, // 0060 IMPORT R15 K21
|
||||
0x8C401F16, // 0061 GETMET R16 R15 K22
|
||||
0x7C400200, // 0062 CALL R16 1
|
||||
0x70020000, // 0063 JMP #0065
|
||||
0xB0080000, // 0064 RAISE 2 R0 R0
|
||||
0x00281517, // 0065 ADD R10 R10 K23
|
||||
0x7001FFCA, // 0066 JMP #0032
|
||||
0x1C280318, // 0067 EQ R10 R1 K24
|
||||
0x782A0002, // 0068 JMPF R10 #006C
|
||||
0xA42A3200, // 0069 IMPORT R10 K25
|
||||
0x8C2C151A, // 006A GETMET R11 R10 K26
|
||||
0x7C2C0200, // 006B CALL R11 1
|
||||
0x80041000, // 006C RET 1 R8
|
||||
0x1C240305, // 000B EQ R9 R1 K5
|
||||
0x78260000, // 000C JMPF R9 #000E
|
||||
0x50200200, // 000D LDBOOL R8 1 0
|
||||
0x1C240306, // 000E EQ R9 R1 K6
|
||||
0x78260006, // 000F JMPF R9 #0017
|
||||
0x8C240107, // 0010 GETMET R9 R0 K7
|
||||
0x5C2C0400, // 0011 MOVE R11 R2
|
||||
0x5C300600, // 0012 MOVE R12 R3
|
||||
0x5C340800, // 0013 MOVE R13 R4
|
||||
0x7C240800, // 0014 CALL R9 4
|
||||
0x80041200, // 0015 RET 1 R9
|
||||
0x7002004E, // 0016 JMP #0066
|
||||
0x1C240308, // 0017 EQ R9 R1 K8
|
||||
0x78260004, // 0018 JMPF R9 #001E
|
||||
0x8C240109, // 0019 GETMET R9 R0 K9
|
||||
0x5C2C0800, // 001A MOVE R11 R4
|
||||
0x7C240400, // 001B CALL R9 2
|
||||
0x80041200, // 001C RET 1 R9
|
||||
0x70020047, // 001D JMP #0066
|
||||
0x1C24030A, // 001E EQ R9 R1 K10
|
||||
0x78260007, // 001F JMPF R9 #0028
|
||||
0x8C24010B, // 0020 GETMET R9 R0 K11
|
||||
0x5C2C0800, // 0021 MOVE R11 R4
|
||||
0x60300017, // 0022 GETGBL R12 G23
|
||||
0x5C340600, // 0023 MOVE R13 R3
|
||||
0x7C300200, // 0024 CALL R12 1
|
||||
0x7C240600, // 0025 CALL R9 3
|
||||
0x80041200, // 0026 RET 1 R9
|
||||
0x7002003D, // 0027 JMP #0066
|
||||
0x1C24030C, // 0028 EQ R9 R1 K12
|
||||
0x78260003, // 0029 JMPF R9 #002E
|
||||
0x8C24010C, // 002A GETMET R9 R0 K12
|
||||
0x7C240200, // 002B CALL R9 1
|
||||
0x80041200, // 002C RET 1 R9
|
||||
0x70020037, // 002D JMP #0066
|
||||
0x8824010D, // 002E GETMBR R9 R0 K13
|
||||
0x78260035, // 002F JMPF R9 #0066
|
||||
0x5824000E, // 0030 LDCONST R9 K14
|
||||
0x6028000C, // 0031 GETGBL R10 G12
|
||||
0x882C010D, // 0032 GETMBR R11 R0 K13
|
||||
0x7C280200, // 0033 CALL R10 1
|
||||
0x1428120A, // 0034 LT R10 R9 R10
|
||||
0x782A002F, // 0035 JMPF R10 #0066
|
||||
0x8828010D, // 0036 GETMBR R10 R0 K13
|
||||
0x94281409, // 0037 GETIDX R10 R10 R9
|
||||
0x8C2C0D0F, // 0038 GETMET R11 R6 K15
|
||||
0x5C341400, // 0039 MOVE R13 R10
|
||||
0x5C380200, // 003A MOVE R14 R1
|
||||
0x7C2C0600, // 003B CALL R11 3
|
||||
0x60300004, // 003C GETGBL R12 G4
|
||||
0x5C341600, // 003D MOVE R13 R11
|
||||
0x7C300200, // 003E CALL R12 1
|
||||
0x1C301910, // 003F EQ R12 R12 K16
|
||||
0x78320022, // 0040 JMPF R12 #0064
|
||||
0xA8020011, // 0041 EXBLK 0 #0054
|
||||
0x5C301600, // 0042 MOVE R12 R11
|
||||
0x5C341400, // 0043 MOVE R13 R10
|
||||
0x5C380400, // 0044 MOVE R14 R2
|
||||
0x5C3C0600, // 0045 MOVE R15 R3
|
||||
0x5C400800, // 0046 MOVE R16 R4
|
||||
0x5C440A00, // 0047 MOVE R17 R5
|
||||
0x7C300A00, // 0048 CALL R12 5
|
||||
0x74320001, // 0049 JMPT R12 #004C
|
||||
0x741E0000, // 004A JMPT R7 #004C
|
||||
0x501C0001, // 004B LDBOOL R7 0 1
|
||||
0x501C0200, // 004C LDBOOL R7 1 0
|
||||
0x781E0003, // 004D JMPF R7 #0052
|
||||
0x5C301000, // 004E MOVE R12 R8
|
||||
0x74320001, // 004F JMPT R12 #0052
|
||||
0xA8040001, // 0050 EXBLK 1 1
|
||||
0x70020013, // 0051 JMP #0066
|
||||
0xA8040001, // 0052 EXBLK 1 1
|
||||
0x7002000F, // 0053 JMP #0064
|
||||
0xAC300002, // 0054 CATCH R12 0 2
|
||||
0x7002000C, // 0055 JMP #0063
|
||||
0x60380001, // 0056 GETGBL R14 G1
|
||||
0x603C0018, // 0057 GETGBL R15 G24
|
||||
0x58400011, // 0058 LDCONST R16 K17
|
||||
0x5C441800, // 0059 MOVE R17 R12
|
||||
0x5C481A00, // 005A MOVE R18 R13
|
||||
0x7C3C0600, // 005B CALL R15 3
|
||||
0x7C380200, // 005C CALL R14 1
|
||||
0x88380112, // 005D GETMBR R14 R0 K18
|
||||
0x783A0002, // 005E JMPF R14 #0062
|
||||
0xA43A2600, // 005F IMPORT R14 K19
|
||||
0x8C3C1D14, // 0060 GETMET R15 R14 K20
|
||||
0x7C3C0200, // 0061 CALL R15 1
|
||||
0x70020000, // 0062 JMP #0064
|
||||
0xB0080000, // 0063 RAISE 2 R0 R0
|
||||
0x00241315, // 0064 ADD R9 R9 K21
|
||||
0x7001FFCA, // 0065 JMP #0031
|
||||
0x1C240316, // 0066 EQ R9 R1 K22
|
||||
0x78260002, // 0067 JMPF R9 #006B
|
||||
0xA4262E00, // 0068 IMPORT R9 K23
|
||||
0x8C281318, // 0069 GETMET R10 R9 K24
|
||||
0x7C280200, // 006A CALL R10 1
|
||||
0x80040E00, // 006B RET 1 R7
|
||||
})
|
||||
)
|
||||
);
|
||||
|
|
|
@ -44,7 +44,7 @@ be_local_closure(Trigger_init, /* name */
|
|||
********************************************************************/
|
||||
be_local_closure(Trigger_tostring, /* name */
|
||||
be_nested_proto(
|
||||
10, /* nstack */
|
||||
8, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
|
@ -52,36 +52,33 @@ be_local_closure(Trigger_tostring, /* name */
|
|||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 6]) { /* constants */
|
||||
/* K0 */ be_nested_str(string),
|
||||
/* K1 */ be_nested_str(format),
|
||||
/* K2 */ be_nested_str(_X3Cinstance_X3A_X20_X25s_X28_X25s_X2C_X20_X25s_X2C_X20_X25s_X29),
|
||||
/* K3 */ be_nested_str(trig),
|
||||
/* K4 */ be_nested_str(f),
|
||||
/* K5 */ be_nested_str(id),
|
||||
( &(const bvalue[ 4]) { /* constants */
|
||||
/* K0 */ be_nested_str(_X3Cinstance_X3A_X20_X25s_X28_X25s_X2C_X20_X25s_X2C_X20_X25s_X29),
|
||||
/* K1 */ be_nested_str(trig),
|
||||
/* K2 */ be_nested_str(f),
|
||||
/* K3 */ be_nested_str(id),
|
||||
}),
|
||||
&be_const_str_tostring,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[19]) { /* code */
|
||||
0xA4060000, // 0000 IMPORT R1 K0
|
||||
0x8C080301, // 0001 GETMET R2 R1 K1
|
||||
0x58100002, // 0002 LDCONST R4 K2
|
||||
0x60140008, // 0003 GETGBL R5 G8
|
||||
0x60180006, // 0004 GETGBL R6 G6
|
||||
0x5C1C0000, // 0005 MOVE R7 R0
|
||||
0x7C180200, // 0006 CALL R6 1
|
||||
0x7C140200, // 0007 CALL R5 1
|
||||
0x60180008, // 0008 GETGBL R6 G8
|
||||
0x881C0103, // 0009 GETMBR R7 R0 K3
|
||||
0x7C180200, // 000A CALL R6 1
|
||||
0x601C0008, // 000B GETGBL R7 G8
|
||||
0x88200104, // 000C GETMBR R8 R0 K4
|
||||
0x7C1C0200, // 000D CALL R7 1
|
||||
0x60200008, // 000E GETGBL R8 G8
|
||||
0x88240105, // 000F GETMBR R9 R0 K5
|
||||
0x7C200200, // 0010 CALL R8 1
|
||||
0x7C080C00, // 0011 CALL R2 6
|
||||
0x80040400, // 0012 RET 1 R2
|
||||
( &(const binstruction[18]) { /* code */
|
||||
0x60040018, // 0000 GETGBL R1 G24
|
||||
0x58080000, // 0001 LDCONST R2 K0
|
||||
0x600C0008, // 0002 GETGBL R3 G8
|
||||
0x60100006, // 0003 GETGBL R4 G6
|
||||
0x5C140000, // 0004 MOVE R5 R0
|
||||
0x7C100200, // 0005 CALL R4 1
|
||||
0x7C0C0200, // 0006 CALL R3 1
|
||||
0x60100008, // 0007 GETGBL R4 G8
|
||||
0x88140101, // 0008 GETMBR R5 R0 K1
|
||||
0x7C100200, // 0009 CALL R4 1
|
||||
0x60140008, // 000A GETGBL R5 G8
|
||||
0x88180102, // 000B GETMBR R6 R0 K2
|
||||
0x7C140200, // 000C CALL R5 1
|
||||
0x60180008, // 000D GETGBL R6 G8
|
||||
0x881C0103, // 000E GETMBR R7 R0 K3
|
||||
0x7C180200, // 000F CALL R6 1
|
||||
0x7C040A00, // 0010 CALL R1 5
|
||||
0x80040200, // 0011 RET 1 R1
|
||||
})
|
||||
)
|
||||
);
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
********************************************************************/
|
||||
be_local_closure(uuid__anonymous_, /* name */
|
||||
be_nested_proto(
|
||||
12, /* nstack */
|
||||
10, /* nstack */
|
||||
0, /* argc */
|
||||
0, /* varg */
|
||||
0, /* has upvals */
|
||||
|
@ -17,46 +17,43 @@ be_local_closure(uuid__anonymous_, /* name */
|
|||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 5]) { /* constants */
|
||||
/* K0 */ be_nested_str(string),
|
||||
/* K1 */ be_nested_str(math),
|
||||
/* K2 */ be_nested_str(format),
|
||||
/* K3 */ be_nested_str(_X2508x_X2D_X2504x_X2D_X2504x_X2D_X2504x_X2D_X2504x_X2508x),
|
||||
/* K4 */ be_nested_str(rand),
|
||||
( &(const bvalue[ 3]) { /* constants */
|
||||
/* K0 */ be_nested_str(math),
|
||||
/* K1 */ be_nested_str(_X2508x_X2D_X2504x_X2D_X2504x_X2D_X2504x_X2D_X2504x_X2508x),
|
||||
/* K2 */ be_nested_str(rand),
|
||||
}),
|
||||
&be_const_str__anonymous_,
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[30]) { /* code */
|
||||
( &(const binstruction[29]) { /* code */
|
||||
0xA4020000, // 0000 IMPORT R0 K0
|
||||
0xA4060200, // 0001 IMPORT R1 K1
|
||||
0x8C080102, // 0002 GETMET R2 R0 K2
|
||||
0x58100003, // 0003 LDCONST R4 K3
|
||||
0x8C140304, // 0004 GETMET R5 R1 K4
|
||||
0x7C140200, // 0005 CALL R5 1
|
||||
0x8C180304, // 0006 GETMET R6 R1 K4
|
||||
0x7C180200, // 0007 CALL R6 1
|
||||
0x541EFFFE, // 0008 LDINT R7 65535
|
||||
0x2C180C07, // 0009 AND R6 R6 R7
|
||||
0x8C1C0304, // 000A GETMET R7 R1 K4
|
||||
0x7C1C0200, // 000B CALL R7 1
|
||||
0x54220FFE, // 000C LDINT R8 4095
|
||||
0x2C1C0E08, // 000D AND R7 R7 R8
|
||||
0x54223FFF, // 000E LDINT R8 16384
|
||||
0x301C0E08, // 000F OR R7 R7 R8
|
||||
0x8C200304, // 0010 GETMET R8 R1 K4
|
||||
0x7C200200, // 0011 CALL R8 1
|
||||
0x54263FFE, // 0012 LDINT R9 16383
|
||||
0x2C201009, // 0013 AND R8 R8 R9
|
||||
0x54267FFF, // 0014 LDINT R9 32768
|
||||
0x30201009, // 0015 OR R8 R8 R9
|
||||
0x8C240304, // 0016 GETMET R9 R1 K4
|
||||
0x7C240200, // 0017 CALL R9 1
|
||||
0x542AFFFE, // 0018 LDINT R10 65535
|
||||
0x2C24120A, // 0019 AND R9 R9 R10
|
||||
0x8C280304, // 001A GETMET R10 R1 K4
|
||||
0x7C280200, // 001B CALL R10 1
|
||||
0x7C081000, // 001C CALL R2 8
|
||||
0x80040400, // 001D RET 1 R2
|
||||
0x60040018, // 0001 GETGBL R1 G24
|
||||
0x58080001, // 0002 LDCONST R2 K1
|
||||
0x8C0C0102, // 0003 GETMET R3 R0 K2
|
||||
0x7C0C0200, // 0004 CALL R3 1
|
||||
0x8C100102, // 0005 GETMET R4 R0 K2
|
||||
0x7C100200, // 0006 CALL R4 1
|
||||
0x5416FFFE, // 0007 LDINT R5 65535
|
||||
0x2C100805, // 0008 AND R4 R4 R5
|
||||
0x8C140102, // 0009 GETMET R5 R0 K2
|
||||
0x7C140200, // 000A CALL R5 1
|
||||
0x541A0FFE, // 000B LDINT R6 4095
|
||||
0x2C140A06, // 000C AND R5 R5 R6
|
||||
0x541A3FFF, // 000D LDINT R6 16384
|
||||
0x30140A06, // 000E OR R5 R5 R6
|
||||
0x8C180102, // 000F GETMET R6 R0 K2
|
||||
0x7C180200, // 0010 CALL R6 1
|
||||
0x541E3FFE, // 0011 LDINT R7 16383
|
||||
0x2C180C07, // 0012 AND R6 R6 R7
|
||||
0x541E7FFF, // 0013 LDINT R7 32768
|
||||
0x30180C07, // 0014 OR R6 R6 R7
|
||||
0x8C1C0102, // 0015 GETMET R7 R0 K2
|
||||
0x7C1C0200, // 0016 CALL R7 1
|
||||
0x5422FFFE, // 0017 LDINT R8 65535
|
||||
0x2C1C0E08, // 0018 AND R7 R7 R8
|
||||
0x8C200102, // 0019 GETMET R8 R0 K2
|
||||
0x7C200200, // 001A CALL R8 1
|
||||
0x7C040E00, // 001B CALL R1 7
|
||||
0x80040200, // 001C RET 1 R1
|
||||
})
|
||||
)
|
||||
);
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
********************************************************************/
|
||||
be_local_closure(zb_device_tostring, /* name */
|
||||
be_nested_proto(
|
||||
14, /* nstack */
|
||||
12, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
|
@ -17,44 +17,41 @@ be_local_closure(zb_device_tostring, /* name */
|
|||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[11]) { /* constants */
|
||||
( &(const bvalue[ 9]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(json),
|
||||
/* K1 */ be_nested_str_weak(string),
|
||||
/* K2 */ be_nested_str_weak(longaddr),
|
||||
/* K3 */ be_nested_str_weak(format),
|
||||
/* K4 */ be_nested_str_weak(_X3Cinstance_X3A_X20_X25s_X280x_X2504X_X2C_X200x_X2508X_X2508X_X2C_X20name_X3A_X27_X25s_X27_X2C_X20model_X3A_X27_X25s_X27_X2C_X20manufacturer_X3A_X27_X25s_X27_X29_X3E),
|
||||
/* K5 */ be_nested_str_weak(shortaddr),
|
||||
/* K6 */ be_nested_str_weak(get),
|
||||
/* K7 */ be_const_int(0),
|
||||
/* K8 */ be_nested_str_weak(name),
|
||||
/* K9 */ be_nested_str_weak(model),
|
||||
/* K10 */ be_nested_str_weak(manufacturer),
|
||||
/* K1 */ be_nested_str_weak(longaddr),
|
||||
/* K2 */ be_nested_str_weak(_X3Cinstance_X3A_X20_X25s_X280x_X2504X_X2C_X200x_X2508X_X2508X_X2C_X20name_X3A_X27_X25s_X27_X2C_X20model_X3A_X27_X25s_X27_X2C_X20manufacturer_X3A_X27_X25s_X27_X29_X3E),
|
||||
/* K3 */ be_nested_str_weak(shortaddr),
|
||||
/* K4 */ be_nested_str_weak(get),
|
||||
/* K5 */ be_const_int(0),
|
||||
/* K6 */ be_nested_str_weak(name),
|
||||
/* K7 */ be_nested_str_weak(model),
|
||||
/* K8 */ be_nested_str_weak(manufacturer),
|
||||
}),
|
||||
be_str_weak(tostring),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[22]) { /* code */
|
||||
( &(const binstruction[21]) { /* code */
|
||||
0xA4060000, // 0000 IMPORT R1 K0
|
||||
0xA40A0200, // 0001 IMPORT R2 K1
|
||||
0x880C0102, // 0002 GETMBR R3 R0 K2
|
||||
0x8C100503, // 0003 GETMET R4 R2 K3
|
||||
0x58180004, // 0004 LDCONST R6 K4
|
||||
0x601C0005, // 0005 GETGBL R7 G5
|
||||
0x5C200000, // 0006 MOVE R8 R0
|
||||
0x7C1C0200, // 0007 CALL R7 1
|
||||
0x88200105, // 0008 GETMBR R8 R0 K5
|
||||
0x8C240706, // 0009 GETMET R9 R3 K6
|
||||
0x542E0003, // 000A LDINT R11 4
|
||||
0x54320003, // 000B LDINT R12 4
|
||||
0x7C240600, // 000C CALL R9 3
|
||||
0x8C280706, // 000D GETMET R10 R3 K6
|
||||
0x58300007, // 000E LDCONST R12 K7
|
||||
0x54360003, // 000F LDINT R13 4
|
||||
0x7C280600, // 0010 CALL R10 3
|
||||
0x882C0108, // 0011 GETMBR R11 R0 K8
|
||||
0x88300109, // 0012 GETMBR R12 R0 K9
|
||||
0x8834010A, // 0013 GETMBR R13 R0 K10
|
||||
0x7C101200, // 0014 CALL R4 9
|
||||
0x80040800, // 0015 RET 1 R4
|
||||
0x88080101, // 0001 GETMBR R2 R0 K1
|
||||
0x600C0018, // 0002 GETGBL R3 G24
|
||||
0x58100002, // 0003 LDCONST R4 K2
|
||||
0x60140005, // 0004 GETGBL R5 G5
|
||||
0x5C180000, // 0005 MOVE R6 R0
|
||||
0x7C140200, // 0006 CALL R5 1
|
||||
0x88180103, // 0007 GETMBR R6 R0 K3
|
||||
0x8C1C0504, // 0008 GETMET R7 R2 K4
|
||||
0x54260003, // 0009 LDINT R9 4
|
||||
0x542A0003, // 000A LDINT R10 4
|
||||
0x7C1C0600, // 000B CALL R7 3
|
||||
0x8C200504, // 000C GETMET R8 R2 K4
|
||||
0x58280005, // 000D LDCONST R10 K5
|
||||
0x542E0003, // 000E LDINT R11 4
|
||||
0x7C200600, // 000F CALL R8 3
|
||||
0x88240106, // 0010 GETMBR R9 R0 K6
|
||||
0x88280107, // 0011 GETMBR R10 R0 K7
|
||||
0x882C0108, // 0012 GETMBR R11 R0 K8
|
||||
0x7C0C1000, // 0013 CALL R3 8
|
||||
0x80040600, // 0014 RET 1 R3
|
||||
})
|
||||
)
|
||||
);
|
||||
|
|
|
@ -97,7 +97,7 @@ be_local_closure(zb_coord_add_handler, /* name */
|
|||
********************************************************************/
|
||||
be_local_closure(zb_coord_dispatch, /* name */
|
||||
be_nested_proto(
|
||||
21, /* nstack */
|
||||
19, /* nstack */
|
||||
5, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
|
@ -105,98 +105,95 @@ be_local_closure(zb_coord_dispatch, /* name */
|
|||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[16]) { /* constants */
|
||||
( &(const bvalue[14]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(_handlers),
|
||||
/* K1 */ be_nested_str_weak(introspect),
|
||||
/* K2 */ be_nested_str_weak(string),
|
||||
/* K3 */ be_nested_str_weak(toptr),
|
||||
/* K4 */ be_const_int(0),
|
||||
/* K5 */ be_nested_str_weak(zcl_frame),
|
||||
/* K6 */ be_nested_str_weak(zcl_attribute_list),
|
||||
/* K7 */ be_nested_str_weak(get),
|
||||
/* K8 */ be_nested_str_weak(function),
|
||||
/* K9 */ be_nested_str_weak(format),
|
||||
/* K10 */ be_nested_str_weak(BRY_X3A_X20Exception_X3E_X20_X27_X25s_X27_X20_X2D_X20_X25s),
|
||||
/* K11 */ be_nested_str_weak(tasmota),
|
||||
/* K12 */ be_nested_str_weak(_debug_present),
|
||||
/* K13 */ be_nested_str_weak(debug),
|
||||
/* K14 */ be_nested_str_weak(traceback),
|
||||
/* K15 */ be_const_int(1),
|
||||
/* K2 */ be_nested_str_weak(toptr),
|
||||
/* K3 */ be_const_int(0),
|
||||
/* K4 */ be_nested_str_weak(zcl_frame),
|
||||
/* K5 */ be_nested_str_weak(zcl_attribute_list),
|
||||
/* K6 */ be_nested_str_weak(get),
|
||||
/* K7 */ be_nested_str_weak(function),
|
||||
/* K8 */ be_nested_str_weak(BRY_X3A_X20Exception_X3E_X20_X27_X25s_X27_X20_X2D_X20_X25s),
|
||||
/* K9 */ be_nested_str_weak(tasmota),
|
||||
/* K10 */ be_nested_str_weak(_debug_present),
|
||||
/* K11 */ be_nested_str_weak(debug),
|
||||
/* K12 */ be_nested_str_weak(traceback),
|
||||
/* K13 */ be_const_int(1),
|
||||
}),
|
||||
be_str_weak(dispatch),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[71]) { /* code */
|
||||
( &(const binstruction[70]) { /* code */
|
||||
0x88140100, // 0000 GETMBR R5 R0 K0
|
||||
0x4C180000, // 0001 LDNIL R6
|
||||
0x1C140A06, // 0002 EQ R5 R5 R6
|
||||
0x78160000, // 0003 JMPF R5 #0005
|
||||
0x80000A00, // 0004 RET 0
|
||||
0xA4160200, // 0005 IMPORT R5 K1
|
||||
0xA41A0400, // 0006 IMPORT R6 K2
|
||||
0x4C180000, // 0006 LDNIL R6
|
||||
0x4C1C0000, // 0007 LDNIL R7
|
||||
0x4C200000, // 0008 LDNIL R8
|
||||
0x8C240B03, // 0009 GETMET R9 R5 K3
|
||||
0x582C0004, // 000A LDCONST R11 K4
|
||||
0x7C240400, // 000B CALL R9 2
|
||||
0x20280409, // 000C NE R10 R2 R9
|
||||
0x782A0003, // 000D JMPF R10 #0012
|
||||
0x8C280105, // 000E GETMET R10 R0 K5
|
||||
0x5C300400, // 000F MOVE R12 R2
|
||||
0x7C280400, // 0010 CALL R10 2
|
||||
0x5C1C1400, // 0011 MOVE R7 R10
|
||||
0x20280609, // 0012 NE R10 R3 R9
|
||||
0x782A0003, // 0013 JMPF R10 #0018
|
||||
0x8C280106, // 0014 GETMET R10 R0 K6
|
||||
0x5C300600, // 0015 MOVE R12 R3
|
||||
0x7C280400, // 0016 CALL R10 2
|
||||
0x5C201400, // 0017 MOVE R8 R10
|
||||
0x58280004, // 0018 LDCONST R10 K4
|
||||
0x602C000C, // 0019 GETGBL R11 G12
|
||||
0x88300100, // 001A GETMBR R12 R0 K0
|
||||
0x7C2C0200, // 001B CALL R11 1
|
||||
0x142C140B, // 001C LT R11 R10 R11
|
||||
0x782E0027, // 001D JMPF R11 #0046
|
||||
0x882C0100, // 001E GETMBR R11 R0 K0
|
||||
0x942C160A, // 001F GETIDX R11 R11 R10
|
||||
0x8C300B07, // 0020 GETMET R12 R5 K7
|
||||
0x5C381600, // 0021 MOVE R14 R11
|
||||
0x5C3C0200, // 0022 MOVE R15 R1
|
||||
0x7C300600, // 0023 CALL R12 3
|
||||
0x60340004, // 0024 GETGBL R13 G4
|
||||
0x5C381800, // 0025 MOVE R14 R12
|
||||
0x7C340200, // 0026 CALL R13 1
|
||||
0x1C341B08, // 0027 EQ R13 R13 K8
|
||||
0x7836001A, // 0028 JMPF R13 #0044
|
||||
0xA8020008, // 0029 EXBLK 0 #0033
|
||||
0x5C341800, // 002A MOVE R13 R12
|
||||
0x5C381600, // 002B MOVE R14 R11
|
||||
0x5C3C0200, // 002C MOVE R15 R1
|
||||
0x8C200B02, // 0008 GETMET R8 R5 K2
|
||||
0x58280003, // 0009 LDCONST R10 K3
|
||||
0x7C200400, // 000A CALL R8 2
|
||||
0x20240408, // 000B NE R9 R2 R8
|
||||
0x78260003, // 000C JMPF R9 #0011
|
||||
0x8C240104, // 000D GETMET R9 R0 K4
|
||||
0x5C2C0400, // 000E MOVE R11 R2
|
||||
0x7C240400, // 000F CALL R9 2
|
||||
0x5C181200, // 0010 MOVE R6 R9
|
||||
0x20240608, // 0011 NE R9 R3 R8
|
||||
0x78260003, // 0012 JMPF R9 #0017
|
||||
0x8C240105, // 0013 GETMET R9 R0 K5
|
||||
0x5C2C0600, // 0014 MOVE R11 R3
|
||||
0x7C240400, // 0015 CALL R9 2
|
||||
0x5C1C1200, // 0016 MOVE R7 R9
|
||||
0x58240003, // 0017 LDCONST R9 K3
|
||||
0x6028000C, // 0018 GETGBL R10 G12
|
||||
0x882C0100, // 0019 GETMBR R11 R0 K0
|
||||
0x7C280200, // 001A CALL R10 1
|
||||
0x1428120A, // 001B LT R10 R9 R10
|
||||
0x782A0027, // 001C JMPF R10 #0045
|
||||
0x88280100, // 001D GETMBR R10 R0 K0
|
||||
0x94281409, // 001E GETIDX R10 R10 R9
|
||||
0x8C2C0B06, // 001F GETMET R11 R5 K6
|
||||
0x5C341400, // 0020 MOVE R13 R10
|
||||
0x5C380200, // 0021 MOVE R14 R1
|
||||
0x7C2C0600, // 0022 CALL R11 3
|
||||
0x60300004, // 0023 GETGBL R12 G4
|
||||
0x5C341600, // 0024 MOVE R13 R11
|
||||
0x7C300200, // 0025 CALL R12 1
|
||||
0x1C301907, // 0026 EQ R12 R12 K7
|
||||
0x7832001A, // 0027 JMPF R12 #0043
|
||||
0xA8020008, // 0028 EXBLK 0 #0032
|
||||
0x5C301600, // 0029 MOVE R12 R11
|
||||
0x5C341400, // 002A MOVE R13 R10
|
||||
0x5C380200, // 002B MOVE R14 R1
|
||||
0x5C3C0C00, // 002C MOVE R15 R6
|
||||
0x5C400E00, // 002D MOVE R16 R7
|
||||
0x5C441000, // 002E MOVE R17 R8
|
||||
0x5C480800, // 002F MOVE R18 R4
|
||||
0x7C340A00, // 0030 CALL R13 5
|
||||
0xA8040001, // 0031 EXBLK 1 1
|
||||
0x70020010, // 0032 JMP #0044
|
||||
0xAC340002, // 0033 CATCH R13 0 2
|
||||
0x7002000D, // 0034 JMP #0043
|
||||
0x603C0001, // 0035 GETGBL R15 G1
|
||||
0x8C400D09, // 0036 GETMET R16 R6 K9
|
||||
0x5848000A, // 0037 LDCONST R18 K10
|
||||
0x5C4C1A00, // 0038 MOVE R19 R13
|
||||
0x5C501C00, // 0039 MOVE R20 R14
|
||||
0x7C400800, // 003A CALL R16 4
|
||||
0x7C3C0200, // 003B CALL R15 1
|
||||
0xB83E1600, // 003C GETNGBL R15 K11
|
||||
0x883C1F0C, // 003D GETMBR R15 R15 K12
|
||||
0x783E0002, // 003E JMPF R15 #0042
|
||||
0xA43E1A00, // 003F IMPORT R15 K13
|
||||
0x8C401F0E, // 0040 GETMET R16 R15 K14
|
||||
0x7C400200, // 0041 CALL R16 1
|
||||
0x70020000, // 0042 JMP #0044
|
||||
0xB0080000, // 0043 RAISE 2 R0 R0
|
||||
0x0028150F, // 0044 ADD R10 R10 K15
|
||||
0x7001FFD2, // 0045 JMP #0019
|
||||
0x80000000, // 0046 RET 0
|
||||
0x5C440800, // 002E MOVE R17 R4
|
||||
0x7C300A00, // 002F CALL R12 5
|
||||
0xA8040001, // 0030 EXBLK 1 1
|
||||
0x70020010, // 0031 JMP #0043
|
||||
0xAC300002, // 0032 CATCH R12 0 2
|
||||
0x7002000D, // 0033 JMP #0042
|
||||
0x60380001, // 0034 GETGBL R14 G1
|
||||
0x603C0018, // 0035 GETGBL R15 G24
|
||||
0x58400008, // 0036 LDCONST R16 K8
|
||||
0x5C441800, // 0037 MOVE R17 R12
|
||||
0x5C481A00, // 0038 MOVE R18 R13
|
||||
0x7C3C0600, // 0039 CALL R15 3
|
||||
0x7C380200, // 003A CALL R14 1
|
||||
0xB83A1200, // 003B GETNGBL R14 K9
|
||||
0x88381D0A, // 003C GETMBR R14 R14 K10
|
||||
0x783A0002, // 003D JMPF R14 #0041
|
||||
0xA43A1600, // 003E IMPORT R14 K11
|
||||
0x8C3C1D0C, // 003F GETMET R15 R14 K12
|
||||
0x7C3C0200, // 0040 CALL R15 1
|
||||
0x70020000, // 0041 JMP #0043
|
||||
0xB0080000, // 0042 RAISE 2 R0 R0
|
||||
0x0024130D, // 0043 ADD R9 R9 K13
|
||||
0x7001FFD2, // 0044 JMP #0018
|
||||
0x80000000, // 0045 RET 0
|
||||
})
|
||||
)
|
||||
);
|
||||
|
|
|
@ -60,7 +60,7 @@ be_local_closure(zcl_attribute_tomap, /* name */
|
|||
********************************************************************/
|
||||
be_local_closure(zcl_attribute_key_tostring, /* name */
|
||||
be_nested_proto(
|
||||
10, /* nstack */
|
||||
8, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
|
@ -68,96 +68,93 @@ be_local_closure(zcl_attribute_key_tostring, /* name */
|
|||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[15]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(string),
|
||||
/* K1 */ be_nested_str_weak(_X3Cundefined_X3E),
|
||||
/* K2 */ be_nested_str_weak(key),
|
||||
/* K3 */ be_nested_str_weak(key_suffix),
|
||||
/* K4 */ be_const_int(1),
|
||||
/* K5 */ be_nested_str_weak(cluster),
|
||||
/* K6 */ be_nested_str_weak(attr_id),
|
||||
/* K7 */ be_nested_str_weak(format),
|
||||
/* K8 */ be_nested_str_weak(_X2504X_X2F_X2504X),
|
||||
/* K9 */ be_nested_str_weak(_X2B),
|
||||
/* K10 */ be_nested_str_weak(cmd),
|
||||
/* K11 */ be_nested_str_weak(direction),
|
||||
/* K12 */ be_nested_str_weak(_X2504X_X25s_X2502X),
|
||||
/* K13 */ be_nested_str_weak(_X3F),
|
||||
/* K14 */ be_nested_str_weak(_X21),
|
||||
( &(const bvalue[13]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(_X3Cundefined_X3E),
|
||||
/* K1 */ be_nested_str_weak(key),
|
||||
/* K2 */ be_nested_str_weak(key_suffix),
|
||||
/* K3 */ be_const_int(1),
|
||||
/* K4 */ be_nested_str_weak(cluster),
|
||||
/* K5 */ be_nested_str_weak(attr_id),
|
||||
/* K6 */ be_nested_str_weak(_X2504X_X2F_X2504X),
|
||||
/* K7 */ be_nested_str_weak(_X2B),
|
||||
/* K8 */ be_nested_str_weak(cmd),
|
||||
/* K9 */ be_nested_str_weak(direction),
|
||||
/* K10 */ be_nested_str_weak(_X2504X_X25s_X2502X),
|
||||
/* K11 */ be_nested_str_weak(_X3F),
|
||||
/* K12 */ be_nested_str_weak(_X21),
|
||||
}),
|
||||
be_str_weak(key_tostring),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[70]) { /* code */
|
||||
0xA4060000, // 0000 IMPORT R1 K0
|
||||
0x58080001, // 0001 LDCONST R2 K1
|
||||
0x880C0102, // 0002 GETMBR R3 R0 K2
|
||||
0x4C100000, // 0003 LDNIL R4
|
||||
0x20100604, // 0004 NE R4 R3 R4
|
||||
0x78120008, // 0005 JMPF R4 #000F
|
||||
0x5C080600, // 0006 MOVE R2 R3
|
||||
0x88100103, // 0007 GETMBR R4 R0 K3
|
||||
0x24100904, // 0008 GT R4 R4 K4
|
||||
0x78120003, // 0009 JMPF R4 #000E
|
||||
0x60100008, // 000A GETGBL R4 G8
|
||||
0x88140103, // 000B GETMBR R5 R0 K3
|
||||
0x7C100200, // 000C CALL R4 1
|
||||
0x00080404, // 000D ADD R2 R2 R4
|
||||
0x70020035, // 000E JMP #0045
|
||||
0x88100105, // 000F GETMBR R4 R0 K5
|
||||
0x4C140000, // 0010 LDNIL R5
|
||||
0x20100805, // 0011 NE R4 R4 R5
|
||||
0x78120012, // 0012 JMPF R4 #0026
|
||||
0x88100106, // 0013 GETMBR R4 R0 K6
|
||||
0x4C140000, // 0014 LDNIL R5
|
||||
0x20100805, // 0015 NE R4 R4 R5
|
||||
0x7812000E, // 0016 JMPF R4 #0026
|
||||
0x8C100307, // 0017 GETMET R4 R1 K7
|
||||
0x58180008, // 0018 LDCONST R6 K8
|
||||
0x881C0105, // 0019 GETMBR R7 R0 K5
|
||||
0x88200106, // 001A GETMBR R8 R0 K6
|
||||
0x7C100800, // 001B CALL R4 4
|
||||
0x5C080800, // 001C MOVE R2 R4
|
||||
0x88100103, // 001D GETMBR R4 R0 K3
|
||||
0x24100904, // 001E GT R4 R4 K4
|
||||
0x78120004, // 001F JMPF R4 #0025
|
||||
0x60100008, // 0020 GETGBL R4 G8
|
||||
0x88140103, // 0021 GETMBR R5 R0 K3
|
||||
0x7C100200, // 0022 CALL R4 1
|
||||
0x00121204, // 0023 ADD R4 K9 R4
|
||||
0x00080404, // 0024 ADD R2 R2 R4
|
||||
0x7002001E, // 0025 JMP #0045
|
||||
0x88100105, // 0026 GETMBR R4 R0 K5
|
||||
0x4C140000, // 0027 LDNIL R5
|
||||
0x20100805, // 0028 NE R4 R4 R5
|
||||
0x7812001A, // 0029 JMPF R4 #0045
|
||||
0x8810010A, // 002A GETMBR R4 R0 K10
|
||||
0x4C140000, // 002B LDNIL R5
|
||||
0x20100805, // 002C NE R4 R4 R5
|
||||
0x78120016, // 002D JMPF R4 #0045
|
||||
0x8810010B, // 002E GETMBR R4 R0 K11
|
||||
0x4C140000, // 002F LDNIL R5
|
||||
0x20100805, // 0030 NE R4 R4 R5
|
||||
0x78120012, // 0031 JMPF R4 #0045
|
||||
0x8C100307, // 0032 GETMET R4 R1 K7
|
||||
0x5818000C, // 0033 LDCONST R6 K12
|
||||
0x881C0105, // 0034 GETMBR R7 R0 K5
|
||||
0x8820010B, // 0035 GETMBR R8 R0 K11
|
||||
0x78220001, // 0036 JMPF R8 #0039
|
||||
0x5820000D, // 0037 LDCONST R8 K13
|
||||
0x70020000, // 0038 JMP #003A
|
||||
0x5820000E, // 0039 LDCONST R8 K14
|
||||
0x8824010A, // 003A GETMBR R9 R0 K10
|
||||
0x7C100A00, // 003B CALL R4 5
|
||||
0x5C080800, // 003C MOVE R2 R4
|
||||
0x88100103, // 003D GETMBR R4 R0 K3
|
||||
0x24100904, // 003E GT R4 R4 K4
|
||||
0x78120004, // 003F JMPF R4 #0045
|
||||
0x60100008, // 0040 GETGBL R4 G8
|
||||
0x88140103, // 0041 GETMBR R5 R0 K3
|
||||
0x7C100200, // 0042 CALL R4 1
|
||||
0x00121204, // 0043 ADD R4 K9 R4
|
||||
0x00080404, // 0044 ADD R2 R2 R4
|
||||
0x80040400, // 0045 RET 1 R2
|
||||
( &(const binstruction[69]) { /* code */
|
||||
0x58040000, // 0000 LDCONST R1 K0
|
||||
0x88080101, // 0001 GETMBR R2 R0 K1
|
||||
0x4C0C0000, // 0002 LDNIL R3
|
||||
0x200C0403, // 0003 NE R3 R2 R3
|
||||
0x780E0008, // 0004 JMPF R3 #000E
|
||||
0x5C040400, // 0005 MOVE R1 R2
|
||||
0x880C0102, // 0006 GETMBR R3 R0 K2
|
||||
0x240C0703, // 0007 GT R3 R3 K3
|
||||
0x780E0003, // 0008 JMPF R3 #000D
|
||||
0x600C0008, // 0009 GETGBL R3 G8
|
||||
0x88100102, // 000A GETMBR R4 R0 K2
|
||||
0x7C0C0200, // 000B CALL R3 1
|
||||
0x00040203, // 000C ADD R1 R1 R3
|
||||
0x70020035, // 000D JMP #0044
|
||||
0x880C0104, // 000E GETMBR R3 R0 K4
|
||||
0x4C100000, // 000F LDNIL R4
|
||||
0x200C0604, // 0010 NE R3 R3 R4
|
||||
0x780E0012, // 0011 JMPF R3 #0025
|
||||
0x880C0105, // 0012 GETMBR R3 R0 K5
|
||||
0x4C100000, // 0013 LDNIL R4
|
||||
0x200C0604, // 0014 NE R3 R3 R4
|
||||
0x780E000E, // 0015 JMPF R3 #0025
|
||||
0x600C0018, // 0016 GETGBL R3 G24
|
||||
0x58100006, // 0017 LDCONST R4 K6
|
||||
0x88140104, // 0018 GETMBR R5 R0 K4
|
||||
0x88180105, // 0019 GETMBR R6 R0 K5
|
||||
0x7C0C0600, // 001A CALL R3 3
|
||||
0x5C040600, // 001B MOVE R1 R3
|
||||
0x880C0102, // 001C GETMBR R3 R0 K2
|
||||
0x240C0703, // 001D GT R3 R3 K3
|
||||
0x780E0004, // 001E JMPF R3 #0024
|
||||
0x600C0008, // 001F GETGBL R3 G8
|
||||
0x88100102, // 0020 GETMBR R4 R0 K2
|
||||
0x7C0C0200, // 0021 CALL R3 1
|
||||
0x000E0E03, // 0022 ADD R3 K7 R3
|
||||
0x00040203, // 0023 ADD R1 R1 R3
|
||||
0x7002001E, // 0024 JMP #0044
|
||||
0x880C0104, // 0025 GETMBR R3 R0 K4
|
||||
0x4C100000, // 0026 LDNIL R4
|
||||
0x200C0604, // 0027 NE R3 R3 R4
|
||||
0x780E001A, // 0028 JMPF R3 #0044
|
||||
0x880C0108, // 0029 GETMBR R3 R0 K8
|
||||
0x4C100000, // 002A LDNIL R4
|
||||
0x200C0604, // 002B NE R3 R3 R4
|
||||
0x780E0016, // 002C JMPF R3 #0044
|
||||
0x880C0109, // 002D GETMBR R3 R0 K9
|
||||
0x4C100000, // 002E LDNIL R4
|
||||
0x200C0604, // 002F NE R3 R3 R4
|
||||
0x780E0012, // 0030 JMPF R3 #0044
|
||||
0x600C0018, // 0031 GETGBL R3 G24
|
||||
0x5810000A, // 0032 LDCONST R4 K10
|
||||
0x88140104, // 0033 GETMBR R5 R0 K4
|
||||
0x88180109, // 0034 GETMBR R6 R0 K9
|
||||
0x781A0001, // 0035 JMPF R6 #0038
|
||||
0x5818000B, // 0036 LDCONST R6 K11
|
||||
0x70020000, // 0037 JMP #0039
|
||||
0x5818000C, // 0038 LDCONST R6 K12
|
||||
0x881C0108, // 0039 GETMBR R7 R0 K8
|
||||
0x7C0C0800, // 003A CALL R3 4
|
||||
0x5C040600, // 003B MOVE R1 R3
|
||||
0x880C0102, // 003C GETMBR R3 R0 K2
|
||||
0x240C0703, // 003D GT R3 R3 K3
|
||||
0x780E0004, // 003E JMPF R3 #0044
|
||||
0x600C0008, // 003F GETGBL R3 G8
|
||||
0x88100102, // 0040 GETMBR R4 R0 K2
|
||||
0x7C0C0200, // 0041 CALL R3 1
|
||||
0x000E0E03, // 0042 ADD R3 K7 R3
|
||||
0x00040203, // 0043 ADD R1 R1 R3
|
||||
0x80040200, // 0044 RET 1 R1
|
||||
})
|
||||
)
|
||||
);
|
||||
|
@ -275,7 +272,7 @@ be_local_closure(zcl_attribute_setmember, /* name */
|
|||
********************************************************************/
|
||||
be_local_closure(zcl_attribute_tostring, /* name */
|
||||
be_nested_proto(
|
||||
12, /* nstack */
|
||||
10, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
|
@ -283,77 +280,74 @@ be_local_closure(zcl_attribute_tostring, /* name */
|
|||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[15]) { /* constants */
|
||||
( &(const bvalue[13]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(introspect),
|
||||
/* K1 */ be_nested_str_weak(json),
|
||||
/* K2 */ be_nested_str_weak(string),
|
||||
/* K3 */ be_nested_str_weak(dump),
|
||||
/* K4 */ be_nested_str_weak(key_tostring),
|
||||
/* K5 */ be_nested_str_weak(_X3A),
|
||||
/* K6 */ be_nested_str_weak(get),
|
||||
/* K7 */ be_nested_str_weak(val),
|
||||
/* K8 */ be_nested_str_weak(tojson),
|
||||
/* K9 */ be_nested_str_weak(cluster),
|
||||
/* K10 */ be_nested_str_weak(attr_id),
|
||||
/* K11 */ be_nested_str_weak(key),
|
||||
/* K12 */ be_nested_str_weak(format),
|
||||
/* K13 */ be_nested_str_weak(_X28_X25s_X29),
|
||||
/* K14 */ be_nested_str_weak(_X2C_X25s_X3A_X22_X2504X_X2F_X2504X_X22),
|
||||
/* K2 */ be_nested_str_weak(dump),
|
||||
/* K3 */ be_nested_str_weak(key_tostring),
|
||||
/* K4 */ be_nested_str_weak(_X3A),
|
||||
/* K5 */ be_nested_str_weak(get),
|
||||
/* K6 */ be_nested_str_weak(val),
|
||||
/* K7 */ be_nested_str_weak(tojson),
|
||||
/* K8 */ be_nested_str_weak(cluster),
|
||||
/* K9 */ be_nested_str_weak(attr_id),
|
||||
/* K10 */ be_nested_str_weak(key),
|
||||
/* K11 */ be_nested_str_weak(_X28_X25s_X29),
|
||||
/* K12 */ be_nested_str_weak(_X2C_X25s_X3A_X22_X2504X_X2F_X2504X_X22),
|
||||
}),
|
||||
be_str_weak(tostring),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[51]) { /* code */
|
||||
( &(const binstruction[50]) { /* code */
|
||||
0xA4060000, // 0000 IMPORT R1 K0
|
||||
0xA40A0200, // 0001 IMPORT R2 K1
|
||||
0xA40E0400, // 0002 IMPORT R3 K2
|
||||
0x8C100503, // 0003 GETMET R4 R2 K3
|
||||
0x8C180104, // 0004 GETMET R6 R0 K4
|
||||
0x7C180200, // 0005 CALL R6 1
|
||||
0x7C100400, // 0006 CALL R4 2
|
||||
0x00100905, // 0007 ADD R4 R4 K5
|
||||
0x8C140306, // 0008 GETMET R5 R1 K6
|
||||
0x881C0107, // 0009 GETMBR R7 R0 K7
|
||||
0x58200008, // 000A LDCONST R8 K8
|
||||
0x7C140600, // 000B CALL R5 3
|
||||
0x4C180000, // 000C LDNIL R6
|
||||
0x20140A06, // 000D NE R5 R5 R6
|
||||
0x78160004, // 000E JMPF R5 #0014
|
||||
0x88140107, // 000F GETMBR R5 R0 K7
|
||||
0x8C140B08, // 0010 GETMET R5 R5 K8
|
||||
0x7C140200, // 0011 CALL R5 1
|
||||
0x00100805, // 0012 ADD R4 R4 R5
|
||||
0x70020003, // 0013 JMP #0018
|
||||
0x8C140503, // 0014 GETMET R5 R2 K3
|
||||
0x881C0107, // 0015 GETMBR R7 R0 K7
|
||||
0x7C140400, // 0016 CALL R5 2
|
||||
0x00100805, // 0017 ADD R4 R4 R5
|
||||
0x88140109, // 0018 GETMBR R5 R0 K9
|
||||
0x4C180000, // 0019 LDNIL R6
|
||||
0x20140A06, // 001A NE R5 R5 R6
|
||||
0x78160015, // 001B JMPF R5 #0032
|
||||
0x8814010A, // 001C GETMBR R5 R0 K10
|
||||
0x4C180000, // 001D LDNIL R6
|
||||
0x20140A06, // 001E NE R5 R5 R6
|
||||
0x78160011, // 001F JMPF R5 #0032
|
||||
0x8814010B, // 0020 GETMBR R5 R0 K11
|
||||
0x4C180000, // 0021 LDNIL R6
|
||||
0x20140A06, // 0022 NE R5 R5 R6
|
||||
0x7816000D, // 0023 JMPF R5 #0032
|
||||
0x8C14070C, // 0024 GETMET R5 R3 K12
|
||||
0x581C000D, // 0025 LDCONST R7 K13
|
||||
0x8C200104, // 0026 GETMET R8 R0 K4
|
||||
0x7C200200, // 0027 CALL R8 1
|
||||
0x7C140600, // 0028 CALL R5 3
|
||||
0x8C18070C, // 0029 GETMET R6 R3 K12
|
||||
0x5820000E, // 002A LDCONST R8 K14
|
||||
0x8C240503, // 002B GETMET R9 R2 K3
|
||||
0x5C2C0A00, // 002C MOVE R11 R5
|
||||
0x7C240400, // 002D CALL R9 2
|
||||
0x88280109, // 002E GETMBR R10 R0 K9
|
||||
0x882C010A, // 002F GETMBR R11 R0 K10
|
||||
0x7C180A00, // 0030 CALL R6 5
|
||||
0x00100806, // 0031 ADD R4 R4 R6
|
||||
0x80040800, // 0032 RET 1 R4
|
||||
0x8C0C0502, // 0002 GETMET R3 R2 K2
|
||||
0x8C140103, // 0003 GETMET R5 R0 K3
|
||||
0x7C140200, // 0004 CALL R5 1
|
||||
0x7C0C0400, // 0005 CALL R3 2
|
||||
0x000C0704, // 0006 ADD R3 R3 K4
|
||||
0x8C100305, // 0007 GETMET R4 R1 K5
|
||||
0x88180106, // 0008 GETMBR R6 R0 K6
|
||||
0x581C0007, // 0009 LDCONST R7 K7
|
||||
0x7C100600, // 000A CALL R4 3
|
||||
0x4C140000, // 000B LDNIL R5
|
||||
0x20100805, // 000C NE R4 R4 R5
|
||||
0x78120004, // 000D JMPF R4 #0013
|
||||
0x88100106, // 000E GETMBR R4 R0 K6
|
||||
0x8C100907, // 000F GETMET R4 R4 K7
|
||||
0x7C100200, // 0010 CALL R4 1
|
||||
0x000C0604, // 0011 ADD R3 R3 R4
|
||||
0x70020003, // 0012 JMP #0017
|
||||
0x8C100502, // 0013 GETMET R4 R2 K2
|
||||
0x88180106, // 0014 GETMBR R6 R0 K6
|
||||
0x7C100400, // 0015 CALL R4 2
|
||||
0x000C0604, // 0016 ADD R3 R3 R4
|
||||
0x88100108, // 0017 GETMBR R4 R0 K8
|
||||
0x4C140000, // 0018 LDNIL R5
|
||||
0x20100805, // 0019 NE R4 R4 R5
|
||||
0x78120015, // 001A JMPF R4 #0031
|
||||
0x88100109, // 001B GETMBR R4 R0 K9
|
||||
0x4C140000, // 001C LDNIL R5
|
||||
0x20100805, // 001D NE R4 R4 R5
|
||||
0x78120011, // 001E JMPF R4 #0031
|
||||
0x8810010A, // 001F GETMBR R4 R0 K10
|
||||
0x4C140000, // 0020 LDNIL R5
|
||||
0x20100805, // 0021 NE R4 R4 R5
|
||||
0x7812000D, // 0022 JMPF R4 #0031
|
||||
0x60100018, // 0023 GETGBL R4 G24
|
||||
0x5814000B, // 0024 LDCONST R5 K11
|
||||
0x8C180103, // 0025 GETMET R6 R0 K3
|
||||
0x7C180200, // 0026 CALL R6 1
|
||||
0x7C100400, // 0027 CALL R4 2
|
||||
0x60140018, // 0028 GETGBL R5 G24
|
||||
0x5818000C, // 0029 LDCONST R6 K12
|
||||
0x8C1C0502, // 002A GETMET R7 R2 K2
|
||||
0x5C240800, // 002B MOVE R9 R4
|
||||
0x7C1C0400, // 002C CALL R7 2
|
||||
0x88200108, // 002D GETMBR R8 R0 K8
|
||||
0x88240109, // 002E GETMBR R9 R0 K9
|
||||
0x7C140800, // 002F CALL R5 4
|
||||
0x000C0605, // 0030 ADD R3 R3 R5
|
||||
0x80040600, // 0031 RET 1 R3
|
||||
})
|
||||
)
|
||||
);
|
||||
|
@ -791,7 +785,7 @@ be_local_closure(zcl_attribute_list_deinit, /* name */
|
|||
********************************************************************/
|
||||
be_local_closure(zcl_attribute_list_tostring, /* name */
|
||||
be_nested_proto(
|
||||
12, /* nstack */
|
||||
10, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
|
@ -799,93 +793,90 @@ be_local_closure(zcl_attribute_list_tostring, /* name */
|
|||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[20]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(string),
|
||||
/* K1 */ be_nested_str_weak(json),
|
||||
/* K2 */ be_nested_str_weak(shortaddr),
|
||||
/* K3 */ be_nested_str_weak(push),
|
||||
/* K4 */ be_nested_str_weak(format),
|
||||
/* K5 */ be_nested_str_weak(_X22Device_X22_X3A_X220x_X2504X_X22),
|
||||
/* K6 */ be_nested_str_weak(groupaddr),
|
||||
/* K7 */ be_nested_str_weak(_X22Group_X22_X3A_X220x_X2504X_X22),
|
||||
/* K8 */ be_const_int(0),
|
||||
/* K9 */ be_nested_str_weak(size),
|
||||
/* K10 */ be_nested_str_weak(tostring),
|
||||
/* K11 */ be_const_int(1),
|
||||
/* K12 */ be_nested_str_weak(src_ep),
|
||||
/* K13 */ be_nested_str_weak(_X22Endpoint_X22_X3A_X25i),
|
||||
/* K14 */ be_nested_str_weak(lqi),
|
||||
/* K15 */ be_nested_str_weak(_X22LinkQuality_X22_X3A_X25i),
|
||||
/* K16 */ be_nested_str_weak(_X7B),
|
||||
/* K17 */ be_nested_str_weak(concat),
|
||||
/* K18 */ be_nested_str_weak(_X2C),
|
||||
/* K19 */ be_nested_str_weak(_X7D),
|
||||
( &(const bvalue[18]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(json),
|
||||
/* K1 */ be_nested_str_weak(shortaddr),
|
||||
/* K2 */ be_nested_str_weak(push),
|
||||
/* K3 */ be_nested_str_weak(_X22Device_X22_X3A_X220x_X2504X_X22),
|
||||
/* K4 */ be_nested_str_weak(groupaddr),
|
||||
/* K5 */ be_nested_str_weak(_X22Group_X22_X3A_X220x_X2504X_X22),
|
||||
/* K6 */ be_const_int(0),
|
||||
/* K7 */ be_nested_str_weak(size),
|
||||
/* K8 */ be_nested_str_weak(tostring),
|
||||
/* K9 */ be_const_int(1),
|
||||
/* K10 */ be_nested_str_weak(src_ep),
|
||||
/* K11 */ be_nested_str_weak(_X22Endpoint_X22_X3A_X25i),
|
||||
/* K12 */ be_nested_str_weak(lqi),
|
||||
/* K13 */ be_nested_str_weak(_X22LinkQuality_X22_X3A_X25i),
|
||||
/* K14 */ be_nested_str_weak(_X7B),
|
||||
/* K15 */ be_nested_str_weak(concat),
|
||||
/* K16 */ be_nested_str_weak(_X2C),
|
||||
/* K17 */ be_nested_str_weak(_X7D),
|
||||
}),
|
||||
be_str_weak(tostring),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[62]) { /* code */
|
||||
( &(const binstruction[61]) { /* code */
|
||||
0xA4060000, // 0000 IMPORT R1 K0
|
||||
0xA40A0200, // 0001 IMPORT R2 K1
|
||||
0x600C0012, // 0002 GETGBL R3 G18
|
||||
0x7C0C0000, // 0003 CALL R3 0
|
||||
0x88100102, // 0004 GETMBR R4 R0 K2
|
||||
0x4C140000, // 0005 LDNIL R5
|
||||
0x20100805, // 0006 NE R4 R4 R5
|
||||
0x78120005, // 0007 JMPF R4 #000E
|
||||
0x8C100703, // 0008 GETMET R4 R3 K3
|
||||
0x8C180304, // 0009 GETMET R6 R1 K4
|
||||
0x58200005, // 000A LDCONST R8 K5
|
||||
0x88240102, // 000B GETMBR R9 R0 K2
|
||||
0x7C180600, // 000C CALL R6 3
|
||||
0x7C100400, // 000D CALL R4 2
|
||||
0x88100106, // 000E GETMBR R4 R0 K6
|
||||
0x4C140000, // 000F LDNIL R5
|
||||
0x20100805, // 0010 NE R4 R4 R5
|
||||
0x78120005, // 0011 JMPF R4 #0018
|
||||
0x8C100703, // 0012 GETMET R4 R3 K3
|
||||
0x8C180304, // 0013 GETMET R6 R1 K4
|
||||
0x58200007, // 0014 LDCONST R8 K7
|
||||
0x88240106, // 0015 GETMBR R9 R0 K6
|
||||
0x7C180600, // 0016 CALL R6 3
|
||||
0x7C100400, // 0017 CALL R4 2
|
||||
0x58100008, // 0018 LDCONST R4 K8
|
||||
0x8C140109, // 0019 GETMET R5 R0 K9
|
||||
0x7C140200, // 001A CALL R5 1
|
||||
0x14180805, // 001B LT R6 R4 R5
|
||||
0x781A0006, // 001C JMPF R6 #0024
|
||||
0x8C180703, // 001D GETMET R6 R3 K3
|
||||
0x94200004, // 001E GETIDX R8 R0 R4
|
||||
0x8C20110A, // 001F GETMET R8 R8 K10
|
||||
0x7C200200, // 0020 CALL R8 1
|
||||
0x7C180400, // 0021 CALL R6 2
|
||||
0x0010090B, // 0022 ADD R4 R4 K11
|
||||
0x7001FFF6, // 0023 JMP #001B
|
||||
0x8818010C, // 0024 GETMBR R6 R0 K12
|
||||
0x4C1C0000, // 0025 LDNIL R7
|
||||
0x20180C07, // 0026 NE R6 R6 R7
|
||||
0x781A0005, // 0027 JMPF R6 #002E
|
||||
0x8C180703, // 0028 GETMET R6 R3 K3
|
||||
0x8C200304, // 0029 GETMET R8 R1 K4
|
||||
0x5828000D, // 002A LDCONST R10 K13
|
||||
0x882C010C, // 002B GETMBR R11 R0 K12
|
||||
0x7C200600, // 002C CALL R8 3
|
||||
0x7C180400, // 002D CALL R6 2
|
||||
0x8818010E, // 002E GETMBR R6 R0 K14
|
||||
0x4C1C0000, // 002F LDNIL R7
|
||||
0x20180C07, // 0030 NE R6 R6 R7
|
||||
0x781A0005, // 0031 JMPF R6 #0038
|
||||
0x8C180703, // 0032 GETMET R6 R3 K3
|
||||
0x8C200304, // 0033 GETMET R8 R1 K4
|
||||
0x5828000F, // 0034 LDCONST R10 K15
|
||||
0x882C010E, // 0035 GETMBR R11 R0 K14
|
||||
0x7C200600, // 0036 CALL R8 3
|
||||
0x7C180400, // 0037 CALL R6 2
|
||||
0x8C180711, // 0038 GETMET R6 R3 K17
|
||||
0x58200012, // 0039 LDCONST R8 K18
|
||||
0x7C180400, // 003A CALL R6 2
|
||||
0x001A2006, // 003B ADD R6 K16 R6
|
||||
0x00180D13, // 003C ADD R6 R6 K19
|
||||
0x80040C00, // 003D RET 1 R6
|
||||
0x60080012, // 0001 GETGBL R2 G18
|
||||
0x7C080000, // 0002 CALL R2 0
|
||||
0x880C0101, // 0003 GETMBR R3 R0 K1
|
||||
0x4C100000, // 0004 LDNIL R4
|
||||
0x200C0604, // 0005 NE R3 R3 R4
|
||||
0x780E0005, // 0006 JMPF R3 #000D
|
||||
0x8C0C0502, // 0007 GETMET R3 R2 K2
|
||||
0x60140018, // 0008 GETGBL R5 G24
|
||||
0x58180003, // 0009 LDCONST R6 K3
|
||||
0x881C0101, // 000A GETMBR R7 R0 K1
|
||||
0x7C140400, // 000B CALL R5 2
|
||||
0x7C0C0400, // 000C CALL R3 2
|
||||
0x880C0104, // 000D GETMBR R3 R0 K4
|
||||
0x4C100000, // 000E LDNIL R4
|
||||
0x200C0604, // 000F NE R3 R3 R4
|
||||
0x780E0005, // 0010 JMPF R3 #0017
|
||||
0x8C0C0502, // 0011 GETMET R3 R2 K2
|
||||
0x60140018, // 0012 GETGBL R5 G24
|
||||
0x58180005, // 0013 LDCONST R6 K5
|
||||
0x881C0104, // 0014 GETMBR R7 R0 K4
|
||||
0x7C140400, // 0015 CALL R5 2
|
||||
0x7C0C0400, // 0016 CALL R3 2
|
||||
0x580C0006, // 0017 LDCONST R3 K6
|
||||
0x8C100107, // 0018 GETMET R4 R0 K7
|
||||
0x7C100200, // 0019 CALL R4 1
|
||||
0x14140604, // 001A LT R5 R3 R4
|
||||
0x78160006, // 001B JMPF R5 #0023
|
||||
0x8C140502, // 001C GETMET R5 R2 K2
|
||||
0x941C0003, // 001D GETIDX R7 R0 R3
|
||||
0x8C1C0F08, // 001E GETMET R7 R7 K8
|
||||
0x7C1C0200, // 001F CALL R7 1
|
||||
0x7C140400, // 0020 CALL R5 2
|
||||
0x000C0709, // 0021 ADD R3 R3 K9
|
||||
0x7001FFF6, // 0022 JMP #001A
|
||||
0x8814010A, // 0023 GETMBR R5 R0 K10
|
||||
0x4C180000, // 0024 LDNIL R6
|
||||
0x20140A06, // 0025 NE R5 R5 R6
|
||||
0x78160005, // 0026 JMPF R5 #002D
|
||||
0x8C140502, // 0027 GETMET R5 R2 K2
|
||||
0x601C0018, // 0028 GETGBL R7 G24
|
||||
0x5820000B, // 0029 LDCONST R8 K11
|
||||
0x8824010A, // 002A GETMBR R9 R0 K10
|
||||
0x7C1C0400, // 002B CALL R7 2
|
||||
0x7C140400, // 002C CALL R5 2
|
||||
0x8814010C, // 002D GETMBR R5 R0 K12
|
||||
0x4C180000, // 002E LDNIL R6
|
||||
0x20140A06, // 002F NE R5 R5 R6
|
||||
0x78160005, // 0030 JMPF R5 #0037
|
||||
0x8C140502, // 0031 GETMET R5 R2 K2
|
||||
0x601C0018, // 0032 GETGBL R7 G24
|
||||
0x5820000D, // 0033 LDCONST R8 K13
|
||||
0x8824010C, // 0034 GETMBR R9 R0 K12
|
||||
0x7C1C0400, // 0035 CALL R7 2
|
||||
0x7C140400, // 0036 CALL R5 2
|
||||
0x8C14050F, // 0037 GETMET R5 R2 K15
|
||||
0x581C0010, // 0038 LDCONST R7 K16
|
||||
0x7C140400, // 0039 CALL R5 2
|
||||
0x00161C05, // 003A ADD R5 K14 R5
|
||||
0x00140B11, // 003B ADD R5 R5 K17
|
||||
0x80040A00, // 003C RET 1 R5
|
||||
})
|
||||
)
|
||||
);
|
||||
|
@ -969,7 +960,7 @@ be_local_closure(zcl_attributes_init, /* name */
|
|||
********************************************************************/
|
||||
be_local_closure(zcl_attributes_tostring, /* name */
|
||||
be_nested_proto(
|
||||
10, /* nstack */
|
||||
9, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
|
@ -977,94 +968,91 @@ be_local_closure(zcl_attributes_tostring, /* name */
|
|||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[19]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(string),
|
||||
/* K1 */ be_nested_str_weak(json),
|
||||
/* K2 */ be_nested_str_weak(shortaddr),
|
||||
/* K3 */ be_nested_str_weak(push),
|
||||
/* K4 */ be_nested_str_weak(format),
|
||||
/* K5 */ be_nested_str_weak(_X22Device_X22_X3A_X220x_X2504X_X22),
|
||||
/* K6 */ be_nested_str_weak(_X22Group_X22_X3A_X220x_X2504X_X22),
|
||||
/* K7 */ be_nested_str_weak(groupaddr),
|
||||
/* K8 */ be_nested_str_weak(attr_list),
|
||||
/* K9 */ be_nested_str_weak(tostring),
|
||||
/* K10 */ be_nested_str_weak(stop_iteration),
|
||||
/* K11 */ be_nested_str_weak(src_ep),
|
||||
/* K12 */ be_nested_str_weak(_X22Endpoint_X22_X3A_X25i),
|
||||
/* K13 */ be_nested_str_weak(lqi),
|
||||
/* K14 */ be_nested_str_weak(_X22LinkQuality_X22_X3A_X25i),
|
||||
/* K15 */ be_nested_str_weak(_X7B),
|
||||
/* K16 */ be_nested_str_weak(concat),
|
||||
/* K17 */ be_nested_str_weak(_X2C),
|
||||
/* K18 */ be_nested_str_weak(_X7D),
|
||||
( &(const bvalue[17]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(json),
|
||||
/* K1 */ be_nested_str_weak(shortaddr),
|
||||
/* K2 */ be_nested_str_weak(push),
|
||||
/* K3 */ be_nested_str_weak(_X22Device_X22_X3A_X220x_X2504X_X22),
|
||||
/* K4 */ be_nested_str_weak(_X22Group_X22_X3A_X220x_X2504X_X22),
|
||||
/* K5 */ be_nested_str_weak(groupaddr),
|
||||
/* K6 */ be_nested_str_weak(attr_list),
|
||||
/* K7 */ be_nested_str_weak(tostring),
|
||||
/* K8 */ be_nested_str_weak(stop_iteration),
|
||||
/* K9 */ be_nested_str_weak(src_ep),
|
||||
/* K10 */ be_nested_str_weak(_X22Endpoint_X22_X3A_X25i),
|
||||
/* K11 */ be_nested_str_weak(lqi),
|
||||
/* K12 */ be_nested_str_weak(_X22LinkQuality_X22_X3A_X25i),
|
||||
/* K13 */ be_nested_str_weak(_X7B),
|
||||
/* K14 */ be_nested_str_weak(concat),
|
||||
/* K15 */ be_nested_str_weak(_X2C),
|
||||
/* K16 */ be_nested_str_weak(_X7D),
|
||||
}),
|
||||
be_str_weak(tostring),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[64]) { /* code */
|
||||
( &(const binstruction[63]) { /* code */
|
||||
0xA4060000, // 0000 IMPORT R1 K0
|
||||
0xA40A0200, // 0001 IMPORT R2 K1
|
||||
0x600C0012, // 0002 GETGBL R3 G18
|
||||
0x7C0C0000, // 0003 CALL R3 0
|
||||
0x88100102, // 0004 GETMBR R4 R0 K2
|
||||
0x4C140000, // 0005 LDNIL R5
|
||||
0x20100805, // 0006 NE R4 R4 R5
|
||||
0x78120005, // 0007 JMPF R4 #000E
|
||||
0x8C100703, // 0008 GETMET R4 R3 K3
|
||||
0x8C180304, // 0009 GETMET R6 R1 K4
|
||||
0x58200005, // 000A LDCONST R8 K5
|
||||
0x88240102, // 000B GETMBR R9 R0 K2
|
||||
0x7C180600, // 000C CALL R6 3
|
||||
0x7C100400, // 000D CALL R4 2
|
||||
0x88100102, // 000E GETMBR R4 R0 K2
|
||||
0x4C140000, // 000F LDNIL R5
|
||||
0x20100805, // 0010 NE R4 R4 R5
|
||||
0x78120005, // 0011 JMPF R4 #0018
|
||||
0x8C100703, // 0012 GETMET R4 R3 K3
|
||||
0x8C180304, // 0013 GETMET R6 R1 K4
|
||||
0x58200006, // 0014 LDCONST R8 K6
|
||||
0x88240107, // 0015 GETMBR R9 R0 K7
|
||||
0x7C180600, // 0016 CALL R6 3
|
||||
0x7C100400, // 0017 CALL R4 2
|
||||
0x60100010, // 0018 GETGBL R4 G16
|
||||
0x88140108, // 0019 GETMBR R5 R0 K8
|
||||
0x7C100200, // 001A CALL R4 1
|
||||
0xA8020006, // 001B EXBLK 0 #0023
|
||||
0x5C140800, // 001C MOVE R5 R4
|
||||
0x7C140000, // 001D CALL R5 0
|
||||
0x8C180703, // 001E GETMET R6 R3 K3
|
||||
0x8C200B09, // 001F GETMET R8 R5 K9
|
||||
0x7C200200, // 0020 CALL R8 1
|
||||
0x7C180400, // 0021 CALL R6 2
|
||||
0x7001FFF8, // 0022 JMP #001C
|
||||
0x5810000A, // 0023 LDCONST R4 K10
|
||||
0xAC100200, // 0024 CATCH R4 1 0
|
||||
0xB0080000, // 0025 RAISE 2 R0 R0
|
||||
0x8810010B, // 0026 GETMBR R4 R0 K11
|
||||
0x4C140000, // 0027 LDNIL R5
|
||||
0x20100805, // 0028 NE R4 R4 R5
|
||||
0x78120005, // 0029 JMPF R4 #0030
|
||||
0x8C100703, // 002A GETMET R4 R3 K3
|
||||
0x8C180304, // 002B GETMET R6 R1 K4
|
||||
0x5820000C, // 002C LDCONST R8 K12
|
||||
0x8824010B, // 002D GETMBR R9 R0 K11
|
||||
0x7C180600, // 002E CALL R6 3
|
||||
0x7C100400, // 002F CALL R4 2
|
||||
0x8810010D, // 0030 GETMBR R4 R0 K13
|
||||
0x4C140000, // 0031 LDNIL R5
|
||||
0x20100805, // 0032 NE R4 R4 R5
|
||||
0x78120005, // 0033 JMPF R4 #003A
|
||||
0x8C100703, // 0034 GETMET R4 R3 K3
|
||||
0x8C180304, // 0035 GETMET R6 R1 K4
|
||||
0x5820000E, // 0036 LDCONST R8 K14
|
||||
0x8824010D, // 0037 GETMBR R9 R0 K13
|
||||
0x7C180600, // 0038 CALL R6 3
|
||||
0x7C100400, // 0039 CALL R4 2
|
||||
0x8C100710, // 003A GETMET R4 R3 K16
|
||||
0x58180011, // 003B LDCONST R6 K17
|
||||
0x7C100400, // 003C CALL R4 2
|
||||
0x00121E04, // 003D ADD R4 K15 R4
|
||||
0x00100912, // 003E ADD R4 R4 K18
|
||||
0x80040800, // 003F RET 1 R4
|
||||
0x60080012, // 0001 GETGBL R2 G18
|
||||
0x7C080000, // 0002 CALL R2 0
|
||||
0x880C0101, // 0003 GETMBR R3 R0 K1
|
||||
0x4C100000, // 0004 LDNIL R4
|
||||
0x200C0604, // 0005 NE R3 R3 R4
|
||||
0x780E0005, // 0006 JMPF R3 #000D
|
||||
0x8C0C0502, // 0007 GETMET R3 R2 K2
|
||||
0x60140018, // 0008 GETGBL R5 G24
|
||||
0x58180003, // 0009 LDCONST R6 K3
|
||||
0x881C0101, // 000A GETMBR R7 R0 K1
|
||||
0x7C140400, // 000B CALL R5 2
|
||||
0x7C0C0400, // 000C CALL R3 2
|
||||
0x880C0101, // 000D GETMBR R3 R0 K1
|
||||
0x4C100000, // 000E LDNIL R4
|
||||
0x200C0604, // 000F NE R3 R3 R4
|
||||
0x780E0005, // 0010 JMPF R3 #0017
|
||||
0x8C0C0502, // 0011 GETMET R3 R2 K2
|
||||
0x60140018, // 0012 GETGBL R5 G24
|
||||
0x58180004, // 0013 LDCONST R6 K4
|
||||
0x881C0105, // 0014 GETMBR R7 R0 K5
|
||||
0x7C140400, // 0015 CALL R5 2
|
||||
0x7C0C0400, // 0016 CALL R3 2
|
||||
0x600C0010, // 0017 GETGBL R3 G16
|
||||
0x88100106, // 0018 GETMBR R4 R0 K6
|
||||
0x7C0C0200, // 0019 CALL R3 1
|
||||
0xA8020006, // 001A EXBLK 0 #0022
|
||||
0x5C100600, // 001B MOVE R4 R3
|
||||
0x7C100000, // 001C CALL R4 0
|
||||
0x8C140502, // 001D GETMET R5 R2 K2
|
||||
0x8C1C0907, // 001E GETMET R7 R4 K7
|
||||
0x7C1C0200, // 001F CALL R7 1
|
||||
0x7C140400, // 0020 CALL R5 2
|
||||
0x7001FFF8, // 0021 JMP #001B
|
||||
0x580C0008, // 0022 LDCONST R3 K8
|
||||
0xAC0C0200, // 0023 CATCH R3 1 0
|
||||
0xB0080000, // 0024 RAISE 2 R0 R0
|
||||
0x880C0109, // 0025 GETMBR R3 R0 K9
|
||||
0x4C100000, // 0026 LDNIL R4
|
||||
0x200C0604, // 0027 NE R3 R3 R4
|
||||
0x780E0005, // 0028 JMPF R3 #002F
|
||||
0x8C0C0502, // 0029 GETMET R3 R2 K2
|
||||
0x60140018, // 002A GETGBL R5 G24
|
||||
0x5818000A, // 002B LDCONST R6 K10
|
||||
0x881C0109, // 002C GETMBR R7 R0 K9
|
||||
0x7C140400, // 002D CALL R5 2
|
||||
0x7C0C0400, // 002E CALL R3 2
|
||||
0x880C010B, // 002F GETMBR R3 R0 K11
|
||||
0x4C100000, // 0030 LDNIL R4
|
||||
0x200C0604, // 0031 NE R3 R3 R4
|
||||
0x780E0005, // 0032 JMPF R3 #0039
|
||||
0x8C0C0502, // 0033 GETMET R3 R2 K2
|
||||
0x60140018, // 0034 GETGBL R5 G24
|
||||
0x5818000C, // 0035 LDCONST R6 K12
|
||||
0x881C010B, // 0036 GETMBR R7 R0 K11
|
||||
0x7C140400, // 0037 CALL R5 2
|
||||
0x7C0C0400, // 0038 CALL R3 2
|
||||
0x8C0C050E, // 0039 GETMET R3 R2 K14
|
||||
0x5814000F, // 003A LDCONST R5 K15
|
||||
0x7C0C0400, // 003B CALL R3 2
|
||||
0x000E1A03, // 003C ADD R3 K13 R3
|
||||
0x000C0710, // 003D ADD R3 R3 K16
|
||||
0x80040600, // 003E RET 1 R3
|
||||
})
|
||||
)
|
||||
);
|
||||
|
|
|
@ -135,7 +135,7 @@ be_local_closure(zcl_frame_init, /* name */
|
|||
********************************************************************/
|
||||
be_local_closure(zcl_frame_tomap, /* name */
|
||||
be_nested_proto(
|
||||
7, /* nstack */
|
||||
5, /* nstack */
|
||||
1, /* argc */
|
||||
2, /* varg */
|
||||
0, /* has upvals */
|
||||
|
@ -143,32 +143,29 @@ be_local_closure(zcl_frame_tomap, /* name */
|
|||
0, /* has sup protos */
|
||||
NULL, /* no sub protos */
|
||||
1, /* has constants */
|
||||
( &(const bvalue[ 7]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(string),
|
||||
/* K1 */ be_nested_str_weak(tomap),
|
||||
/* K2 */ be_nested_str_weak(shortaddr_hex),
|
||||
/* K3 */ be_nested_str_weak(format),
|
||||
/* K4 */ be_nested_str_weak(0x_X2504X),
|
||||
/* K5 */ be_nested_str_weak(shortaddr),
|
||||
/* K6 */ be_nested_str_weak(payload),
|
||||
( &(const bvalue[ 5]) { /* constants */
|
||||
/* K0 */ be_nested_str_weak(tomap),
|
||||
/* K1 */ be_nested_str_weak(shortaddr_hex),
|
||||
/* K2 */ be_nested_str_weak(0x_X2504X),
|
||||
/* K3 */ be_nested_str_weak(shortaddr),
|
||||
/* K4 */ be_nested_str_weak(payload),
|
||||
}),
|
||||
be_str_weak(tomap),
|
||||
&be_const_str_solidified,
|
||||
( &(const binstruction[14]) { /* code */
|
||||
0xA4060000, // 0000 IMPORT R1 K0
|
||||
0x60080003, // 0001 GETGBL R2 G3
|
||||
0x5C0C0000, // 0002 MOVE R3 R0
|
||||
0x7C080200, // 0003 CALL R2 1
|
||||
0x8C080501, // 0004 GETMET R2 R2 K1
|
||||
0x7C080200, // 0005 CALL R2 1
|
||||
0x8C0C0303, // 0006 GETMET R3 R1 K3
|
||||
0x58140004, // 0007 LDCONST R5 K4
|
||||
0x88180105, // 0008 GETMBR R6 R0 K5
|
||||
0x7C0C0600, // 0009 CALL R3 3
|
||||
0x980A0403, // 000A SETIDX R2 K2 R3
|
||||
0x880C0106, // 000B GETMBR R3 R0 K6
|
||||
0x980A0C03, // 000C SETIDX R2 K6 R3
|
||||
0x80040400, // 000D RET 1 R2
|
||||
( &(const binstruction[13]) { /* code */
|
||||
0x60040003, // 0000 GETGBL R1 G3
|
||||
0x5C080000, // 0001 MOVE R2 R0
|
||||
0x7C040200, // 0002 CALL R1 1
|
||||
0x8C040300, // 0003 GETMET R1 R1 K0
|
||||
0x7C040200, // 0004 CALL R1 1
|
||||
0x60080018, // 0005 GETGBL R2 G24
|
||||
0x580C0002, // 0006 LDCONST R3 K2
|
||||
0x88100103, // 0007 GETMBR R4 R0 K3
|
||||
0x7C080400, // 0008 CALL R2 2
|
||||
0x98060202, // 0009 SETIDX R1 K1 R2
|
||||
0x88080104, // 000A GETMBR R2 R0 K4
|
||||
0x98060802, // 000B SETIDX R1 K4 R2
|
||||
0x80040200, // 000C RET 1 R1
|
||||
})
|
||||
)
|
||||
);
|
||||
|
|
|
@ -47,7 +47,7 @@ def parse_file(fname, prefix_out)
|
|||
# output solidified
|
||||
var fname_h = string.split(fname, '.be')[0] + '.h' # take whatever is before the first '.be'
|
||||
var fout = open(prefix_out + "solidified_" + fname_h, "w")
|
||||
fout.write(string.format("/* Solidification of %s */\n", fname_h))
|
||||
fout.write(format("/* Solidification of %s */\n", fname_h))
|
||||
fout.write("/********************************************************************\\\n")
|
||||
fout.write("* Generated code, don't edit *\n")
|
||||
fout.write("\\********************************************************************/\n")
|
||||
|
|
|
@ -74,8 +74,7 @@ class ArtNet
|
|||
self.matrix.set_bytes(universe, packet, 18, data_len)
|
||||
dirty = true
|
||||
end
|
||||
# import string
|
||||
# tasmota.log(string.format("DMX: opcode=0x%04X protocol=%i seq=%i phy=%i universe=%i data_len=%i data=%s",
|
||||
# tasmota.log(format("DMX: opcode=0x%04X protocol=%i seq=%i phy=%i universe=%i data_len=%i data=%s",
|
||||
# opcode, protocol, seq, phy, universe, data_len, packet[18..-1].tohex()))
|
||||
end
|
||||
end
|
||||
|
|
|
@ -87,7 +87,6 @@ class ArtNet_UI
|
|||
#######################################################################
|
||||
def page_artnet_ui()
|
||||
import webserver
|
||||
import string
|
||||
if !webserver.check_privileged_access() return nil end
|
||||
|
||||
# read configuration
|
||||
|
@ -100,13 +99,13 @@ class ArtNet_UI
|
|||
# webserver.content_send("<p><small> (This feature requires an internet connection)</small></p>")
|
||||
|
||||
webserver.content_send("<fieldset><style>.bdis{background:#888;}.bdis:hover{background:#888;}</style>")
|
||||
webserver.content_send(string.format("<legend><b title='ArtNet'> ArtNet configuration</b></legend>"))
|
||||
webserver.content_send(format("<legend><b title='ArtNet'> ArtNet configuration</b></legend>"))
|
||||
|
||||
webserver.content_send("<p><form id=artnet_ui style='display: block;' action='/artnet_ui' method='post'>")
|
||||
|
||||
# WS2812 bus configuration
|
||||
webserver.content_send(string.format("<p>WS2812 configuration: </p>"))
|
||||
webserver.content_send(string.format(
|
||||
webserver.content_send(format("<p>WS2812 configuration: </p>"))
|
||||
webserver.content_send(format(
|
||||
"<table style='width:100%%'>"
|
||||
"<tr><td style='width:150px'><b>GPIO</b></td><td style='width:150px'>"))
|
||||
|
||||
|
@ -117,29 +116,29 @@ class ArtNet_UI
|
|||
else
|
||||
webserver.content_send("<select id='ws2812'>")
|
||||
for gp:ws2812_list
|
||||
webserver.content_send(string.format("<option value='%i'>%s</option>", gp, "WS2812 - " + str(gp+1)))
|
||||
webserver.content_send(format("<option value='%i'>%s</option>", gp, "WS2812 - " + str(gp+1)))
|
||||
end
|
||||
webserver.content_send("</select>")
|
||||
end
|
||||
webserver.content_send("</td><td></td></tr>")
|
||||
|
||||
webserver.content_send(string.format("<tr><td><b>Rows</b></td><td>"))
|
||||
webserver.content_send(string.format("<input type='number' min='1' name='rows' value='%i'>", conf.rows))
|
||||
webserver.content_send(format("<tr><td><b>Rows</b></td><td>"))
|
||||
webserver.content_send(format("<input type='number' min='1' name='rows' value='%i'>", conf.rows))
|
||||
webserver.content_send("</td></tr>")
|
||||
webserver.content_send(string.format("<tr><td><b>Columns</b></td><td>"))
|
||||
webserver.content_send(string.format("<input type='number' min='1' name='cols' value='%i'>", conf.cols))
|
||||
webserver.content_send(format("<tr><td><b>Columns</b></td><td>"))
|
||||
webserver.content_send(format("<input type='number' min='1' name='cols' value='%i'>", conf.cols))
|
||||
webserver.content_send("</td></tr>")
|
||||
webserver.content_send(string.format("<tr><td><b>Offset</b></td><td>"))
|
||||
webserver.content_send(string.format("<input type='number' min='0' name='offs' value='%i'>", conf.offs))
|
||||
webserver.content_send(format("<tr><td><b>Offset</b></td><td>"))
|
||||
webserver.content_send(format("<input type='number' min='0' name='offs' value='%i'>", conf.offs))
|
||||
webserver.content_send("</td></tr>")
|
||||
|
||||
webserver.content_send(string.format("<tr><td><b>Alternate rows</b></td><td>"))
|
||||
webserver.content_send(string.format("<input type='checkbox' name='alt'%s></p>", conf.alt ? " checked" : ""))
|
||||
webserver.content_send(format("<tr><td><b>Alternate rows</b></td><td>"))
|
||||
webserver.content_send(format("<input type='checkbox' name='alt'%s></p>", conf.alt ? " checked" : ""))
|
||||
webserver.content_send("</td></tr>")
|
||||
|
||||
webserver.content_send("<tr><td> </td></tr>")
|
||||
webserver.content_send(string.format("<tr><td><b>DMX universe</b></td><td>"))
|
||||
webserver.content_send(string.format("<input type='number' min='0' name='univ' value='%i'>", conf.univ))
|
||||
webserver.content_send(format("<tr><td><b>DMX universe</b></td><td>"))
|
||||
webserver.content_send(format("<input type='number' min='0' name='univ' value='%i'>", conf.univ))
|
||||
webserver.content_send("</td></tr>")
|
||||
# description
|
||||
webserver.content_send("<tr><td colspan='3' style='word-wrap: break-word;'>")
|
||||
|
@ -149,23 +148,23 @@ class ArtNet_UI
|
|||
webserver.content_send("</table><hr>")
|
||||
|
||||
# IP configuration
|
||||
webserver.content_send(string.format("<p>IP listener: </p>"))
|
||||
webserver.content_send(format("<p>IP listener: </p>"))
|
||||
webserver.content_send("<table style='width:100%%'>")
|
||||
# "<tr><td style='width:120px'><b>IP mode</b></td><td style='width:180px'>"))
|
||||
# webserver.content_send("<select id='ip'>")
|
||||
# webserver.content_send(string.format("<option value='uni'%s>unicast</option>", conf.addr == 'uni' ? " selected" : ""))
|
||||
# webserver.content_send(string.format("<option value='multi'%s>multicast</option>", conf.addr == 'multi' ? " selected" : ""))
|
||||
# webserver.content_send(format("<option value='uni'%s>unicast</option>", conf.addr == 'uni' ? " selected" : ""))
|
||||
# webserver.content_send(format("<option value='multi'%s>multicast</option>", conf.addr == 'multi' ? " selected" : ""))
|
||||
# webserver.content_send("</select>")
|
||||
# webserver.content_send("</td><td></td></tr>")
|
||||
|
||||
webserver.content_send("<tr><td style='width:120px'><b>Port</b></td><td style='width:180px'>")
|
||||
# webserver.content_send(string.format("<tr><td><b>Port</b></td><td>"))
|
||||
webserver.content_send(string.format("<input type='number' min='1' name='port' value='%i'>", conf.port))
|
||||
# webserver.content_send(format("<tr><td><b>Port</b></td><td>"))
|
||||
webserver.content_send(format("<input type='number' min='1' name='port' value='%i'>", conf.port))
|
||||
webserver.content_send("</td></tr>")
|
||||
webserver.content_send("</table><hr>")
|
||||
|
||||
# auto-run
|
||||
webserver.content_send(string.format("<p><b>Auto-run at boot:</b> <input type='checkbox' name='auto'%s></p>", conf.auto ? " checked" : ""))
|
||||
webserver.content_send(format("<p><b>Auto-run at boot:</b> <input type='checkbox' name='auto'%s></p>", conf.auto ? " checked" : ""))
|
||||
|
||||
# button
|
||||
webserver.content_send("<button name='artnetapply' class='button bgrn'>Apply and Run</button>")
|
||||
|
@ -183,7 +182,6 @@ class ArtNet_UI
|
|||
import webserver
|
||||
if !webserver.check_privileged_access() return nil end
|
||||
|
||||
import string
|
||||
import persist
|
||||
import introspect
|
||||
|
||||
|
@ -241,12 +239,12 @@ class ArtNet_UI
|
|||
raise "value_error", "Unknown command"
|
||||
end
|
||||
except .. as e, m
|
||||
print(string.format("BRY: Exception> '%s' - %s", e, m))
|
||||
print(format("BRY: Exception> '%s' - %s", e, m))
|
||||
#- display error page -#
|
||||
webserver.content_start("Parameter error") #- title of the web page -#
|
||||
webserver.content_send_style() #- send standard Tasmota styles -#
|
||||
|
||||
webserver.content_send(string.format("<p style='width:340px;'><b>Exception:</b><br>'%s'<br>%s</p>", e, m))
|
||||
webserver.content_send(format("<p style='width:340px;'><b>Exception:</b><br>'%s'<br>%s</p>", e, m))
|
||||
|
||||
webserver.content_button(webserver.BUTTON_CONFIGURATION) #- button back to management page -#
|
||||
webserver.content_stop() #- end of web page -#
|
||||
|
|
|
@ -55,7 +55,6 @@
|
|||
self.touched = self.is_pressed()
|
||||
# tasmota.log("DEBUG> int="+str(self.tp_int)+" touched="+str(self.touched), 2)
|
||||
if self.touched
|
||||
import string
|
||||
var raw_read = self.wire.read_bytes(self.addr, 0x02, 11) # read a series of 11 bytes at from register 0x02
|
||||
var pts = raw_read[0]
|
||||
if pts <= 0 || pts > 2 return end # wrong
|
||||
|
@ -63,7 +62,7 @@
|
|||
#var p0f = (raw_read[4] & 0x10) != 0 # unused for now
|
||||
self.x = raw_read.get(1,-2) & 0x0FFF
|
||||
self.y = raw_read.get(3,-2) & 0x0FFF
|
||||
# tasmota.log(string.format("I2C: screen pressed x=%i y=%i", self.x, self.y), 2)
|
||||
# tasmota.log(format("I2C: screen pressed x=%i y=%i", self.x, self.y), 2)
|
||||
# var p1x = raw_read.get(7,2) & 0x0FFF
|
||||
# var p1y = raw_read.get(9,2) & 0x0FFF
|
||||
end
|
||||
|
|
|
@ -108,8 +108,7 @@ class MPU6886_9250 : I2C_Driver
|
|||
#- display sensor value in the web UI -#
|
||||
def web_sensor()
|
||||
if !self.wire return nil end #- exit if not initialized -#
|
||||
import string
|
||||
var msg = string.format(
|
||||
var msg = format(
|
||||
"{s}MPU%d acc_x{m}%.3f G{e}"..
|
||||
"{s}MPU%d acc_y{m}%.3f G{e}"..
|
||||
"{s}MPU%d acc_z{m}%.3f G{e}"..
|
||||
|
@ -124,11 +123,10 @@ class MPU6886_9250 : I2C_Driver
|
|||
#- add sensor value to teleperiod -#
|
||||
def json_append()
|
||||
if !self.wire return nil end #- exit if not initialized -#
|
||||
import string
|
||||
var ax = int(self.accel[0] * 1000)
|
||||
var ay = int(self.accel[1] * 1000)
|
||||
var az = int(self.accel[2] * 1000)
|
||||
var msg = string.format(",\"MPU%d\":{\"AX\":%i,\"AY\":%i,\"AZ\":%i,\"GX\":%i,\"GY\":%i,\"GZ\":%i}",
|
||||
var msg = format(",\"MPU%d\":{\"AX\":%i,\"AY\":%i,\"AZ\":%i,\"GX\":%i,\"GY\":%i,\"GZ\":%i}",
|
||||
self.device, ax, ay, az, self.gyro[0], self.gyro[1], self.gyro[2])
|
||||
tasmota.response_append(msg)
|
||||
end
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
# QH' output of first '595 to SER input of 2nd '595 and so on
|
||||
# -------------------------------------------------------------------------
|
||||
|
||||
import string
|
||||
import gpio
|
||||
|
||||
class Shift595
|
||||
|
|
|
@ -146,7 +146,7 @@ class Tm1637
|
|||
if size(num) > max_str_len
|
||||
num = string.split(num, max_str_len)[0]
|
||||
end
|
||||
num = string.format('%4s', num)
|
||||
num = format('%4s', num)
|
||||
var payload = bytes(-5)
|
||||
payload[0] = self.CMD_ADDR
|
||||
var int_offset = 1
|
||||
|
|
|
@ -25,8 +25,7 @@ class Button_counter_demo : Driver
|
|||
end
|
||||
|
||||
#- display the counter in its own line -#
|
||||
import string
|
||||
webserver.content_send(string.format("{s}Counter{m}%i{e}", self.counter))
|
||||
webserver.content_send(format("{s}Counter{m}%i{e}", self.counter))
|
||||
end
|
||||
|
||||
#- display button for Increase Counter and trigger 'incr_counter=1' when pressed -#
|
||||
|
|
|
@ -337,7 +337,6 @@ class lvh_obj
|
|||
|
||||
var event_hasp = self._event_map.find(code)
|
||||
if event_hasp != nil
|
||||
import string
|
||||
import json
|
||||
|
||||
var tas_event_more = "" # complementary data
|
||||
|
@ -345,7 +344,7 @@ class lvh_obj
|
|||
try
|
||||
# try to get the new val
|
||||
var val = self.val
|
||||
if val != nil tas_event_more = string.format(',"val":%s', json.dump(val)) end
|
||||
if val != nil tas_event_more = format(',"val":%s', json.dump(val)) end
|
||||
var text = self.text
|
||||
if text != nil
|
||||
tas_event_more += ',"text":'
|
||||
|
@ -354,7 +353,7 @@ class lvh_obj
|
|||
except ..
|
||||
end
|
||||
end
|
||||
var tas_event = string.format('{"hasp":{"p%ib%i":{"event":"%s"%s}}}', self._page._page_id, self.id, event_hasp, tas_event_more)
|
||||
var tas_event = format('{"hasp":{"p%ib%i":{"event":"%s"%s}}}', self._page._page_id, self.id, event_hasp, tas_event_more)
|
||||
# print("val=",val)
|
||||
tasmota.set_timer(0, /-> tasmota.publish_rule(tas_event))
|
||||
end
|
||||
|
@ -413,7 +412,6 @@ class lvh_obj
|
|||
#====================================================================
|
||||
def set_toggle(t)
|
||||
if type(t) == 'string'
|
||||
import string
|
||||
t = string.toupper(str(t))
|
||||
if t == "TRUE" t = true
|
||||
elif t == "FALSE" t = false
|
||||
|
@ -798,7 +796,7 @@ class lvh_obj
|
|||
# `val_rule_formula`: formula in Berry to transform the value
|
||||
# Ex: `val * 10`
|
||||
# `text_rule`: rule pattern to grab a value for text, ex: `ESP32#Temparature`
|
||||
# `text_rule_format`: format used by `string.format()`
|
||||
# `text_rule_format`: format used by `format()`
|
||||
# Ex: `%.1f °C`
|
||||
#====================================================================
|
||||
def set_val_rule(t)
|
||||
|
@ -840,8 +838,7 @@ class lvh_obj
|
|||
var func = compile(code)
|
||||
self._val_rule_function = func()
|
||||
except .. as e, m
|
||||
import string
|
||||
print(string.format("HSP: failed to compile '%s' - %s (%s)", code, e, m))
|
||||
print(format("HSP: failed to compile '%s' - %s (%s)", code, e, m))
|
||||
end
|
||||
end
|
||||
def get_val_rule_formula()
|
||||
|
@ -855,8 +852,7 @@ class lvh_obj
|
|||
var func = compile(code)
|
||||
self._text_rule_function = func()
|
||||
except .. as e, m
|
||||
import string
|
||||
print(string.format("HSP: failed to compile '%s' - %s (%s)", code, e, m))
|
||||
print(format("HSP: failed to compile '%s' - %s (%s)", code, e, m))
|
||||
end
|
||||
end
|
||||
def get_text_rule_formula()
|
||||
|
@ -873,8 +869,7 @@ class lvh_obj
|
|||
try
|
||||
val_n = func(val_n)
|
||||
except .. as e, m
|
||||
import string
|
||||
print(string.format("HSP: failed to run self._val_rule_function - %s (%s)", e, m))
|
||||
print(format("HSP: failed to run self._val_rule_function - %s (%s)", e, m))
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -894,15 +889,13 @@ class lvh_obj
|
|||
try
|
||||
val = func(val)
|
||||
except .. as e, m
|
||||
import string
|
||||
print(string.format("HSP: failed to run self._text_rule_function - %s (%s)", e, m))
|
||||
print(format("HSP: failed to run self._text_rule_function - %s (%s)", e, m))
|
||||
end
|
||||
end
|
||||
|
||||
var format = self._text_rule_format
|
||||
if type(format) == 'string'
|
||||
import string
|
||||
format = string.format(format, val)
|
||||
format = format(format, val)
|
||||
else
|
||||
format = ""
|
||||
end
|
||||
|
@ -1348,10 +1341,9 @@ class lvh_page
|
|||
end
|
||||
|
||||
# send page events
|
||||
import string
|
||||
var event_str_in = string.format('{"hasp":{"p%i":"out"}}', self._oh.lvh_page_cur_idx)
|
||||
var event_str_in = format('{"hasp":{"p%i":"out"}}', self._oh.lvh_page_cur_idx)
|
||||
tasmota.set_timer(0, /-> tasmota.publish_rule(event_str_in))
|
||||
var event_str_out = string.format('{"hasp":{"p%i":"in"}}', self._page_id)
|
||||
var event_str_out = format('{"hasp":{"p%i":"in"}}', self._page_id)
|
||||
tasmota.set_timer(0, /-> tasmota.publish_rule(event_str_out))
|
||||
|
||||
# change current page
|
||||
|
@ -1728,7 +1720,6 @@ class HASPmota
|
|||
#====================================================================
|
||||
def parse_obj(jline, page)
|
||||
import global
|
||||
import string
|
||||
import introspect
|
||||
|
||||
var obj_id = int(jline.find("id")) # id number or nil
|
||||
|
@ -1743,7 +1734,7 @@ class HASPmota
|
|||
try
|
||||
func_compiled = compile(berry_run)
|
||||
except .. as e,m
|
||||
print(string.format("HSP: unable to compile berry code \"%s\" - '%s' - %s", berry_run, e, m))
|
||||
print(format("HSP: unable to compile berry code \"%s\" - '%s' - %s", berry_run, e, m))
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -1805,7 +1796,7 @@ class HASPmota
|
|||
lvh_page_cur.set_obj(obj_id, obj_lvh)
|
||||
|
||||
# create a global variable for this object of form p<page>b<id>, ex p1b2
|
||||
var glob_name = string.format("p%ib%i", lvh_page_cur.id(), obj_id)
|
||||
var glob_name = format("p%ib%i", lvh_page_cur.id(), obj_id)
|
||||
global.(glob_name) = obj_lvh
|
||||
|
||||
end
|
||||
|
@ -1818,7 +1809,7 @@ class HASPmota
|
|||
f_ret(obj_lvh)
|
||||
end
|
||||
except .. as e,m
|
||||
print(string.format("HSP: unable to run berry code \"%s\" - '%s' - %s", berry_run, e, m))
|
||||
print(format("HSP: unable to run berry code \"%s\" - '%s' - %s", berry_run, e, m))
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -1,26 +1,21 @@
|
|||
#- start LVGL and init environment -#
|
||||
lv.start()
|
||||
|
||||
import string
|
||||
|
||||
scr = lv.scr_act() # default screean object
|
||||
|
||||
def ctorcb(class_p, obj)
|
||||
import string
|
||||
print(string.format("> ctorcb class_p=0x%08X obj=0x%08X", class_p, obj))
|
||||
print(format("> ctorcb class_p=0x%08X obj=0x%08X", class_p, obj))
|
||||
end
|
||||
def dtorcb(class_p, obj)
|
||||
import string
|
||||
print(string.format("> dtorcb class_p=0x%08X obj=0x%08X", class_p, obj))
|
||||
print(format("> dtorcb class_p=0x%08X obj=0x%08X", class_p, obj))
|
||||
end
|
||||
def eventcb(class_p, e)
|
||||
import string
|
||||
import introspect
|
||||
var event = lv_event(e)
|
||||
var obj = introspect.fromptr(event.user_data)
|
||||
var event_code = event.code
|
||||
var target = event.target
|
||||
print(string.format("> event class_p=0x%08X event=%s obj=%s code=%i",
|
||||
print(format("> event class_p=0x%08X event=%s obj=%s code=%i",
|
||||
class_p, str(event), str(obj), event_code))
|
||||
end
|
||||
import cb
|
||||
|
@ -33,16 +28,16 @@ var cb_event = cb.gen_cb(eventcb)
|
|||
#-
|
||||
class_def = lv_obj_class(lv_obj._class).copy()
|
||||
print(class_def)
|
||||
print(string.format("base_class = 0x%08X", class_def.base_class))
|
||||
print(string.format("constructor_cb = 0x%08X", class_def.constructor_cb))
|
||||
print(string.format("destructor_cb = 0x%08X", class_def.destructor_cb))
|
||||
print(string.format("user_data = 0x%08X", class_def.user_data))
|
||||
print(string.format("event_cb = 0x%08X", class_def.event_cb))
|
||||
print(string.format("width_def = %i", class_def.width_def))
|
||||
print(string.format("height_def = %i", class_def.height_def))
|
||||
print(string.format("editable = %i", class_def.editable))
|
||||
print(string.format("group_def = %i", class_def.group_def))
|
||||
print(string.format("instance_size = %i", class_def.instance_size))
|
||||
print(format("base_class = 0x%08X", class_def.base_class))
|
||||
print(format("constructor_cb = 0x%08X", class_def.constructor_cb))
|
||||
print(format("destructor_cb = 0x%08X", class_def.destructor_cb))
|
||||
print(format("user_data = 0x%08X", class_def.user_data))
|
||||
print(format("event_cb = 0x%08X", class_def.event_cb))
|
||||
print(format("width_def = %i", class_def.width_def))
|
||||
print(format("height_def = %i", class_def.height_def))
|
||||
print(format("editable = %i", class_def.editable))
|
||||
print(format("group_def = %i", class_def.group_def))
|
||||
print(format("instance_size = %i", class_def.instance_size))
|
||||
-#
|
||||
|
||||
import introspect
|
||||
|
|
|
@ -92,8 +92,7 @@ bootloader().flash('https://raw.githubusercontent.com/espressif/arduino-esp32/ma
|
|||
#bootloader().flash('https://raw.githubusercontent.com/espressif/arduino-esp32/master/tools/sdk/esp32/bin/bootloader_dout_40m.bin')
|
||||
|
||||
#### debug only
|
||||
import string
|
||||
bl = bootloader()
|
||||
print(string.format("0x%04X", bl.get_bootloader_address()))
|
||||
print(format("0x%04X", bl.get_bootloader_address()))
|
||||
|
||||
-#
|
|
@ -65,8 +65,7 @@ class Partition_info
|
|||
|
||||
elif magic == 0xEBEB #- MD5 -#
|
||||
else
|
||||
import string
|
||||
raise "internal_error", string.format("invalid magic number %02X", magic)
|
||||
raise "internal_error", format("invalid magic number %02X", magic)
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -102,17 +101,17 @@ class Partition_info
|
|||
var seg_offset = addr + 0x20 # sizeof(esp_image_header_t) + sizeof(esp_image_segment_header_t) = 24 + 8
|
||||
|
||||
for seg_num:0..seg_count-1
|
||||
# print(string.format("Reading 0x%08X", seg_offset))
|
||||
# print(format("Reading 0x%08X", seg_offset))
|
||||
var segment_header = flash.read(seg_offset - 8, 8)
|
||||
var seg_start_addr = segment_header.get(0, 4)
|
||||
var seg_size = segment_header.get(4,4)
|
||||
# print(string.format("Segment %i: flash_offset=0x%08X start_addr=0x%08X size=0x%08X", seg_num, seg_offset, seg_start_addr, seg_size))
|
||||
# print(format("Segment %i: flash_offset=0x%08X start_addr=0x%08X size=0x%08X", seg_num, seg_offset, seg_start_addr, seg_size))
|
||||
|
||||
seg_offset += seg_size + 8 # add segment_length + sizeof(esp_image_segment_header_t)
|
||||
end
|
||||
var total_size = seg_offset - addr + 1 # add 1KB for safety
|
||||
|
||||
# print(string.format("Total size = %i KB", total_size/1024))
|
||||
# print(format("Total size = %i KB", total_size/1024))
|
||||
|
||||
return total_size
|
||||
except .. as e, m
|
||||
|
@ -122,7 +121,6 @@ class Partition_info
|
|||
end
|
||||
|
||||
def tostring()
|
||||
import string
|
||||
var type_s = ""
|
||||
var subtype_s = ""
|
||||
if self.type == 0 type_s = "app"
|
||||
|
@ -146,7 +144,7 @@ class Partition_info
|
|||
#- reformat strings -#
|
||||
if type_s != "" type_s = " (" + type_s + ")" end
|
||||
if subtype_s != "" subtype_s = " (" + subtype_s + ")" end
|
||||
return string.format("<instance: Partition_info(%d%s,%d%s,0x%08X,0x%08X,'%s',0x%X)>",
|
||||
return format("<instance: Partition_info(%d%s,%d%s,0x%08X,0x%08X,'%s',0x%X)>",
|
||||
self.type, type_s,
|
||||
self.subtype, subtype_s,
|
||||
self.start, self.sz,
|
||||
|
@ -351,8 +349,7 @@ class Partition_otadata
|
|||
|
||||
# Produce a human-readable representation of the object with relevant information
|
||||
def tostring()
|
||||
import string
|
||||
return string.format("<instance: Partition_otadata(ota_active:%d, ota_seq=[%d,%d], ota_max=%d)>",
|
||||
return format("<instance: Partition_otadata(ota_active:%d, ota_seq=[%d,%d], ota_max=%d)>",
|
||||
self.active_otadata, self.seq0, self.seq1, self.maxota)
|
||||
end
|
||||
end
|
||||
|
@ -519,18 +516,17 @@ class Partition_manager_UI
|
|||
#- ---------------------------------------------------------------------- -#
|
||||
def page_show_partition(slot, active, ota_num, maxota)
|
||||
import webserver
|
||||
import string
|
||||
#- define `bdis` style for gray disabled buttons -#
|
||||
webserver.content_send("<fieldset><style>.bdis{background:#888;}.bdis:hover{background:#888;}</style>")
|
||||
webserver.content_send(string.format("<legend><b title='Start: 0x%03X 000'> %s%s </b></legend>",
|
||||
webserver.content_send(format("<legend><b title='Start: 0x%03X 000'> %s%s </b></legend>",
|
||||
slot.start / 0x1000, slot.label, active ? " (active)" : ""))
|
||||
|
||||
webserver.content_send(string.format("<p><b>Partition size: </b>%i KB</p>", slot.sz / 1024))
|
||||
webserver.content_send(format("<p><b>Partition size: </b>%i KB</p>", slot.sz / 1024))
|
||||
var used = slot.get_image_size()
|
||||
if used > slot.sz slot.used = -1 end # we may have a leftover of a previous firmware but the slot shrank - in this case the slot is inknown
|
||||
if used >= 0
|
||||
webserver.content_send(string.format("<p><b>Used: </b>%i KB</p>", used / 1024))
|
||||
webserver.content_send(string.format("<p><b>Free: </b>%i KB</p>", (slot.sz - used) / 1024))
|
||||
webserver.content_send(format("<p><b>Used: </b>%i KB</p>", used / 1024))
|
||||
webserver.content_send(format("<p><b>Free: </b>%i KB</p>", (slot.sz - used) / 1024))
|
||||
else
|
||||
webserver.content_send("<p><b>Used</b>: unknown</p>")
|
||||
webserver.content_send("<p><b>Free</b>: unknown</p>")
|
||||
|
@ -540,7 +536,7 @@ class Partition_manager_UI
|
|||
webserver.content_send("<p><form id=setactive style='display: block;' action='/part_mgr' method='post' ")
|
||||
webserver.content_send("onsubmit='return confirm(\"This will change the active partition and cause a restart.\");'>")
|
||||
webserver.content_send("<button name='setactive' class='button bgrn'>Switch To This Partition</button>")
|
||||
webserver.content_send(string.format("<input name='ota' type='hidden' value='%d'>", ota_num))
|
||||
webserver.content_send(format("<input name='ota' type='hidden' value='%d'>", ota_num))
|
||||
webserver.content_send("</form></p>")
|
||||
else
|
||||
# put a fake disabled button
|
||||
|
@ -563,22 +559,21 @@ class Partition_manager_UI
|
|||
#- ---------------------------------------------------------------------- -#
|
||||
def page_show_spiffs(slot, free_mem)
|
||||
import webserver
|
||||
import string
|
||||
webserver.content_send(string.format("<fieldset><legend><b title='Start: 0x%03X 000'> filesystem </b></legend>",
|
||||
webserver.content_send(format("<fieldset><legend><b title='Start: 0x%03X 000'> filesystem </b></legend>",
|
||||
slot.start / 0x1000))
|
||||
|
||||
webserver.content_send(string.format("<p><b>Partition size:</b> %i KB</p>", slot.sz / 1024))
|
||||
webserver.content_send(format("<p><b>Partition size:</b> %i KB</p>", slot.sz / 1024))
|
||||
|
||||
if free_mem != nil
|
||||
webserver.content_send(string.format("<p><b>Max size: </b>%i KB</p>", (slot.sz + free_mem) / 1024))
|
||||
webserver.content_send(string.format("<p><b>Unallocated: </b>%i KB</p>", free_mem / 1024))
|
||||
webserver.content_send(format("<p><b>Max size: </b>%i KB</p>", (slot.sz + free_mem) / 1024))
|
||||
webserver.content_send(format("<p><b>Unallocated: </b>%i KB</p>", free_mem / 1024))
|
||||
end
|
||||
|
||||
#- display Resize button -#
|
||||
webserver.content_send("<hr><p><b>New size:</b> (multiple of 16 KB)</p>")
|
||||
webserver.content_send("<form action='/part_mgr' method='post' ")
|
||||
webserver.content_send("onsubmit='return confirm(\"This will DELETE the content of the file system and cause a restart.\");'>")
|
||||
webserver.content_send(string.format("<input type='number' min='0' max='%d' step='16' name='fs_size' value='%i'>", (slot.sz + free_mem) / 1024, ((slot.sz + free_mem) / 1024 / 16)*16))
|
||||
webserver.content_send(format("<input type='number' min='0' max='%d' step='16' name='fs_size' value='%i'>", (slot.sz + free_mem) / 1024, ((slot.sz + free_mem) / 1024 / 16)*16))
|
||||
webserver.content_send("<p></p><button name='resize' class='button bred'>Resize filesystem</button></form></p>")
|
||||
webserver.content_send("<p></p></fieldset><p></p>")
|
||||
end
|
||||
|
@ -609,7 +604,6 @@ class Partition_manager_UI
|
|||
#- ---------------------------------------------------------------------- -#
|
||||
def page_show_repartition_asym(p)
|
||||
import webserver
|
||||
import string
|
||||
if p.get_active() != 0
|
||||
webserver.content_send("<p style='width:320px;'>Re-partition can be done only if 'app0' is active.</p>")
|
||||
else
|
||||
|
@ -630,16 +624,16 @@ class Partition_manager_UI
|
|||
webserver.content_send("onsubmit='return confirm(\"This will DELETE the content of the file system and cause a restart.\");'>")
|
||||
|
||||
webserver.content_send("<hr><p><b>app0:</b></p>")
|
||||
webserver.content_send(string.format("<p><b>Min:</b> %i KB</p>", app0_used_kb))
|
||||
webserver.content_send(string.format("<p><b>Max:</b> %i KB</p>", self.app_size_max))
|
||||
webserver.content_send(format("<p><b>Min:</b> %i KB</p>", app0_used_kb))
|
||||
webserver.content_send(format("<p><b>Max:</b> %i KB</p>", self.app_size_max))
|
||||
webserver.content_send("<p><b>New:</b> (multiple of 64 KB)</p>")
|
||||
webserver.content_send(string.format("<input type='number' min='%d' max='%d' step='64' name='app0' value='%i'>", app0_used_kb, self.app_size_max, app0_size_kb))
|
||||
webserver.content_send(format("<input type='number' min='%d' max='%d' step='64' name='app0' value='%i'>", app0_used_kb, self.app_size_max, app0_size_kb))
|
||||
|
||||
webserver.content_send("<hr><p><b>app1:</b></p>")
|
||||
webserver.content_send(string.format("<p><b>Min:</b> %i KB</p>", self.app_size_min))
|
||||
webserver.content_send(string.format("<p><b>Max:</b> %i KB</p>", self.app_size_max))
|
||||
webserver.content_send(format("<p><b>Min:</b> %i KB</p>", self.app_size_min))
|
||||
webserver.content_send(format("<p><b>Max:</b> %i KB</p>", self.app_size_max))
|
||||
webserver.content_send("<p><b>New:</b> (multiple of 64 KB)</p>")
|
||||
webserver.content_send(string.format("<input type='number' min='%d' max='%d' step='64' name='app1' value='%i'>", self.app_size_min, self.app_size_max, app1_size_kb))
|
||||
webserver.content_send(format("<input type='number' min='%d' max='%d' step='64' name='app1' value='%i'>", self.app_size_min, self.app_size_max, app1_size_kb))
|
||||
|
||||
webserver.content_send("<p></p><button name='resize' class='button bred'>Resize Partitions</button></form></p>")
|
||||
|
||||
|
@ -650,7 +644,6 @@ class Partition_manager_UI
|
|||
#######################################################################
|
||||
def page_part_mgr()
|
||||
import webserver
|
||||
import string
|
||||
import partition_core
|
||||
if !webserver.check_privileged_access() return nil end
|
||||
var p = partition_core.Partition()
|
||||
|
@ -679,7 +672,6 @@ class Partition_manager_UI
|
|||
#######################################################################
|
||||
def page_part_ctl()
|
||||
import webserver
|
||||
import string
|
||||
import partition_core
|
||||
if !webserver.check_privileged_access() return nil end
|
||||
|
||||
|
@ -693,14 +685,14 @@ class Partition_manager_UI
|
|||
if webserver.has_arg("ota")
|
||||
#- OTA switch partition -#
|
||||
var ota_target = int(webserver.arg("ota"))
|
||||
if ota_target < 0 || ota_target > p.ota_max() raise "value_error", string.format("Invalid partition #%d", ota_target) end
|
||||
if ota_target < 0 || ota_target > p.ota_max() raise "value_error", format("Invalid partition #%d", ota_target) end
|
||||
var ota_slot = p.get_ota_slot(ota_target)
|
||||
|
||||
if ota_slot == nil || ota_slot.get_image_size() < 0
|
||||
raise "value_error", string.format("Invalid OTA slot #%d", ota_target)
|
||||
raise "value_error", format("Invalid OTA slot #%d", ota_target)
|
||||
end
|
||||
|
||||
print(string.format("Trying to change active partition to %d", ota_target))
|
||||
print(format("Trying to change active partition to %d", ota_target))
|
||||
#- do the change -#
|
||||
p.set_active(ota_target)
|
||||
p.otadata.save() #- write to disk -#
|
||||
|
@ -721,7 +713,7 @@ class Partition_manager_UI
|
|||
if spiffs_slot == nil || !spiffs_slot.is_spiffs() raise "value_error", "Last slot is not FS type" end
|
||||
var flash_size_kb = tasmota.memory()['flash']
|
||||
if spiffs_size_kb < 0 || spiffs_size_kb > spiffs_max_size
|
||||
raise "value_error", string.format("Invalid fs_size %i, should be between 0 and %i", spiffs_size_kb, spiffs_max_size)
|
||||
raise "value_error", format("Invalid fs_size %i, should be between 0 and %i", spiffs_size_kb, spiffs_max_size)
|
||||
end
|
||||
if spiffs_size_kb == spiffs_slot.sz/1024 raise "value_error", "FS size unchanged, abort" end
|
||||
|
||||
|
@ -756,7 +748,7 @@ class Partition_manager_UI
|
|||
|
||||
var part_size_kb = int(webserver.arg("repartition"))
|
||||
if part_size_kb < app0_used_kb || part_size_kb > self.app_size_max
|
||||
raise "value_error", string.printf("Invalid partition size %i KB, should be between %i and %i", part_size_kb, app0_used_kb, self.app_size_max)
|
||||
raise "value_error", format("Invalid partition size %i KB, should be between %i and %i", part_size_kb, app0_used_kb, self.app_size_max)
|
||||
end
|
||||
if part_size_kb == app0_size_kb raise "value_error", "No change to partition size, abort" end
|
||||
|
||||
|
@ -799,11 +791,11 @@ class Partition_manager_UI
|
|||
|
||||
var part0_size_kb = int(webserver.arg("app0"))
|
||||
if part0_size_kb < app0_used_kb || part0_size_kb > self.app_size_max
|
||||
raise "value_error", string.printf("Invalid partition size app%i %i KB, should be between %i and %i", 0, part0_size_kb, app0_used_kb, self.app_size_max)
|
||||
raise "value_error", format("Invalid partition size app%i %i KB, should be between %i and %i", 0, part0_size_kb, app0_used_kb, self.app_size_max)
|
||||
end
|
||||
var part1_size_kb = int(webserver.arg("app1"))
|
||||
if part1_size_kb < self.app_size_min || part1_size_kb > self.app_size_max
|
||||
raise "value_error", string.printf("Invalid partition size app%i %i KB, should be between %i and %i", 1, part1_size_kb, self.app_size_min, self.app_size_max)
|
||||
raise "value_error", format("Invalid partition size app%i %i KB, should be between %i and %i", 1, part1_size_kb, self.app_size_min, self.app_size_max)
|
||||
end
|
||||
if part0_size_kb == app0_size_kb && part1_size_kb == app1_size_kb raise "value_error", "No change to partition sizes, abort" end
|
||||
|
||||
|
@ -826,12 +818,12 @@ class Partition_manager_UI
|
|||
raise "value_error", "Unknown command"
|
||||
end
|
||||
except .. as e, m
|
||||
print(string.format("BRY: Exception> '%s' - %s", e, m))
|
||||
print(format("BRY: Exception> '%s' - %s", e, m))
|
||||
#- display error page -#
|
||||
webserver.content_start("Parameter error") #- title of the web page -#
|
||||
webserver.content_send_style() #- send standard Tasmota styles -#
|
||||
|
||||
webserver.content_send(string.format("<p style='width:340px;'><b>Exception:</b><br>'%s'<br>%s</p>", e, m))
|
||||
webserver.content_send(format("<p style='width:340px;'><b>Exception:</b><br>'%s'<br>%s</p>", e, m))
|
||||
# webserver.content_send("<p></p></fieldset><p></p>")
|
||||
|
||||
webserver.content_button(webserver.BUTTON_MANAGEMENT) #- button back to management page -#
|
||||
|
|
|
@ -38,12 +38,11 @@ class Partition_wizard_UI
|
|||
end
|
||||
|
||||
def default_safeboot_URL()
|
||||
import string
|
||||
var arch_sub = tasmota.arch()
|
||||
if arch_sub[0..4] == "esp32"
|
||||
arch_sub = arch_sub[5..] # get the esp32 variant
|
||||
end
|
||||
return string.format(self._default_safeboot_URL, arch_sub)
|
||||
return format(self._default_safeboot_URL, arch_sub)
|
||||
end
|
||||
|
||||
# create a method for adding a button to the main menu
|
||||
|
@ -109,7 +108,6 @@ class Partition_wizard_UI
|
|||
var flash_definition_sector = self.get_flash_definition_sector(p)
|
||||
if (flash_size_k != flash_size_real_k) && flash_definition_sector != nil
|
||||
import flash
|
||||
import string
|
||||
|
||||
flash_size_k = flash_size_real_k # try to expand the flash size definition
|
||||
|
||||
|
@ -133,7 +131,7 @@ class Partition_wizard_UI
|
|||
var old_def = flash_def[3]
|
||||
flash_def[3] = (flash_def[3] & 0x0F) | flash_size_code
|
||||
flash.write(flash_definition_sector, flash_def)
|
||||
tasmota.log(string.format("UPL: changing flash definition from 0x02X to 0x%02X", old_def, flash_def[3]), 3)
|
||||
tasmota.log(format("UPL: changing flash definition from 0x02X to 0x%02X", old_def, flash_def[3]), 3)
|
||||
else
|
||||
raise "internal_error", "wrong flash size "+str(flash_size_real_m)
|
||||
end
|
||||
|
@ -173,14 +171,13 @@ class Partition_wizard_UI
|
|||
#- ---------------------------------------------------------------------- -#
|
||||
def show_resize_fs(p)
|
||||
import webserver
|
||||
import string
|
||||
var unallocated = self.get_unallocated_k(p)
|
||||
|
||||
# if there is unallocated space, propose only to claim it
|
||||
if unallocated > 0
|
||||
webserver.content_send("<fieldset><legend><b> Resize FS to max </b></legend><p></p>")
|
||||
|
||||
webserver.content_send(string.format("<p>You can expand the file system by %i KB.<br>Its content will be lost.</p>", unallocated))
|
||||
webserver.content_send(format("<p>You can expand the file system by %i KB.<br>Its content will be lost.</p>", unallocated))
|
||||
|
||||
webserver.content_send("<form action='/part_wiz' method='post' ")
|
||||
webserver.content_send("onsubmit='return confirm(\"This will DELETE the content of the file system and cause a restart.\");'>")
|
||||
|
@ -193,7 +190,7 @@ class Partition_wizard_UI
|
|||
var flash_size_k = self.get_max_flash_size_k()
|
||||
var fs_max_size_k = flash_size_k - max_fs_start_k
|
||||
var current_fs_size_k = self.get_cur_fs_size_k(p)
|
||||
#print(string.format(">>> max_fs_start_k=0x%X flash_size_k=0x%X fs_max_size_k=%i current_fs_size_k=%i", max_fs_start_k, flash_size_k, fs_max_size_k, current_fs_size_k))
|
||||
#print(format(">>> max_fs_start_k=0x%X flash_size_k=0x%X fs_max_size_k=%i current_fs_size_k=%i", max_fs_start_k, flash_size_k, fs_max_size_k, current_fs_size_k))
|
||||
|
||||
if max_fs_start_k > 0 && fs_max_size_k > 64
|
||||
webserver.content_send("<fieldset><legend><b> Resize FS </b></legend><p></p>")
|
||||
|
@ -202,7 +199,7 @@ class Partition_wizard_UI
|
|||
|
||||
webserver.content_send("<form action='/part_wiz' method='post' ")
|
||||
webserver.content_send("onsubmit='return confirm(\"This will DELETE the content of the file system and cause a restart.\");'>")
|
||||
webserver.content_send(string.format("<input type='number' min='64' max='%d' step='64' name='fs_size' value='%i'>", fs_max_size_k, current_fs_size_k))
|
||||
webserver.content_send(format("<input type='number' min='64' max='%d' step='64' name='fs_size' value='%i'>", fs_max_size_k, current_fs_size_k))
|
||||
webserver.content_send("<p></p><button name='resize_fs' class='button bred'>Resize FS</button></form></p>")
|
||||
|
||||
webserver.content_send("<p></p></fieldset><p></p>")
|
||||
|
@ -257,12 +254,11 @@ class Partition_wizard_UI
|
|||
# - true if DONE
|
||||
# - string if ERROR, indicating the error
|
||||
def test_step_1(p)
|
||||
import string
|
||||
if !self.factory_migrate_eligible(p) return "not eligible to migration" end
|
||||
|
||||
var cur_part = p.otadata.active_otadata # -1=factory 0=ota_0 1=ota_1...
|
||||
if cur_part == 1 return true end
|
||||
if cur_part != 0 return string.format("active_otadata=%i", cur_part) end # unsupported configuration
|
||||
if cur_part != 0 return format("active_otadata=%i", cur_part) end # unsupported configuration
|
||||
# current partition is `app0`
|
||||
# get size of firmware in `app0` and check if it fits on `app1`
|
||||
var app0 = p.get_ota_slot(0)
|
||||
|
@ -294,7 +290,6 @@ class Partition_wizard_UI
|
|||
# - true if DONE
|
||||
# - string if ERROR, indicating the error
|
||||
def test_step_2(p)
|
||||
import string
|
||||
if !self.factory_migrate_eligible(p) return "not eligible to migration" end
|
||||
|
||||
var app0 = p.get_ota_slot(0)
|
||||
|
@ -325,7 +320,6 @@ class Partition_wizard_UI
|
|||
# - true if DONE
|
||||
# - string if ERROR, indicating the error
|
||||
def test_step_3(p)
|
||||
import string
|
||||
if !self.factory_migrate_eligible(p) return "not eligible to migration" end
|
||||
|
||||
return false
|
||||
|
@ -343,7 +337,6 @@ class Partition_wizard_UI
|
|||
# - true if DONE
|
||||
# - string if ERROR, indicating the error
|
||||
def test_step_4(p)
|
||||
import string
|
||||
|
||||
return false
|
||||
# var app0 = p.get_ota_slot(0)
|
||||
|
@ -352,11 +345,10 @@ class Partition_wizard_UI
|
|||
|
||||
static def copy_ota(from_addr, to_addr, sz)
|
||||
import flash
|
||||
import string
|
||||
var size_left = sz
|
||||
var offset = 0
|
||||
|
||||
tasmota.log(string.format("UPL: Copy flash from 0x%06X to 0x%06X (size: %ikB)", from_addr, to_addr, sz / 1024), 2)
|
||||
tasmota.log(format("UPL: Copy flash from 0x%06X to 0x%06X (size: %ikB)", from_addr, to_addr, sz / 1024), 2)
|
||||
while size_left > 0
|
||||
var b = flash.read(from_addr + offset, 4096)
|
||||
flash.erase(to_addr + offset, 4096)
|
||||
|
@ -364,7 +356,7 @@ class Partition_wizard_UI
|
|||
size_left -= 4096
|
||||
offset += 4096
|
||||
if ((offset-4096) / 102400) < (offset / 102400)
|
||||
tasmota.log(string.format("UPL: Progress %ikB", offset/1024), 3)
|
||||
tasmota.log(format("UPL: Progress %ikB", offset/1024), 3)
|
||||
end
|
||||
end
|
||||
tasmota.log("UPL: done", 2)
|
||||
|
@ -390,7 +382,6 @@ class Partition_wizard_UI
|
|||
end
|
||||
|
||||
def do_step_2(p, safeboot_url)
|
||||
import string
|
||||
if safeboot_url == nil || safeboot_url == ""
|
||||
safeboot_url = self.default_safeboot_URL()
|
||||
tasmota.log("UPL: no `safeboot` URL, defaulting to "+safeboot_url, 2)
|
||||
|
@ -408,7 +399,7 @@ class Partition_wizard_UI
|
|||
var safeboot_size = cl.get_size()
|
||||
if safeboot_size <= 500000 raise "internal_error", "wrong safeboot size "+str(safeboot_size) end
|
||||
if safeboot_size > (self.app_size_min * 1024) raise "internal_error", "safeboot is too large "+str(safeboot_size / 1024)+"kB" end
|
||||
tasmota.log(string.format("UPL: flashing `safeboot` from %s %ikB", safeboot_url, (safeboot_size / 1024) + 1), 2)
|
||||
tasmota.log(format("UPL: flashing `safeboot` from %s %ikB", safeboot_url, (safeboot_size / 1024) + 1), 2)
|
||||
var app0 = p.get_ota_slot(0)
|
||||
if app0.start != 0x10000 raise "internal_error", "`app0` offset is not 0x10000" end
|
||||
cl.write_flash(app0.start)
|
||||
|
@ -418,7 +409,6 @@ class Partition_wizard_UI
|
|||
|
||||
|
||||
def do_step_3(p)
|
||||
import string
|
||||
import flash
|
||||
|
||||
var step3_state = self.test_step_3(p)
|
||||
|
@ -476,7 +466,6 @@ class Partition_wizard_UI
|
|||
def show_migrate_to_factory(p)
|
||||
# display ota partitions
|
||||
import webserver
|
||||
import string
|
||||
|
||||
if !self.factory_migrate_eligible(p) return end
|
||||
|
||||
|
@ -486,20 +475,20 @@ class Partition_wizard_UI
|
|||
webserver.content_send("<p>Please see <a href='https://tasmota.github.io/docs/Safeboot/' target='_blank'>Safeboot layout documentation</a></p>")
|
||||
webserver.content_send("<p> </p>")
|
||||
|
||||
webserver.content_send(string.format("<p>Step 1: %s</p>", self.display_step_state(self.test_step_1(p), "boot on `app1`")))
|
||||
webserver.content_send(string.format("<p>Step 2: %s</p>", self.display_step_state(self.test_step_2(p), "flash `safeboot` to `app0`")))
|
||||
webserver.content_send(string.format("<p>Step 3: %s</p>", self.display_step_state(self.test_step_3(p), "change partition map")))
|
||||
webserver.content_send(string.format("<p>Step 4: %s</p>", self.display_step_state(self.test_step_4(p), "flash final firmware")))
|
||||
webserver.content_send(format("<p>Step 1: %s</p>", self.display_step_state(self.test_step_1(p), "boot on `app1`")))
|
||||
webserver.content_send(format("<p>Step 2: %s</p>", self.display_step_state(self.test_step_2(p), "flash `safeboot` to `app0`")))
|
||||
webserver.content_send(format("<p>Step 3: %s</p>", self.display_step_state(self.test_step_3(p), "change partition map")))
|
||||
webserver.content_send(format("<p>Step 4: %s</p>", self.display_step_state(self.test_step_4(p), "flash final firmware")))
|
||||
|
||||
webserver.content_send("<form action='/part_wiz' method='post' ")
|
||||
webserver.content_send("onsubmit='return confirm(\"This will causes multiple restarts.\");'>")
|
||||
var ota_url = tasmota.cmd("OtaUrl").find("OtaUrl", "")
|
||||
webserver.content_send(string.format("<br><b>OTA Url</b><br><input id='o1' placeholder='OTA_URL' value='%s'><br>",
|
||||
webserver.content_send(format("<br><b>OTA Url</b><br><input id='o1' placeholder='OTA_URL' value='%s'><br>",
|
||||
ota_url))
|
||||
|
||||
import persist
|
||||
var safeboot_url = persist.find("safeboot_url", self.default_safeboot_URL())
|
||||
webserver.content_send(string.format("<br><b>SAFEBOOT Url</b> (don't change)<input id='o2' placeholder='SAFEBOOT_URL' value='%s'><br>",
|
||||
webserver.content_send(format("<br><b>SAFEBOOT Url</b> (don't change)<input id='o2' placeholder='SAFEBOOT_URL' value='%s'><br>",
|
||||
safeboot_url))
|
||||
|
||||
webserver.content_send("<p></p><button name='factory' class='button bred'>Start migration</button></form></p>")
|
||||
|
@ -513,7 +502,6 @@ class Partition_wizard_UI
|
|||
def show_current_partitions(p)
|
||||
# display ota partitions
|
||||
import webserver
|
||||
import string
|
||||
var cur_part = p.otadata.active_otadata # -1=factory 0=ota_0 1=ota_1...
|
||||
|
||||
webserver.content_send("<fieldset><legend><b> Current partitions </b></legend><p></p><table>")
|
||||
|
@ -530,22 +518,22 @@ class Partition_wizard_UI
|
|||
var usage_str = "unknown"
|
||||
var used = slot.get_image_size()
|
||||
if (used >= 0) && (used <= slot.sz)
|
||||
usage_str = string.format("used %i%%", ((used / 1024) * 100) / (slot.sz / 1024))
|
||||
usage_str = format("used %i%%", ((used / 1024) * 100) / (slot.sz / 1024))
|
||||
end
|
||||
var title = string.format("%ssubtype:%s offset:0x%06X size:0x%06X", current_boot_partition ? "booted " : "", slot.subtype_to_string(), slot.start, slot.sz)
|
||||
var title = format("%ssubtype:%s offset:0x%06X size:0x%06X", current_boot_partition ? "booted " : "", slot.subtype_to_string(), slot.start, slot.sz)
|
||||
var col_before = ""
|
||||
var col_after = ""
|
||||
if current_boot_partition
|
||||
col_before = "<span style='color:#0F0'>["
|
||||
col_after = "]</span>"
|
||||
end
|
||||
# webserver.content_send(string.format("<p><b>%s</b> [%s]: %i KB (%s)</p>", slot.label, slot.subtype_to_string(), slot.size / 1024, usage_str))
|
||||
webserver.content_send(string.format("<tr><td title='%s'><b>%s%s%s</b>: </td><td align='right'> %i KB </td><td> (%s)</td></tr>",
|
||||
# webserver.content_send(format("<p><b>%s</b> [%s]: %i KB (%s)</p>", slot.label, slot.subtype_to_string(), slot.size / 1024, usage_str))
|
||||
webserver.content_send(format("<tr><td title='%s'><b>%s%s%s</b>: </td><td align='right'> %i KB </td><td> (%s)</td></tr>",
|
||||
title, col_before, slot.label, col_after, slot.sz / 1024, usage_str))
|
||||
elif slot.is_spiffs()
|
||||
# spiffs partition
|
||||
var title = string.format("subtype:%s offset:0x%06X size:0x%06X", slot.subtype_to_string(), slot.start, slot.sz)
|
||||
webserver.content_send(string.format("<tr><td title='%s'><b>fs</b>: </td><td align='right'> %i KB</td></tr>", title, slot.sz / 1024))
|
||||
var title = format("subtype:%s offset:0x%06X size:0x%06X", slot.subtype_to_string(), slot.start, slot.sz)
|
||||
webserver.content_send(format("<tr><td title='%s'><b>fs</b>: </td><td align='right'> %i KB</td></tr>", title, slot.sz / 1024))
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -554,7 +542,7 @@ class Partition_wizard_UI
|
|||
var last_slot = p.slots[-1]
|
||||
# verify that last slot is file-system
|
||||
var partition_end_k = (last_slot.start + last_slot.sz) / 1024 # last kb used for fs
|
||||
webserver.content_send(string.format("<tr><td title='offset:0x%06X size:0x%06X'><free>: </td><td align='right'> %i KB</td></tr>",
|
||||
webserver.content_send(format("<tr><td title='offset:0x%06X size:0x%06X'><free>: </td><td align='right'> %i KB</td></tr>",
|
||||
partition_end_k * 1024, unallocated * 1024, unallocated))
|
||||
end
|
||||
webserver.content_send("</table>")
|
||||
|
@ -573,7 +561,6 @@ class Partition_wizard_UI
|
|||
#######################################################################
|
||||
def page_part_mgr()
|
||||
import webserver
|
||||
import string
|
||||
import partition_core
|
||||
if !webserver.check_privileged_access() return nil end
|
||||
var p = partition_core.Partition() # load partition layout
|
||||
|
@ -603,7 +590,6 @@ class Partition_wizard_UI
|
|||
import webserver
|
||||
if !webserver.check_privileged_access() return nil end
|
||||
|
||||
import string
|
||||
import partition_core
|
||||
import persist
|
||||
|
||||
|
@ -648,7 +634,7 @@ class Partition_wizard_UI
|
|||
var current_fs_size_k = self.get_cur_fs_size_k(p)
|
||||
|
||||
var fs_target = int(webserver.arg("fs_size"))
|
||||
if (fs_target < 64) || (fs_target > fs_max_size_k) raise "value_error", string.format("Invalid FS #%d", fs_target) end
|
||||
if (fs_target < 64) || (fs_target > fs_max_size_k) raise "value_error", format("Invalid FS #%d", fs_target) end
|
||||
|
||||
# apply the change
|
||||
# shrink last OTA App
|
||||
|
@ -686,12 +672,12 @@ class Partition_wizard_UI
|
|||
raise "value_error", "Unknown command"
|
||||
end
|
||||
except .. as e, m
|
||||
tasmota.log(string.format("BRY: Exception> '%s' - %s", e, m), 2)
|
||||
tasmota.log(format("BRY: Exception> '%s' - %s", e, m), 2)
|
||||
#- display error page -#
|
||||
webserver.content_start("Parameter error") #- title of the web page -#
|
||||
webserver.content_send_style() #- send standard Tasmota styles -#
|
||||
|
||||
webserver.content_send(string.format("<p style='width:340px;'><b>Exception:</b><br>'%s'<br>%s</p>", e, m))
|
||||
webserver.content_send(format("<p style='width:340px;'><b>Exception:</b><br>'%s'<br>%s</p>", e, m))
|
||||
# webserver.content_send("<p></p></fieldset><p></p>")
|
||||
|
||||
webserver.content_button(webserver.BUTTON_MANAGEMENT) #- button back to management page -#
|
||||
|
@ -710,7 +696,6 @@ class Partition_wizard_UI
|
|||
# string: error with description of error
|
||||
def do_safeboot_partitioning()
|
||||
import webserver
|
||||
import string
|
||||
import partition_core
|
||||
|
||||
var p = partition_core.Partition() # load partition layout
|
||||
|
@ -725,7 +710,7 @@ class Partition_wizard_UI
|
|||
try
|
||||
self.do_step_1(p)
|
||||
except .. as e, m
|
||||
tasmota.log(string.format("UPL: error (%s) %s", e, m), 2)
|
||||
tasmota.log(format("UPL: error (%s) %s", e, m), 2)
|
||||
return m
|
||||
end
|
||||
persist.factory_migrate = true
|
||||
|
@ -744,7 +729,7 @@ class Partition_wizard_UI
|
|||
try
|
||||
self.do_step_2(p, safeboot_url)
|
||||
except .. as e, m
|
||||
tasmota.log(string.format("UPL: error (%s) %s", e, m), 2)
|
||||
tasmota.log(format("UPL: error (%s) %s", e, m), 2)
|
||||
return m
|
||||
end
|
||||
end
|
||||
|
@ -758,7 +743,7 @@ class Partition_wizard_UI
|
|||
try
|
||||
self.do_step_3(p)
|
||||
except .. as e, m
|
||||
tasmota.log(string.format("UPL: error (%s) %s", e, m), 2)
|
||||
tasmota.log(format("UPL: error (%s) %s", e, m), 2)
|
||||
return m
|
||||
end
|
||||
end
|
||||
|
|
|
@ -165,7 +165,6 @@ ts_calibrate.init = def (m)
|
|||
# All values are computed and correct, log results and store to 'display.ini'
|
||||
def finish()
|
||||
# calibration is finished, do the housekeeping
|
||||
import string
|
||||
var p0x = real(self.raw_pts[0].x)
|
||||
var p0y = real(self.raw_pts[0].y)
|
||||
var p1x = real(self.raw_pts[1].x)
|
||||
|
@ -174,7 +173,7 @@ ts_calibrate.init = def (m)
|
|||
var p2y = real(self.raw_pts[2].y)
|
||||
var p3x = real(self.raw_pts[3].x)
|
||||
var p3y = real(self.raw_pts[3].y)
|
||||
tasmota.log(string.format("TS : Calibration (%i,%i) - (%i,%i) - (%i,%i) - (%i,%i)",
|
||||
tasmota.log(format("TS : Calibration (%i,%i) - (%i,%i) - (%i,%i) - (%i,%i)",
|
||||
int(p0x), int(p0y), int(p1x), int(p1y), int(p2x), int(p2y), int(p3x), int(p3y))
|
||||
, 2)
|
||||
var m_line = self.calc_geometry(p0x, p0y, p1x, p1y, p2x, p2y, p3x, p3y, self.hres, self.vres, 20)
|
||||
|
@ -254,9 +253,8 @@ ts_calibrate.init = def (m)
|
|||
|
||||
def calc_geometry(p0x, p0y, p1x, p1y, p2x, p2y, p3x, p3y, hres, vres, padding)
|
||||
import math
|
||||
import string
|
||||
|
||||
tasmota.log(string.format("TS : Geometry (%i,%i) (%i,%i) (%i,%i) (%i,%i) - %ix%i pad %i",
|
||||
tasmota.log(format("TS : Geometry (%i,%i) (%i,%i) (%i,%i) (%i,%i) - %ix%i pad %i",
|
||||
int(p0x), int(p0y),
|
||||
int(p1x), int(p1y),
|
||||
int(p2x), int(p2y),
|
||||
|
@ -314,8 +312,8 @@ ts_calibrate.init = def (m)
|
|||
ymax += extend_y
|
||||
tasmota.log("final xmin=" + str(xmin) + " xmax=" + str(xmax) + " ymin=" + str(ymin) + " ymax=" + str(ymax), 4)
|
||||
|
||||
var M_string = string.format(":M,%i,%i,%i,%i", int(xmin), int(xmax), int(ymin), int(ymax))
|
||||
tasmota.log(string.format("TS : Add this to display.ini '%s'", M_string))
|
||||
var M_string = format(":M,%i,%i,%i,%i", int(xmin), int(xmax), int(ymin), int(ymax))
|
||||
tasmota.log(format("TS : Add this to display.ini '%s'", M_string))
|
||||
return M_string
|
||||
end
|
||||
end
|
||||
|
|
|
@ -58,11 +58,10 @@
|
|||
|
||||
#- Example
|
||||
|
||||
import string
|
||||
import cc2652_flasher as cc
|
||||
cc.start()
|
||||
cc.ping()
|
||||
print(string.format("0x%08X", cc.cmd_get_chip_id()))
|
||||
print(format("0x%08X", cc.cmd_get_chip_id()))
|
||||
# output: 0x3202F000
|
||||
|
||||
# Dumping CC2652 flash into filesystem
|
||||
|
@ -82,8 +81,6 @@ class cc2652_flasher
|
|||
# init - abort zigbee operations and starts the serial driver
|
||||
# args are optional
|
||||
def init(rx, tx, rst, bsl)
|
||||
import string
|
||||
|
||||
self.debug = false
|
||||
self.rx = (rx == nil) ? -1 : rx
|
||||
self.tx = (tx == nil) ? -1 : tx
|
||||
|
@ -96,8 +93,8 @@ class cc2652_flasher
|
|||
if self.tx < 0 self.tx = gpio.pin(gpio.TCP_TX) end
|
||||
if self.rst < 0 self.rst = gpio.pin(gpio.ZIGBEE_RST, 0) end
|
||||
if self.bsl < 0 self.bsl = gpio.pin(gpio.ZIGBEE_RST, 1) end
|
||||
print(string.format("FLH: cc2652_flasher rx=%i tx=%i rst=%i bsl=%i", self.rx, self.tx, self.rst, self.bsl))
|
||||
# tasmota.log(string.format("FLH: cc2652_flasher rx=%i tx=%i rst=%i bsl=%i", self.rx, self.tx, self.rst, self.bsl), 3)
|
||||
print(format("FLH: cc2652_flasher rx=%i tx=%i rst=%i bsl=%i", self.rx, self.tx, self.rst, self.bsl))
|
||||
# tasmota.log(format("FLH: cc2652_flasher rx=%i tx=%i rst=%i bsl=%i", self.rx, self.tx, self.rst, self.bsl), 3)
|
||||
if self.rx < 0 || self.tx < 0 || self.rst < 0 || self.bsl < 0
|
||||
raise "value_error", "cc2652_flasher unspecified GPIOs"
|
||||
end
|
||||
|
@ -338,8 +335,6 @@ class cc2652_flasher
|
|||
|
||||
# higher level
|
||||
def flash_write(addr, data)
|
||||
import string
|
||||
|
||||
var sz = size(data)
|
||||
if (sz % 4 != 0) raise "value_error", "len must be a multiple of 4" end
|
||||
if sz > 128 raise "value_error", "len is bigger than 128" end
|
||||
|
@ -351,12 +346,12 @@ class cc2652_flasher
|
|||
|
||||
var ack
|
||||
ack = self.cmd_get_status()
|
||||
if ack != 0x40 raise "serial_error", string.format("command failed: 0x%02X - 0x%06X (%i)", ack, addr, sz) end
|
||||
if ack != 0x40 raise "serial_error", format("command failed: 0x%02X - 0x%06X (%i)", ack, addr, sz) end
|
||||
|
||||
ret = self.cmd_send_data(data)
|
||||
|
||||
ack = self.cmd_get_status()
|
||||
if ack != 0x40 raise "serial_error", string.format("command failed: 0x%02X - 0x%06X (%i)", ack, addr, sz) end
|
||||
if ack != 0x40 raise "serial_error", format("command failed: 0x%02X - 0x%06X (%i)", ack, addr, sz) end
|
||||
|
||||
end
|
||||
|
||||
|
|
|
@ -118,8 +118,7 @@ class intelhex
|
|||
|
||||
# OK
|
||||
# do whatever needed
|
||||
import string
|
||||
# print(string.format("addr=0x%06X len=0x%02X", address, sz))
|
||||
# print(format("addr=0x%06X len=0x%02X", address, sz))
|
||||
elif record_type == 4
|
||||
if offset_low != 0 raise "value_error", "offset_low not null for cmd 04" end
|
||||
offset_high = b_get(b, 4, -2) # b.get(4,-2)
|
||||
|
|
|
@ -125,23 +125,19 @@ class sonoff_zb_pro_flasher
|
|||
# don't flash so ignore data
|
||||
# check CCFG at location 0x57FD8 (4 bytes)
|
||||
def _check_cb(addr, sz, data, offset)
|
||||
# import string
|
||||
|
||||
# check than sz is a multiple of 4
|
||||
if (sz % 4 != 0)
|
||||
import string
|
||||
raise "value_error", string.format("size of payload is not a mutliple of 4: 0x%06X", addr)
|
||||
raise "value_error", format("size of payload is not a mutliple of 4: 0x%06X", addr)
|
||||
end
|
||||
|
||||
# print(string.format("> addr=0x%06X sz=0x%02X data=%s", addr, sz, data[offset..offset+sz-1]))
|
||||
# print(format("> addr=0x%06X sz=0x%02X data=%s", addr, sz, data[offset..offset+sz-1]))
|
||||
var CCFG = self.CCFG_address
|
||||
if addr <= CCFG && addr+sz > CCFG+4
|
||||
# we have CCFG in the buffer
|
||||
var ccfg_bytes = data.get(4 + CCFG - addr, 4)
|
||||
|
||||
if ccfg_bytes != self.CCFG_reference
|
||||
import string
|
||||
raise "value_error", string.format("incorrect CCFG, BSL is not set to DIO_8 LOW (0x%08X expected 0x%08X)", ccfg_bytes, self.CCFG_reference) end
|
||||
raise "value_error", format("incorrect CCFG, BSL is not set to DIO_8 LOW (0x%08X expected 0x%08X)", ccfg_bytes, self.CCFG_reference) end
|
||||
self.file_validated = true # if we are here, it means that the file looks correct
|
||||
end
|
||||
end
|
||||
|
|
|
@ -125,23 +125,19 @@ class tubezb_cc2652_flasher
|
|||
# don't flash so ignore data
|
||||
# check CCFG at location 0x57FD8 (4 bytes)
|
||||
def _check_cb(addr, sz, data, offset)
|
||||
# import string
|
||||
|
||||
# check than sz is a multiple of 4
|
||||
if (sz % 4 != 0)
|
||||
import string
|
||||
raise "value_error", string.format("size of payload is not a mutliple of 4: 0x%06X", addr)
|
||||
raise "value_error", format("size of payload is not a mutliple of 4: 0x%06X", addr)
|
||||
end
|
||||
|
||||
# print(string.format("> addr=0x%06X sz=0x%02X data=%s", addr, sz, data[offset..offset+sz-1]))
|
||||
# print(format("> addr=0x%06X sz=0x%02X data=%s", addr, sz, data[offset..offset+sz-1]))
|
||||
var CCFG = self.CCFG_address
|
||||
if addr <= CCFG && addr+sz > CCFG+4
|
||||
# we have CCFG in the buffer
|
||||
var ccfg_bytes = data.get(4 + CCFG - addr, 4)
|
||||
|
||||
if ccfg_bytes != self.CCFG_reference
|
||||
import string
|
||||
raise "value_error", string.format("incorrect CCFG, BSL is not set to DIO_8 LOW (0x%08X expected 0x%08X)", ccfg_bytes, self.CCFG_reference) end
|
||||
raise "value_error", format("incorrect CCFG, BSL is not set to DIO_8 LOW (0x%08X expected 0x%08X)", ccfg_bytes, self.CCFG_reference) end
|
||||
self.file_validated = true # if we are here, it means that the file looks correct
|
||||
end
|
||||
end
|
||||
|
|
|
@ -772,11 +772,10 @@ extern "C" {
|
|||
// 11015125C6780B2BCE1D4F68F362692B7D73BC7FFF7FFF7FFF7FFF0F00000040FF7FFF7F0100
|
||||
|
||||
// N=bytes('11015125C6780B2BCE1D4F68F362692B7D73BC7FFF7FFF7FFF7FFF0F00000040FF7FFF7F0100')
|
||||
// import string
|
||||
// s = ''
|
||||
// while size(N) > 0
|
||||
// var n = N.get(0, 2)
|
||||
// s += string.format("0x%04X, ", n)
|
||||
// s += format("0x%04X, ", n)
|
||||
// N = N[2..]
|
||||
// end
|
||||
// print(s)
|
||||
|
|
Loading…
Reference in New Issue