Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Martin Karlsson
turtlerob1
Commits
70c31d32
Commit
70c31d32
authored
Sep 24, 2015
by
Fredrik Bagge Carlsson
Browse files
Merge branch 'master' of gitlab.control.lth.se:letter2martin/turtlerob1
parents
f16b55b4
b84ad1c2
Changes
2
Show whitespace changes
Inline
Side-by-side
get_audio.m
View file @
70c31d32
...
...
@@ -2,7 +2,6 @@ function signal = get_audio()
global
bass
;
persistent
lastLastIndex
;
persistent
lastIndex
;
persistent
fs
;
...
...
@@ -32,6 +31,10 @@ tempRight = tempRight(max(end-diffIndex+1,1):end);
lastLastIndex
=
lastIndex
;
signal = [tempLeft; tempRight];
signal
=
[
tempLeft
,
tempRight
];
%bass.Stop();
end
\ No newline at end of file
get_audio_loop.m
View file @
70c31d32
addpath(genpath('~/openrobots/lib/matlab/'));
client = genomix.client('turtlebot1-wifi:8080');
bass = client.load('bass');
figure;
...
...
@@ -10,7 +7,7 @@ allAudioRight = [];
lastLastIndex = 0;
lastIndex = 0;
count = 0;
while count
<
5
0
while count
<
5
p =
bass.Audio();
if
count =
=
0
fs =
p.Audio.sampleRate;
...
...
@@ -34,3 +31,7 @@ while count < 50
drawnow
end
bass.Stop
()
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment