Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Add_On_AI
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
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
frank_peschke
Add_On_AI
Commits
19427556
Commit
19427556
authored
1 year ago
by
ft-Demo
Browse files
Options
Downloads
Patches
Plain Diff
commit by robo pro coding
parent
e896fc6b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/sorting_line.blockly
+4
-4
4 additions, 4 deletions
lib/sorting_line.blockly
lib/sorting_line.py
+6
-6
6 additions, 6 deletions
lib/sorting_line.py
with
10 additions
and
10 deletions
lib/sorting_line.blockly
+
4
−
4
View file @
19427556
...
...
@@ -2,7 +2,7 @@
<variables>
<variable id="D/@C/pn3UWR*ove]Ratv">MovementSpeedCam</variable>
<variable id="_d{~w$eD*:d:}xT$1Gn^">MovementSpeed</variable>
<variable id="/db2fQd[hIAr-1e!io^w">pos
RED
</variable>
<variable id="/db2fQd[hIAr-1e!io^w">pos
WHITE
</variable>
<variable id="^,?-W]!AsYuzZaDpNUJU">posBLUE</variable>
<variable id="~zf4X^moIV*bO;vB1?v~">posCam</variable>
<variable id="g~jG[V3kw5h_x7[FLMb;">i</variable>
...
...
@@ -36,10 +36,10 @@
</value>
<next>
<block type="variables_set" id="~rh]]AuT=9J(e=UlQOp3">
<field name="VAR" id="/db2fQd[hIAr-1e!io^w">pos
RED
</field>
<field name="VAR" id="/db2fQd[hIAr-1e!io^w">pos
WHITE
</field>
<value name="VALUE">
<block type="math_number" id="}|UvxR7c.hXzI*Zk-1t_">
<field name="NUM">1
3
</field>
<field name="NUM">1
1
</field>
</block>
</value>
<next>
...
...
@@ -306,7 +306,7 @@
<field name="NUM">100</field>
</shadow>
<block type="variables_get" id="4`tUx4]j~U;d_w0sQ%v+">
<field name="VAR" id="/db2fQd[hIAr-1e!io^w">pos
RED
</field>
<field name="VAR" id="/db2fQd[hIAr-1e!io^w">pos
WHITE
</field>
</block>
</value>
<next>
...
...
This diff is collapsed.
Click to expand it.
lib/sorting_line.py
+
6
−
6
View file @
19427556
...
...
@@ -5,7 +5,7 @@ from lib.machine_learning import *
MovementSpeedCam
=
None
MovementSpeed
=
None
pos
RED
=
None
pos
WHITE
=
None
posBLUE
=
None
posCam
=
None
i
=
None
...
...
@@ -14,11 +14,11 @@ num = None
def
thread_SLD
():
global
MovementSpeedCam
,
MovementSpeed
,
pos
RED
,
posBLUE
,
posCam
,
i
,
posFinish
,
num
global
MovementSpeedCam
,
MovementSpeed
,
pos
WHITE
,
posBLUE
,
posCam
,
i
,
posFinish
,
num
print
(
'
starting thread SLD
'
)
MovementSpeedCam
=
300
MovementSpeed
=
512
pos
RED
=
1
3
pos
WHITE
=
1
1
posBLUE
=
27
posCam
=
42
posFinish
=
300
...
...
@@ -28,7 +28,7 @@ def thread_SLD():
def
moveRefM2
():
global
MovementSpeedCam
,
MovementSpeed
,
pos
RED
,
posBLUE
,
posCam
,
i
,
posFinish
,
num
global
MovementSpeedCam
,
MovementSpeed
,
pos
WHITE
,
posBLUE
,
posCam
,
i
,
posFinish
,
num
TXT_SLD_M_M2_encodermotor
.
set_speed
(
int
(
200
),
Motor
.
CW
)
TXT_SLD_M_M2_encodermotor
.
start
()
while
True
:
...
...
@@ -39,7 +39,7 @@ def moveRefM2():
def
mainSLDexternal
():
global
MovementSpeedCam
,
MovementSpeed
,
pos
RED
,
posBLUE
,
posCam
,
i
,
posFinish
,
num
global
MovementSpeedCam
,
MovementSpeed
,
pos
WHITE
,
posBLUE
,
posCam
,
i
,
posFinish
,
num
if
TXT_SLD_M_I1_photo_transistor
.
is_dark
():
moveRefM2
()
reset_inteface
()
...
...
@@ -61,7 +61,7 @@ def mainSLDexternal():
num
=
MakePictureRunKiReturnFoundPart
()
if
num
==
1
:
TXT_SLD_M_M2_encodermotor
.
set_speed
(
int
(
300
),
Motor
.
CCW
)
TXT_SLD_M_M2_encodermotor
.
set_distance
(
int
(
pos
RED
))
TXT_SLD_M_M2_encodermotor
.
set_distance
(
int
(
pos
WHITE
))
while
True
:
if
(
not
TXT_SLD_M_M2_encodermotor
.
is_running
()):
break
...
...
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