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
de338cb3
Commit
de338cb3
authored
4 months ago
by
Václav Jelínek
Browse files
Options
Downloads
Patches
Plain Diff
Correct ev3 color raw rgb values show and change display spacing
parent
b35b889f
No related branches found
No related tags found
No related merge requests found
Pipeline
#109839
passed
4 months ago
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/robot_consts.py
+1
-1
1 addition, 1 deletion
lib/robot_consts.py
menu_programs/ev3_color.py
+12
-13
12 additions, 13 deletions
menu_programs/ev3_color.py
with
13 additions
and
14 deletions
lib/robot_consts.py
+
1
−
1
View file @
de338cb3
...
...
@@ -88,4 +88,4 @@ I2C_MULTICUBE_FREQ = const(100000)
ESP_BAUDRATE
=
const
(
115200
)
# bps
ESP32_COMMAND_PIN
=
const
(
8
)
FW_VERSION
=
"
5.11.2024
"
# Firmware version
\ No newline at end of file
FW_VERSION
=
"
6.11.2024
"
# Firmware version
\ No newline at end of file
This diff is collapsed.
Click to expand it.
menu_programs/ev3_color.py
+
12
−
13
View file @
de338cb3
...
...
@@ -38,31 +38,30 @@ def ev3_color_run(robot, chosen_sensor_port):
while
True
:
robot
.
display
.
fill
(
0
)
robot
.
display
.
centered_text
(
f
"
EV3 Color S
{
chosen_sensor_port
+
1
}
"
,
0
,
1
)
robot
.
display
.
text
(
mode_str
[
mode
],
0
,
8
,
1
)
robot
.
display
.
text
(
mode_str
[
mode
],
0
,
16
,
1
)
try
:
if
mode
==
0
:
ref
=
robot
.
sensors
.
light
[
chosen_sensor_port
].
reflection
()
robot
.
display
.
text
(
"
R: {}
"
.
format
(
ref
),
0
,
1
6
,
1
)
robot
.
display
.
text
(
"
R: {}
"
.
format
(
ref
),
0
,
2
6
,
1
)
if
mode
==
1
:
ambient
=
robot
.
sensors
.
light
[
chosen_sensor_port
].
ambient
()
robot
.
display
.
text
(
"
A: {}
"
.
format
(
ambient
),
0
,
1
6
,
1
)
robot
.
display
.
text
(
"
A: {}
"
.
format
(
ambient
),
0
,
2
6
,
1
)
if
mode
==
2
:
color
=
robot
.
sensors
.
light
[
chosen_sensor_port
].
color
()
robot
.
display
.
text
(
"
C: {}
"
.
format
(
color
),
0
,
1
6
,
1
)
robot
.
display
.
text
(
"
C: {}
"
.
format
(
color
),
0
,
2
6
,
1
)
if
mode
==
3
:
r
,
g
,
b
=
robot
.
sensors
.
light
[
chosen_sensor_port
].
rgb
()
robot
.
display
.
text
(
"
R: {}
"
.
format
(
r
),
0
,
1
6
,
1
)
robot
.
display
.
text
(
"
G: {}
"
.
format
(
g
),
0
,
2
6
,
1
)
robot
.
display
.
text
(
"
B: {}
"
.
format
(
b
),
0
,
3
6
,
1
)
robot
.
display
.
text
(
"
R: {}
"
.
format
(
r
),
0
,
2
6
,
1
)
robot
.
display
.
text
(
"
G: {}
"
.
format
(
g
),
0
,
3
6
,
1
)
robot
.
display
.
text
(
"
B: {}
"
.
format
(
b
),
0
,
4
6
,
1
)
if
mode
==
4
:
r
,
g
,
b
,
off
=
robot
.
sensors
.
light
[
chosen_sensor_port
].
rgb_raw
()
robot
.
display
.
text
(
"
R: {}
"
.
format
(
r
),
0
,
16
,
1
)
robot
.
display
.
text
(
"
G: {}
"
.
format
(
g
),
0
,
26
,
1
)
robot
.
display
.
text
(
"
B: {}
"
.
format
(
b
),
0
,
36
,
1
)
robot
.
display
.
text
(
"
Off: {}
"
.
format
(
off
),
0
,
46
,
1
)
r
,
g
,
b
=
robot
.
sensors
.
light
[
chosen_sensor_port
].
rgb_raw
()
robot
.
display
.
text
(
"
R: {}
"
.
format
(
r
),
0
,
26
,
1
)
robot
.
display
.
text
(
"
G: {}
"
.
format
(
g
),
0
,
36
,
1
)
robot
.
display
.
text
(
"
B: {}
"
.
format
(
b
),
0
,
46
,
1
)
if
mode
==
5
:
ref
=
robot
.
sensors
.
light
[
chosen_sensor_port
].
reflection_raw
()
robot
.
display
.
text
(
"
R: {}
"
.
format
(
ref
),
0
,
1
6
,
1
)
robot
.
display
.
text
(
"
R: {}
"
.
format
(
ref
),
0
,
2
6
,
1
)
except
Exception
as
e
:
print
(
e
)
print
(
f
"
EV3 Color S
{
chosen_sensor_port
+
1
}
sensor not connected
"
)
...
...
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