mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-05-31 14:22:26 -04:00
Add support for parsing GS-232 response sent by SPID MD-02
This commit is contained in:
parent
7b5e033c04
commit
b5d293f6e7
@ -197,7 +197,8 @@ void GS232ControllerWorker::readSerialData()
|
|||||||
if (len != -1)
|
if (len != -1)
|
||||||
{
|
{
|
||||||
QString response = QString::fromUtf8(buf, len);
|
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);
|
QRegularExpressionMatch match = re.match(response);
|
||||||
if (match.hasMatch())
|
if (match.hasMatch())
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user