mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-31 02:16:53 +08:00
MultirotorMixer: allow for longer mixer geometry names (16 instead of 8)
This commit is contained in:
@@ -112,7 +112,7 @@ MultirotorMixer *
|
|||||||
MultirotorMixer::from_text(Mixer::ControlCallback control_cb, uintptr_t cb_handle, const char *buf, unsigned &buflen)
|
MultirotorMixer::from_text(Mixer::ControlCallback control_cb, uintptr_t cb_handle, const char *buf, unsigned &buflen)
|
||||||
{
|
{
|
||||||
MultirotorGeometry geometry = MultirotorGeometry::MAX_GEOMETRY;
|
MultirotorGeometry geometry = MultirotorGeometry::MAX_GEOMETRY;
|
||||||
char geomname[8];
|
char geomname[16];
|
||||||
int s[4];
|
int s[4];
|
||||||
int used;
|
int used;
|
||||||
|
|
||||||
@@ -121,7 +121,7 @@ MultirotorMixer::from_text(Mixer::ControlCallback control_cb, uintptr_t cb_handl
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sscanf(buf, "R: %7s %d %d %d %d%n", geomname, &s[0], &s[1], &s[2], &s[3], &used) != 5) {
|
if (sscanf(buf, "R: %15s %d %d %d %d%n", geomname, &s[0], &s[1], &s[2], &s[3], &used) != 5) {
|
||||||
debug("multirotor parse failed on '%s'", buf);
|
debug("multirotor parse failed on '%s'", buf);
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user