Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
Open-Cube FW
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Open Cube
Open-Cube FW
Commits
6d6a90b1
Commit
6d6a90b1
authored
1 year ago
by
Václav Jelínek
Browse files
Options
Downloads
Patches
Plain Diff
Correct display show in menu
parent
c012a136
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#75821
passed
1 year ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
main/main.py
+5
-3
5 additions, 3 deletions
main/main.py
with
5 additions
and
3 deletions
main/main.py
+
5
−
3
View file @
6d6a90b1
...
...
@@ -7,6 +7,8 @@ import gc
from
lib.robot
import
Robot
from
lib.robot_consts
import
Button
esp_name
=
"
Open-Cube01
"
# File and directory constants for browsing user programs
FILE
=
0x8000
DIRECTORY
=
0x4000
...
...
@@ -58,7 +60,6 @@ def main():
robot
.
display
.
centered_text
(
'
?
'
,
30
,
1
)
robot
.
display
.
text
(
'
no
'
,
10
,
44
,
1
)
robot
.
display
.
text
(
'
yes
'
,
100
,
44
,
1
)
robot
.
display
.
show
()
def
display_show_program
(
robot
):
robot
.
display
.
fill
(
0
)
...
...
@@ -139,7 +140,8 @@ def main():
if
not
robot
.
esp
.
running
()
and
counter
%
20
==
0
:
reset
=
robot
.
esp
.
reset
(
100
)
if
reset
:
print
(
"
ESP BT name:
"
,
robot
.
esp
.
set_name
(
"
Open-Cube5
"
,
300
))
robot
.
esp
.
set_name
(
esp_name
,
100
)
print
(
"
ESP BT name:
"
,
esp_name
)
bat_voltage
=
robot
.
battery
.
voltage
()
# Get current battery voltage
button_values
=
robot
.
buttons
.
pressed
()
# Get buttons state
...
...
@@ -205,7 +207,7 @@ def main():
robotState
=
0
robot
.
esp
.
esp_running
=
False
print
(
"
Program finished
\n
"
)
robot
.
display
.
show
()
counter
+=
1
utime
.
sleep
(
0.05
)
...
...
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