Merge pull request #9 from jfrey-xx/hotfix-sample_rate

Fix sample_rate integration.
Esse commit está contido em:
Rodrigo Ceballos
2015-02-26 12:24:20 -05:00
2 arquivos alterados com 13 adições e 8 exclusões
+10 -6
Ver Arquivo
@@ -36,15 +36,19 @@ def count(sample):
# update counters
global nb_samples_out
nb_samples_out = nb_samples_out + 1
if __name__ == '__main__':
# init board
port = '/dev/tty.usbserial-DN0095RE'
baud = 115200
# Instanciate "monitor" thread
def init():
monit = Monitor()
laspe = 60;
# daemonize thread to terminate it altogether with the main when time will come
monit.daemon = True
monit.start()
if __name__ == '__main__':
# init board
port = '/dev/ttyUSB0'
baud = 115200
lapse = 60;
init()
board = bci.OpenBCIBoard(port=port, baud=baud, filter_data=False)
board.start_streaming(count, lapse)
+3 -2
Ver Arquivo
@@ -72,8 +72,9 @@ if __name__ == '__main__':
fun = csv_collect.csv_collect()
elif("rate" in s):
print("/start will run csv_collect")
fun = csv_collect.csv_collect()
print("/start will run test_sample_rate")
rate.init()
fun = rate.count
elif s:
for c in s: