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
ed5361bc
Commit
ed5361bc
authored
1 week ago
by
Václav Jelínek
Browse files
Options
Downloads
Patches
Plain Diff
Correct I2C trigger all time computing
parent
c6400205
No related branches found
No related tags found
No related merge requests found
Pipeline
#124755
canceled
1 week ago
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/cube/i2c_master.py
+1
-1
1 addition, 1 deletion
lib/cube/i2c_master.py
menu_programs/i2c_master.py
+1
-1
1 addition, 1 deletion
menu_programs/i2c_master.py
with
2 additions
and
2 deletions
lib/cube/i2c_master.py
+
1
−
1
View file @
ed5361bc
...
...
@@ -60,7 +60,7 @@ class I2C_master:
time_start
=
time
.
ticks_us
()
if
not
addresses
:
addresses
=
self
.
i2c
.
scan
()
time_scan
=
time_
start
-
time
.
ticks_us
()
time_scan
=
time_
us
-
time
.
ticks_diff
(
time
.
ticks_us
()
,
time_start
)
time_reserve
=
time_scan
-
len
(
addresses
)
*
I2C_TIME_TRIGGER_WRITE_TIME
if
time_reserve
<
0
:
return
False
...
...
This diff is collapsed.
Click to expand it.
menu_programs/i2c_master.py
+
1
−
1
View file @
ed5361bc
...
...
@@ -80,7 +80,7 @@ def i2c_master_run(robot):
data_sending
=
data_sending
%
26
debounce
=
True
if
buttons
[
Button
.
OK
]:
trigger
=
robot
.
i2c_master
.
trigger_all
(
SLAVE_TRIGGER_TIME
,
adresse
d
=
all_add
,
callback
=
master_trigger_callback
)
trigger
=
robot
.
i2c_master
.
trigger_all
(
SLAVE_TRIGGER_TIME
,
ad
d
resse
s
=
all_add
,
callback
=
master_trigger_callback
)
if
not
trigger
:
break
debounce
=
True
...
...
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