From 83143dd70fb1b569b0a8643c67ee8da6a06c280b Mon Sep 17 00:00:00 2001 From: Yossi Neiman Date: Sat, 29 Jul 2017 10:06:38 +0300 Subject: [PATCH] #35 (#39) * fix route errors * Update load module for indicators * install neopixel for travis * fix init pin 23 [BLE] * pass build param to travis [indicators] * install icons on travis * recompile indicators with scons * compile on bin dir * refactor import paths for indicators * fix multiple compilation errors --- .travis.yml | 6 ++++-- classes/capture.py | 5 +++-- classes/forwardCollisionWarning.py | 2 +- classes/laneDepartureWarning.py | 2 +- daemons/bluetooth/initPin.py | 2 +- mainPi.py | 2 +- modules/indicators | 2 +- 7 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7803299..6170914 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ before_install: - sudo apt-get update install: - - sudo apt-get install python-dev python-numpy + - sudo apt-get install python-dev python-numpy scons - pip install pyserial before_script: @@ -16,7 +16,9 @@ before_script: - make -j4 - sudo make -j4 install - export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python2.7/site-packages:/home/travis/build/dride/Cardigan - + - cd /home/travis/build/dride/Cardigan/modules/indicators/bin + - scons + - sudo python /home/travis/build/dride/Cardigan/modules/indicators/setup.py build python: - "2.7" diff --git a/classes/capture.py b/classes/capture.py index c99d488..39d5f4a 100644 --- a/classes/capture.py +++ b/classes/capture.py @@ -1,11 +1,12 @@ import cv2 import numpy as np import time +from config import * from classes.gps import GPS -class capture(config): +class capture(): rolloverMinutes = 1 @@ -29,7 +30,7 @@ def __init__(self, w, h, config): # load config self.config = config - def captureFrame(self, frame, config): + def captureFrame(self, frame): # if the video should be flipped if self.config['flip'] == True: diff --git a/classes/forwardCollisionWarning.py b/classes/forwardCollisionWarning.py index ca3fd21..3247737 100644 --- a/classes/forwardCollisionWarning.py +++ b/classes/forwardCollisionWarning.py @@ -4,7 +4,7 @@ import math import time from config import * -from modules.indicators.states.indicators import Indicators +from modules.indicators.python.states.indicators import Indicators class forwardCollisionWarning(object): diff --git a/classes/laneDepartureWarning.py b/classes/laneDepartureWarning.py index 4c811c2..86416b6 100644 --- a/classes/laneDepartureWarning.py +++ b/classes/laneDepartureWarning.py @@ -5,7 +5,7 @@ from classes.sound import sound import time from config import * -from modules.indicators.states.indicators import Indicators +from modules.indicators.python.states.indicators import Indicators class laneDepartureWarning(object): diff --git a/daemons/bluetooth/initPin.py b/daemons/bluetooth/initPin.py index a8ba2a7..c016c62 100644 --- a/daemons/bluetooth/initPin.py +++ b/daemons/bluetooth/initPin.py @@ -2,5 +2,5 @@ GPIO.setmode(GPIO.BCM) -GPIO.setup(4, GPIO.IN, pull_up_down=GPIO.PUD_UP) +GPIO.setup(23, GPIO.IN, pull_up_down=GPIO.PUD_UP) diff --git a/mainPi.py b/mainPi.py index 60cb65a..4cebf58 100644 --- a/mainPi.py +++ b/mainPi.py @@ -8,7 +8,7 @@ from config import * from classes.sound import sound -from modules.indicators.states.indicators import Indicators +from modules.indicators.python.states.indicators import Indicators def run_program(): # initialize the camera and grab a reference to the raw camera capture diff --git a/modules/indicators b/modules/indicators index d14518e..8b2a3d9 160000 --- a/modules/indicators +++ b/modules/indicators @@ -1 +1 @@ -Subproject commit d14518e8ed19f468e8667b1bf17b995ab8000795 +Subproject commit 8b2a3d9026cc0f3d65ed178f2a9b6da5ce7c6038