|
@ -192,12 +192,16 @@ def moveFinished(lim=0): |
|
|
.Κώδικας raspberry |
|
|
.Κώδικας raspberry |
|
|
[source,python] |
|
|
[source,python] |
|
|
-- |
|
|
-- |
|
|
if (abs(m.frontDistance-prevNode.frontDistance)>25): |
|
|
def ignoreMetrics(): |
|
|
continue |
|
|
flag=False |
|
|
if (abs(m.leftDistance-prevNode.leftDistance)>25): |
|
|
if (abs(m.frontDistance-pos.oldFrontValue)>25): |
|
|
continue |
|
|
flag=True |
|
|
if (abs(m.rightDistance-prevNode.rightDistance)>25): |
|
|
if (abs(m.leftDistance-pos.oldLeftValue)>25): |
|
|
continue |
|
|
flag=True |
|
|
|
|
|
if (abs(m.rightDistance-pos.oldRightValue)>25): |
|
|
|
|
|
flag=True |
|
|
|
|
|
return flag |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- |
|
|
-- |
|
|
|
|
|
|
|
|