1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-09-28 15:56:33 -04:00

Add support for parsing GS-232 response sent by SPID MD-02

This commit is contained in:
Jon Beniston 2021-05-16 09:28:06 +01:00
parent 7b5e033c04
commit b5d293f6e7

View File

@ -197,7 +197,8 @@ void GS232ControllerWorker::readSerialData()
if (len != -1)
{
QString response = QString::fromUtf8(buf, len);
QRegularExpression re("AZ=(\\d\\d\\d) *EL=(\\d\\d\\d)");
// MD-02 can return AZ=-00 EL=-00 and other negative angles
QRegularExpression re("AZ=([-\\d]\\d\\d) *EL=([-\\d]\\d\\d)");
QRegularExpressionMatch match = re.match(response);
if (match.hasMatch())
{