Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Berry include changes in 're' to HASPmota #23153

Merged
merged 1 commit into from
Mar 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/libesp32_lvgl/lv_haspmota/src/embedded/lv_haspmota.be
Original file line number Diff line number Diff line change
Expand Up @@ -2845,7 +2845,7 @@ class HASPmota
def init()
self.fix_lv_version()
import re
self.re_page_target = re.compile("p\\d+")
self.re_page_target = re.compilebytes("p\\d+")
# nothing to put here up to now
end

Expand Down Expand Up @@ -3094,6 +3094,7 @@ class HASPmota
# Returns: the target page object if changed, or `nil` if still on same page
#====================================================================
def page_show(action, anim, duration)
import re
# resolve between page numbers
# p1 is either a number or nil (stored value)
# p2 is the default value
Expand Down Expand Up @@ -3129,7 +3130,7 @@ class HASPmota
if (to_page == cur_page.id())
to_page = to_page_resolve(int(cur_page.next), sorted_pages_list[1], sorted_pages_list)
end
elif self.re_page_target.match(action)
elif re.match(self.re_page_target, action)
# action is supposed to be `p<number>` format
to_page = to_page_resolve(int(action[1..-1]), nil #-default to nil-#, sorted_pages_list)
end
Expand Down
Loading