Resolve issue with AZ EL command

Signed-off-by: zisi <agzisim@gmail.com>
master
zisi 2018-10-08 15:58:38 +03:00
parent 8fe5a5fee4
commit f414d91536
1 changed files with 8 additions and 0 deletions

View File

@ -79,6 +79,14 @@ public:
if (isNumber(data)) {
control_az.setpoint = atof(data);
}
// Get the absolute position in deg for elevation
rawData = strtok_r(Data, " ", &Data);
if (rawData[0] == 'E' && rawData[1] == 'L') {
strncpy(data, rawData + 2, 10);
if (isNumber(data)) {
control_el.setpoint = atof(data);
}
}
}
} else if (buffer[0] == 'E' && buffer[1] == 'L') {
// Get the absolute position in deg for elevation