mirror of
https://github.com/kevinveenbirkenbach/erinaco.git
synced 2024-11-23 14:31:04 +01:00
Zwischencommit
This commit is contained in:
parent
7096c758a8
commit
473ec178a6
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
__pycache__/autopilot.cpython-36.pyc
|
||||||
|
__pycache__/vero.cpython-36.pyc
|
||||||
|
sensoren/__pycache__/
|
@ -62,8 +62,8 @@ class Autopilot(CORE,THREAD):
|
|||||||
def testForward(self):
|
def testForward(self):
|
||||||
ultraschallMitte=self.ultraschallMitte.getValue();
|
ultraschallMitte=self.ultraschallMitte.getValue();
|
||||||
if(ultraschallMitte<=self.ultraschalminimum
|
if(ultraschallMitte<=self.ultraschalminimum
|
||||||
or self.ultraschallRechts.getValue()<=self.ultraschalminimum
|
#or self.ultraschallRechts.getValue()<=self.ultraschalminimum
|
||||||
or self.ultraschallLinks.getValue()<=self.ultraschalminimum
|
#or self.ultraschallLinks.getValue()<=self.ultraschalminimum
|
||||||
or self.infarotMitteLinks.getValue()
|
or self.infarotMitteLinks.getValue()
|
||||||
or self.infarotMitteRechts.getValue()):
|
or self.infarotMitteRechts.getValue()):
|
||||||
self.stop();
|
self.stop();
|
||||||
|
@ -20,11 +20,16 @@ def help():
|
|||||||
print("Halbautomatisch: w")
|
print("Halbautomatisch: w")
|
||||||
print("Manuell: e")
|
print("Manuell: e")
|
||||||
def autopilot():
|
def autopilot():
|
||||||
|
try:
|
||||||
core=AUTOPILOT()
|
core=AUTOPILOT()
|
||||||
#core.start();
|
#core.start();
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
|
core.printValues();
|
||||||
|
if core.moveStatus!=1:
|
||||||
core.forward();
|
core.forward();
|
||||||
|
else:
|
||||||
|
core.statusTest();
|
||||||
except ForwardMoveException:
|
except ForwardMoveException:
|
||||||
if randint(0,1):
|
if randint(0,1):
|
||||||
core.backward();
|
core.backward();
|
||||||
@ -37,7 +42,10 @@ def autopilot():
|
|||||||
core.turnLeft();
|
core.turnLeft();
|
||||||
except RightMoveException:
|
except RightMoveException:
|
||||||
core.turnRight();
|
core.turnRight();
|
||||||
sleep(0.5);
|
sleep(1);
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
print("Verlasse Autopilot...")
|
||||||
|
#core=CORE();
|
||||||
def doIt(order):
|
def doIt(order):
|
||||||
switcher = {
|
switcher = {
|
||||||
'w': lambda: core.forward(),
|
'w': lambda: core.forward(),
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#Streamt ein Video auf Vaio
|
#Streamt ein Video auf Vaio
|
||||||
/opt/vc/bin/raspivid --hflip --vflip -t 0 -o - | nc 192.168.178.30 5001
|
#/opt/vc/bin/raspivid --hflip --vflip -t 0 -o - | nc 192.168.178.30 5001
|
||||||
#Auf Vaio muss
|
#Auf Vaio muss
|
||||||
# nc -l -p 5001 | mplayer -fps 31 -cache 1024 -
|
# nc -l -p 5001 | mplayer -fps 31 -cache 1024 -
|
||||||
# ausgefuehert werden
|
# ausgefuehert werden
|
||||||
|
/opt/vc/bin/raspivid -w 640 -h 480 --hflip --vflip -t 0 -o - | nc 192.168.178.30 5001
|
||||||
|
Loading…
Reference in New Issue
Block a user