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
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
flow3r
flow3r firmware
Commits
ed827e7b
Commit
ed827e7b
authored
1 year ago
by
q3k
Browse files
Options
Downloads
Patches
Plain Diff
py: about WIP
parent
3aaa641b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
python_payload/main.py
+93
-1
93 additions, 1 deletion
python_payload/main.py
with
93 additions
and
1 deletion
python_payload/main.py
+
93
−
1
View file @
ed827e7b
...
...
@@ -94,12 +94,104 @@ menu_badge = SimpleMenu(
],
vm
,
)
from
st3m
import
InputState
,
Ctx
from
st3m.ui.view
import
ViewWithInputState
from
st3m.utils
import
tau
import
math
class
About
(
ViewWithInputState
):
def
__init__
(
self
):
self
.
ts
=
0.0
super
().
__init__
()
def
think
(
self
,
ins
:
InputState
,
delta_ms
:
int
)
->
None
:
super
().
think
(
ins
,
delta_ms
)
self
.
ts
+=
delta_ms
/
1000
if
self
.
input
.
left_shoulder
.
middle
.
pressed
:
print
(
"
exiting
"
)
def
draw
(
self
,
ctx
:
Ctx
)
->
None
:
ctx
.
rectangle
(
-
120
,
-
120
,
240
,
240
)
ctx
.
rgb
(
117
/
255
,
255
/
255
,
226
/
255
)
ctx
.
fill
()
ctx
.
arc
(
0
,
350
,
300
,
0
,
tau
,
0
)
ctx
.
rgb
(
61
/
255
,
165
/
255
,
30
/
255
)
ctx
.
fill
()
ctx
.
save
()
y
=
-
40
+
math
.
cos
(
self
.
ts
*
2
+
10
)
*
10
ctx
.
translate
(
0
,
y
)
for
i
in
range
(
5
):
a
=
i
*
tau
/
5
+
self
.
ts
size
=
30
+
math
.
cos
(
self
.
ts
)
*
5
ctx
.
save
()
ctx
.
rotate
(
a
)
ctx
.
translate
(
30
,
0
)
ctx
.
arc
(
0
,
0
,
size
,
0
,
tau
,
0
)
ctx
.
gray
(
1
)
ctx
.
fill
()
ctx
.
restore
()
ctx
.
arc
(
0
,
0
,
20
,
0
,
tau
,
0
)
ctx
.
rgb
(
255
/
255
,
247
/
255
,
46
/
255
)
ctx
.
fill
()
ctx
.
restore
()
ctx
.
start_group
()
ctx
.
global_alpha
=
0.5
ctx
.
rgb
(
0
,
0
,
0
)
ctx
.
arc
(
0
,
0
,
80
,
0
,
tau
,
0
)
ctx
.
fill
()
ctx
.
end_group
()
ctx
.
start_group
()
ctx
.
global_alpha
=
1.0
ctx
.
gray
(
1
)
ctx
.
text_align
=
ctx
.
MIDDLE
ctx
.
font
=
"
Camp Font 2
"
ctx
.
font_size
=
50
ctx
.
move_to
(
0
,
-
33
)
ctx
.
text
(
"
flow3r
"
)
ctx
.
move_to
(
0
,
-
3
)
ctx
.
text
(
"
badge
"
)
ctx
.
font
=
"
Camp Font 3
"
ctx
.
font_size
=
15
ctx
.
move_to
(
0
,
25
)
ctx
.
text
(
"
Chaos
"
)
ctx
.
move_to
(
0
,
40
)
ctx
.
text
(
"
Communication
"
)
ctx
.
move_to
(
0
,
55
)
ctx
.
text
(
"
Camp 2023
"
)
ctx
.
end_group
()
menu_system
=
SimpleMenu
(
[
MenuItemBack
(),
MenuItemForeground
(
"
Settings
"
,
menu_settings
),
MenuItemNoop
(
"
Disk Mode
"
),
MenuItemForeground
(
"
About
"
,
About
()),
MenuItemNoop
(
"
Reboot
"
),
],
vm
,
)
menu_main
=
SunMenu
(
[
MenuItemForeground
(
"
Badge
"
,
menu_badge
),
MenuItemForeground
(
"
Music
"
,
menu_music
),
MenuItemForeground
(
"
Apps
"
,
menu_apps
),
MenuItemForeground
(
"
S
ettings
"
,
menu_s
ettings
),
MenuItemForeground
(
"
S
ystem
"
,
menu_s
ystem
),
],
vm
,
)
...
...
This diff is collapsed.
Click to expand it.
q3k
@q3k
mentioned in commit
f19bf6d5
·
1 year ago
mentioned in commit
f19bf6d5
mentioned in commit f19bf6d5706846c21a0bef6b67e4469e4e9c7efa
Toggle commit list
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