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):
|
||||
ultraschallMitte=self.ultraschallMitte.getValue();
|
||||
if(ultraschallMitte<=self.ultraschalminimum
|
||||
or self.ultraschallRechts.getValue()<=self.ultraschalminimum
|
||||
or self.ultraschallLinks.getValue()<=self.ultraschalminimum
|
||||
#or self.ultraschallRechts.getValue()<=self.ultraschalminimum
|
||||
#or self.ultraschallLinks.getValue()<=self.ultraschalminimum
|
||||
or self.infarotMitteLinks.getValue()
|
||||
or self.infarotMitteRechts.getValue()):
|
||||
self.stop();
|
||||
|
@ -20,11 +20,16 @@ def help():
|
||||
print("Halbautomatisch: w")
|
||||
print("Manuell: e")
|
||||
def autopilot():
|
||||
try:
|
||||
core=AUTOPILOT()
|
||||
#core.start();
|
||||
while True:
|
||||
try:
|
||||
core.printValues();
|
||||
if core.moveStatus!=1:
|
||||
core.forward();
|
||||
else:
|
||||
core.statusTest();
|
||||
except ForwardMoveException:
|
||||
if randint(0,1):
|
||||
core.backward();
|
||||
@ -37,7 +42,10 @@ def autopilot():
|
||||
core.turnLeft();
|
||||
except RightMoveException:
|
||||
core.turnRight();
|
||||
sleep(0.5);
|
||||
sleep(1);
|
||||
except KeyboardInterrupt:
|
||||
print("Verlasse Autopilot...")
|
||||
#core=CORE();
|
||||
def doIt(order):
|
||||
switcher = {
|
||||
'w': lambda: core.forward(),
|
||||
|
@ -1,6 +1,7 @@
|
||||
#!/bin/bash
|
||||
#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
|
||||
# nc -l -p 5001 | mplayer -fps 31 -cache 1024 -
|
||||
# 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