mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-11-29 07:24:13 +01:00
Added tracking of dropped packets to PipX and turned off visible text on signal strength meters.
This commit is contained in:
parent
3721504458
commit
4e68f6543e
@ -83,6 +83,7 @@ typedef struct {
|
||||
uint16_t retries;
|
||||
uint16_t errors;
|
||||
uint16_t uavtalk_errors;
|
||||
uint16_t dropped;
|
||||
uint16_t resets;
|
||||
uint8_t ecc[RS_ECC_NPARITY];
|
||||
} PHStatusPacket, *PHStatusPacketHandle;
|
||||
|
@ -73,6 +73,7 @@ typedef struct {
|
||||
uint16_t errors;
|
||||
uint16_t uavtalk_errors;
|
||||
uint16_t resets;
|
||||
uint16_t dropped;
|
||||
int8_t rssi;
|
||||
uint8_t lastContact;
|
||||
} PairStats;
|
||||
@ -104,6 +105,7 @@ typedef struct {
|
||||
uint32_t radioRxErrors;
|
||||
uint32_t UAVTalkErrors;
|
||||
uint32_t packetErrors;
|
||||
uint32_t droppedPackets;
|
||||
uint16_t txBytes;
|
||||
uint16_t rxBytes;
|
||||
|
||||
@ -245,6 +247,7 @@ static int32_t RadioComBridgeInitialize(void)
|
||||
data->pairStats[i].errors = 0;
|
||||
data->pairStats[i].uavtalk_errors = 0;
|
||||
data->pairStats[i].resets = 0;
|
||||
data->pairStats[i].dropped = 0;
|
||||
data->pairStats[i].lastContact = 0;
|
||||
}
|
||||
// The first slot is reserved for our current pairID
|
||||
@ -313,7 +316,7 @@ static void comUAVTalkTask(void *parameters)
|
||||
// No packets available?
|
||||
if (p == NULL)
|
||||
{
|
||||
DEBUG_PRINTF(2, "Packet dropped!\n\r");
|
||||
data->droppedPackets++;
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -625,6 +628,7 @@ static void transparentCommTask(void * parameters)
|
||||
// No packets available?
|
||||
if (p == NULL)
|
||||
{
|
||||
data->droppedPackets++;
|
||||
// Wait a bit for a packet to come available.
|
||||
vTaskDelay(5);
|
||||
continue;
|
||||
@ -702,6 +706,7 @@ static void radioStatusTask(void *parameters)
|
||||
pipxStatus.Retries = data->comTxRetries;
|
||||
pipxStatus.Errors = data->packetErrors;
|
||||
pipxStatus.UAVTalkErrors = data->UAVTalkErrors;
|
||||
pipxStatus.Dropped = data->droppedPackets;
|
||||
pipxStatus.Resets = PIOS_RFM22B_Resets(pios_rfm22b_id);
|
||||
pipxStatus.TXRate = (uint16_t)((float)(data->txBytes * 1000) / STATS_UPDATE_PERIOD_MS);
|
||||
data->txBytes = 0;
|
||||
@ -721,6 +726,7 @@ static void radioStatusTask(void *parameters)
|
||||
pipxStatus.Retries += data->pairStats[i].retries;
|
||||
pipxStatus.Errors += data->pairStats[i].errors;
|
||||
pipxStatus.UAVTalkErrors += data->pairStats[i].uavtalk_errors;
|
||||
pipxStatus.Dropped += data->pairStats[i].dropped;
|
||||
pipxStatus.Resets += data->pairStats[i].resets;
|
||||
pipxStatus.LinkState = PIPXSTATUS_LINKSTATE_CONNECTED;
|
||||
}
|
||||
|
@ -76,6 +76,7 @@ ConfigPipXtremeWidget::ConfigPipXtremeWidget(QWidget *parent) : ConfigTaskWidget
|
||||
addUAVObjectToWidgetRelation("PipXStatus", "Errors", m_pipx->Errors);
|
||||
addUAVObjectToWidgetRelation("PipXStatus", "UAVTalkErrors", m_pipx->UAVTalkErrors);
|
||||
addUAVObjectToWidgetRelation("PipXStatus", "Resets", m_pipx->Resets);
|
||||
addUAVObjectToWidgetRelation("PipXStatus", "Dropped", m_pipx->Dropped);
|
||||
addUAVObjectToWidgetRelation("PipXStatus", "RXRate", m_pipx->RXRate);
|
||||
addUAVObjectToWidgetRelation("PipXStatus", "TXRate", m_pipx->TXRate);
|
||||
|
||||
|
@ -156,7 +156,7 @@
|
||||
<number>-127</number>
|
||||
</property>
|
||||
<property name="textVisible">
|
||||
<bool>true</bool>
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="format">
|
||||
<string>%v dBm</string>
|
||||
@ -185,7 +185,7 @@
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="textVisible">
|
||||
<bool>true</bool>
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="format">
|
||||
<string>%v dBm</string>
|
||||
@ -214,7 +214,7 @@
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="textVisible">
|
||||
<bool>true</bool>
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="format">
|
||||
<string>%v dBm</string>
|
||||
@ -243,7 +243,7 @@
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="textVisible">
|
||||
<bool>true</bool>
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="format">
|
||||
<string>%v dBm</string>
|
||||
@ -631,7 +631,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0">
|
||||
<widget class="QLabel" name="label_18">
|
||||
<widget class="QLabel" name="RetriesLabel">
|
||||
<property name="text">
|
||||
<string>Retries</string>
|
||||
</property>
|
||||
@ -775,9 +775,9 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="13" column="0">
|
||||
<widget class="QLabel" name="TXRateLabel">
|
||||
<widget class="QLabel" name="DroppedLabel">
|
||||
<property name="text">
|
||||
<string>TX Rate (B/s)</string>
|
||||
<string>Dropped</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
@ -785,7 +785,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="13" column="1">
|
||||
<widget class="QLineEdit" name="TXRate">
|
||||
<widget class="QLineEdit" name="Dropped">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
@ -811,6 +811,42 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="14" column="0">
|
||||
<widget class="QLabel" name="TXRateLabel">
|
||||
<property name="text">
|
||||
<string>TX Rate (B/s)</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="14" column="1">
|
||||
<widget class="QLineEdit" name="TXRate">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLineEdit {
|
||||
border: none;
|
||||
border-radius: 1px;
|
||||
padding: 0 8px;
|
||||
background: rgba(0, 0, 0, 16);
|
||||
/* background: transparent; */
|
||||
/* selection-background-color: darkgray;*/
|
||||
}</string>
|
||||
</property>
|
||||
<property name="frame">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="15" column="0">
|
||||
<widget class="QLabel" name="RXRateLabel">
|
||||
<property name="text">
|
||||
<string>RX Rate (B/s)</string>
|
||||
@ -820,7 +856,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="14" column="1">
|
||||
<item row="15" column="1">
|
||||
<widget class="QLineEdit" name="RXRate">
|
||||
<property name="font">
|
||||
<font>
|
||||
|
@ -14,6 +14,7 @@
|
||||
<field name="Retries" units="" type="uint16" elements="1" defaultvalue="0"/>
|
||||
<field name="Errors" units="" type="uint16" elements="1" defaultvalue="0"/>
|
||||
<field name="UAVTalkErrors" units="" type="uint16" elements="1" defaultvalue="0"/>
|
||||
<field name="Dropped" units="" type="uint16" elements="1" defaultvalue="0"/>
|
||||
<field name="Resets" units="" type="uint16" elements="1" defaultvalue="0"/>
|
||||
<field name="TXRate" units="Bps" type="uint16" elements="1" defaultvalue="0"/>
|
||||
<field name="RXRate" units="Bps" type="uint16" elements="1" defaultvalue="0"/>
|
||||
|
Loading…
Reference in New Issue
Block a user