[datalink] changed BluegigaRSSI to RSSI and added sensers to abi_senders_ids

This commit is contained in:
kirkscheper
2016-01-07 16:41:24 +01:00
parent 2b7e585ebd
commit b7a1c30870
3 changed files with 9 additions and 4 deletions
+1 -1
View File
@@ -73,7 +73,7 @@
<field name="noise" type="float"/> <field name="noise" type="float"/>
</message> </message>
<message name="BLUEGIGA_RSSI" id="13"> <message name="RSSI" id="13">
<field name="ac_id" type="uint8_t"/> <field name="ac_id" type="uint8_t"/>
<field name="source_strength" type="int8_t" unit="dB"/> <field name="source_strength" type="int8_t" unit="dB"/>
<field name="rssi" type="int8_t" unit="dB"/> <field name="rssi" type="int8_t" unit="dB"/>
+7
View File
@@ -230,5 +230,12 @@
#define PX4FLOW_VELOCITY_ID 17 #define PX4FLOW_VELOCITY_ID 17
#endif #endif
/*
* IDs of RSSI measurements (message 13)
*/
#ifndef RSSI_BLUEGIGA_ID
#define RSSI_BLUEGIGA_ID 1
#endif
#endif /* ABI_SENDER_IDS_H */ #endif /* ABI_SENDER_IDS_H */
+1 -3
View File
@@ -36,8 +36,6 @@
#include "subsystems/abi.h" #include "subsystems/abi.h"
#define SENDER_ID 1
// for memset // for memset
#include <string.h> #include <string.h>
@@ -295,7 +293,7 @@ void bluegiga_receive(struct spi_transaction *trans)
uint8_t ac_id = SenderIdOfMsg(trans->input_buf); uint8_t ac_id = SenderIdOfMsg(trans->input_buf);
if (Pprz_StxOfMsg(trans->input_buf) == STX) { if (Pprz_StxOfMsg(trans->input_buf) == STX) {
AbiSendMsgBLUEGIGA_RSSI(SENDER_ID, ac_id, tx_strength, rssi); AbiSendMsgRSSI(RSSI_BLUEGIGA_ID, ac_id, tx_strength, rssi);
} }
read_offset = 3; read_offset = 3;