mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-31 03:57:45 +08:00
[datalink] changed BluegigaRSSI to RSSI and added sensers to abi_senders_ids
This commit is contained in:
+1
-1
@@ -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"/>
|
||||||
|
|||||||
@@ -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 */
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user