mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-15 07:03:34 +08:00
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:
committed by
Julian Oes
parent
a1a615b907
commit
caa94d58a6
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user