MultirotorMixer: allow for longer mixer geometry names (16 instead of 8)

This commit is contained in:
Beat Küng 2020-01-13 10:58:09 +01:00 committed by David Sidrane
parent 73bd90ddd5
commit 8020e82c1c
1 changed files with 2 additions and 2 deletions

View File

@ -112,7 +112,7 @@ MultirotorMixer *
MultirotorMixer::from_text(Mixer::ControlCallback control_cb, uintptr_t cb_handle, const char *buf, unsigned &buflen)
{
MultirotorGeometry geometry = MultirotorGeometry::MAX_GEOMETRY;
char geomname[8];
char geomname[16];
int s[4];
int used;
@ -121,7 +121,7 @@ MultirotorMixer::from_text(Mixer::ControlCallback control_cb, uintptr_t cb_handl
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);
return nullptr;
}