Manually integrated Jim's changes from integrate2_jim branch

Signed-off-by: Jim Wilson <jywilson99@hotmail.com>
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
Mark Charlebois
2016-02-19 16:59:46 +01:00
committed by Julian Oes
parent a1a615b907
commit caa94d58a6
14 changed files with 117 additions and 74 deletions
+3 -3
View File
@@ -107,8 +107,7 @@ load(const char *devname, const char *fname)
// sleep a while to ensure device has been set up
usleep(20000);
int dev;
char buf[2048];
int dev;
/* open the device */
if ((dev = px4_open(devname, 0)) < 0) {
@@ -122,12 +121,13 @@ load(const char *devname, const char *fname)
return 1;
}
char buf[2048];
if (load_mixer_file(fname, &buf[0], sizeof(buf)) < 0) {
warnx("can't load mixer: %s", fname);
return 1;
}
/* XXX pass the buffer to the device */
/* Pass the buffer to the device */
int ret = px4_ioctl(dev, MIXERIOCLOADBUF, (unsigned long)buf);
if (ret < 0) {