Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
turtlerob1
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martin Karlsson
turtlerob1
Commits
a0bfb4ee
Commit
a0bfb4ee
authored
9 years ago
by
Martin Karlsson
Browse files
Options
Downloads
Patches
Plain Diff
tja laget!
parent
60456c31
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
get_audio.m
+5
-2
5 additions, 2 deletions
get_audio.m
get_audio_loop.m
+5
-4
5 additions, 4 deletions
get_audio_loop.m
with
10 additions
and
6 deletions
get_audio.m
+
5
−
2
View file @
a0bfb4ee
...
...
@@ -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
This diff is collapsed.
Click to expand it.
get_audio_loop.m
+
5
−
4
View file @
a0bfb4ee
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
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment