Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
flow3r firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dos
flow3r firmware
Commits
efbce0ce
Commit
efbce0ce
authored
Sep 2, 2023
by
ave
Browse files
Options
Downloads
Patches
Plain Diff
flow3r/profiling: allow ftop to be turned on in settings
parent
b809e893
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
python_payload/st3m/profiling.py
+2
-4
2 additions, 4 deletions
python_payload/st3m/profiling.py
python_payload/st3m/settings.py
+2
-0
2 additions, 0 deletions
python_payload/st3m/settings.py
python_payload/st3m/settings_menu.py
+1
-0
1 addition, 0 deletions
python_payload/st3m/settings_menu.py
with
5 additions
and
4 deletions
python_payload/st3m/profiling.py
+
2
−
4
View file @
efbce0ce
import
sys_kernel
import
sys_kernel
from
st3m
import
settings
class
ftop
:
class
ftop
:
auto_enable
=
(
False
# hiii this should be toggleable via settings at some point pls~
)
auto_interval_ms
=
5000
# maybe this one too idk~
auto_interval_ms
=
5000
# maybe this one too idk~
_auto_countdown_ms
=
0
_auto_countdown_ms
=
0
_max_name_len
=
0
_max_name_len
=
0
...
@@ -17,7 +15,7 @@ class ftop:
...
@@ -17,7 +15,7 @@ class ftop:
if a new report is scheduled and if so saves it in ftop.report.
if a new report is scheduled and if so saves it in ftop.report.
Returns True if a new report has been generated, else false.
Returns True if a new report has been generated, else false.
"""
"""
if
ftop
.
auto_enable
:
if
settings
.
onoff_debug_ftop
.
value
and
sys_kernel
.
usb_console_active
()
:
ftop
.
_auto_countdown_ms
-=
delta_t_ms
ftop
.
_auto_countdown_ms
-=
delta_t_ms
if
ftop
.
_auto_countdown_ms
<=
0
:
if
ftop
.
_auto_countdown_ms
<=
0
:
ftop
.
_auto_countdown_ms
=
ftop
.
auto_interval_ms
ftop
.
_auto_countdown_ms
=
ftop
.
auto_interval_ms
...
...
This diff is collapsed.
Click to expand it.
python_payload/st3m/settings.py
+
2
−
0
View file @
efbce0ce
...
@@ -180,6 +180,7 @@ onoff_button_swap = OnOffTunable("Swap Buttons", "system.swap_buttons", False)
...
@@ -180,6 +180,7 @@ onoff_button_swap = OnOffTunable("Swap Buttons", "system.swap_buttons", False)
onoff_show_fps
=
OnOffTunable
(
"
Show FPS
"
,
"
system.show_fps
"
,
False
)
onoff_show_fps
=
OnOffTunable
(
"
Show FPS
"
,
"
system.show_fps
"
,
False
)
onoff_debug
=
OnOffTunable
(
"
Debug Overlay
"
,
"
system.debug
"
,
False
)
onoff_debug
=
OnOffTunable
(
"
Debug Overlay
"
,
"
system.debug
"
,
False
)
onoff_debug_touch
=
OnOffTunable
(
"
Touch Overlay
"
,
"
system.debug_touch
"
,
False
)
onoff_debug_touch
=
OnOffTunable
(
"
Touch Overlay
"
,
"
system.debug_touch
"
,
False
)
onoff_debug_ftop
=
OnOffTunable
(
"
Debug: ftop
"
,
"
system.ftop_enabled
"
,
False
)
onoff_show_tray
=
OnOffTunable
(
"
Show Icons
"
,
"
system.show_icons
"
,
True
)
onoff_show_tray
=
OnOffTunable
(
"
Show Icons
"
,
"
system.show_icons
"
,
True
)
onoff_wifi
=
OnOffTunable
(
"
Enable WiFi on Boot
"
,
"
system.wifi.enabled
"
,
False
)
onoff_wifi
=
OnOffTunable
(
"
Enable WiFi on Boot
"
,
"
system.wifi.enabled
"
,
False
)
onoff_wifi_preference
=
OnOffTunable
(
onoff_wifi_preference
=
OnOffTunable
(
...
@@ -194,6 +195,7 @@ load_save_settings: List[UnaryTunable] = [
...
@@ -194,6 +195,7 @@ load_save_settings: List[UnaryTunable] = [
onoff_show_tray
,
onoff_show_tray
,
onoff_button_swap
,
onoff_button_swap
,
onoff_debug
,
onoff_debug
,
onoff_debug_ftop
,
onoff_debug_touch
,
onoff_debug_touch
,
onoff_wifi
,
onoff_wifi
,
onoff_wifi_preference
,
onoff_wifi_preference
,
...
...
This diff is collapsed.
Click to expand it.
python_payload/st3m/settings_menu.py
+
1
−
0
View file @
efbce0ce
...
@@ -218,6 +218,7 @@ settings_menu_structure: "MenuStructure" = [
...
@@ -218,6 +218,7 @@ settings_menu_structure: "MenuStructure" = [
onoff_show_tray
,
onoff_show_tray
,
onoff_button_swap
,
onoff_button_swap
,
onoff_show_fps
,
onoff_show_fps
,
onoff_debug_ftop
,
# onoff_debug,
# onoff_debug,
# onoff_debug_touch,
# onoff_debug_touch,
]
]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment