1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-22 08:04:49 -05:00

Merge pull request #901 from srcejon/gs232_md02_support

Add support for SPID MD-02 to GS-232 controller
This commit is contained in:
Edouard Griffiths 2021-05-16 12:15:16 +02:00 committed by GitHub
commit 58f16f539a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 1 deletions

View File

@ -339,6 +339,16 @@
<string>115200</string>
</property>
</item>
<item>
<property name="text">
<string>230400</string>
</property>
</item>
<item>
<property name="text">
<string>460800</string>
</property>
</item>
</widget>
</item>
<item row="2" column="3">

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())
{