mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-28 13:16:32 +00:00
HASPmota PSRAM memory leak (#20818)
This commit is contained in:
parent
bf91af0c07
commit
a4397b26b8
@ -27,6 +27,7 @@ All notable changes to this project will be documented in this file.
|
|||||||
### Fixed
|
### Fixed
|
||||||
- ESP32 PWM activity on unconfigured PWM GPIOs (#20732)
|
- ESP32 PWM activity on unconfigured PWM GPIOs (#20732)
|
||||||
- Shutter inverted using internal commands (#20752)
|
- Shutter inverted using internal commands (#20752)
|
||||||
|
- HASPmota PSRAM memory leak
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -180,9 +180,8 @@ class lvh_obj
|
|||||||
# Checks if the attribute is a color
|
# Checks if the attribute is a color
|
||||||
# I.e. ends with `color` (to not conflict with attributes containing `color_<x>`)
|
# I.e. ends with `color` (to not conflict with attributes containing `color_<x>`)
|
||||||
#################################################################################
|
#################################################################################
|
||||||
static def is_color_attribute(t)
|
def is_color_attribute(t)
|
||||||
import re
|
return self._page._oh.re_color_suffix.search(str(t))
|
||||||
return bool(re.search("color$", str(t)))
|
|
||||||
end
|
end
|
||||||
|
|
||||||
#- remove trailing NULL chars from a bytes buffer before converting to string -#
|
#- remove trailing NULL chars from a bytes buffer before converting to string -#
|
||||||
@ -1615,6 +1614,7 @@ class HASPmota
|
|||||||
var lvh_page_cur_idx # (int) current page index number
|
var lvh_page_cur_idx # (int) current page index number
|
||||||
# regex patterns
|
# regex patterns
|
||||||
var re_page_target # compiled regex for action `p<number>`
|
var re_page_target # compiled regex for action `p<number>`
|
||||||
|
var re_color_suffix # compiled regex for detecting a color
|
||||||
# specific event_cb handling for less memory usage since we are registering a lot of callbacks
|
# specific event_cb handling for less memory usage since we are registering a lot of callbacks
|
||||||
var event # try to keep the event object around and reuse it
|
var event # try to keep the event object around and reuse it
|
||||||
var event_cb # the low-level callback for the closure to be registered
|
var event_cb # the low-level callback for the closure to be registered
|
||||||
@ -1655,6 +1655,7 @@ class HASPmota
|
|||||||
self.fix_lv_version()
|
self.fix_lv_version()
|
||||||
import re
|
import re
|
||||||
self.re_page_target = re.compile("p\\d+")
|
self.re_page_target = re.compile("p\\d+")
|
||||||
|
self.re_color_suffix = re.compile("color$")
|
||||||
# nothing to put here up to now
|
# nothing to put here up to now
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -1761,7 +1762,7 @@ class HASPmota
|
|||||||
|
|
||||||
if type(jline) == 'instance'
|
if type(jline) == 'instance'
|
||||||
if tasmota.loglevel(4)
|
if tasmota.loglevel(4)
|
||||||
tasmota.log(f"HSP: parsing line '{jsonl[0]}' {tasmota.loglevel(4)=}", 4)
|
tasmota.log(f"HSP: parsing line '{jsonl[0]}'", 4)
|
||||||
end
|
end
|
||||||
self.parse_page(jline) # parse page first to create any page related objects, may change self.lvh_page_cur_idx
|
self.parse_page(jline) # parse page first to create any page related objects, may change self.lvh_page_cur_idx
|
||||||
# objects are created in the current page
|
# objects are created in the current page
|
||||||
|
Loading…
x
Reference in New Issue
Block a user