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:
commit
58f16f539a
@ -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">
|
||||
|
@ -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())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user