|
Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "modules/decawave/pdec.h"#include "mcu_periph/uart.h"#include "modules/datalink/downlink.h"#include "modules/core/abi.h"#include "modules/core/abi_sender_ids.h"#include <stdio.h>#include <string.h>
Include dependency graph for pdec.c:Go to the source code of this file.
Data Structures | |
| struct | pdec_cmd_payload |
| struct | pdec_target_cmd_payload |
| struct | pdec_error_payload |
| struct | pdec_distance_payload |
| struct | pdec_device_list_payload |
| struct | pdec_send_data_result_payload |
| struct | pdec_ranging_event_payload |
| struct | pdec_tdoa_report_payload |
| struct | pdec_tdoa_report_event_payload |
Macros | |
| #define | PDEC_SYNC_BYTE 0xff |
| #define | PDEC_FRAME_OVERHEAD 4 |
| #define | PDEC_PACKED __attribute__((packed)) |
Functions | |
| static void | _pdec_init (pdec_t *pdec) |
| static void | _pdec_periodic_report (pdec_t *pdec) |
| static void | _pdec_event (pdec_t *pdec) |
| static bool | pdec_send_frame (pdec_t *pdec, const uint8_t *payload, uint8_t payload_len) |
| static void | pdec_parse_distance_result (struct pdec_distance_result *result, const struct pdec_distance_payload *payload) |
| static void | pdec_dispatch_frame (pdec_t *pdec) |
| static void | pdec_parse_byte (pdec_t *pdec, uint8_t byte) |
| bool | pdec_range (uint16_t dst_id) |
| bool | pdec_get_distance (uint16_t dst_id) |
| bool | pdec_list_devices (void) |
| bool | pdec_send_data (uint16_t dst_id, const uint8_t *data, uint8_t len) |
| void | pdec_init (void) |
| void | pdec_periodic_report (void) |
| void | pdec_event (void) |
| void | uwb_range (uint16_t dst_id) |
Variables | |
| pdec_t | pdec |
| struct pdec_cmd_payload | PDEC_PACKED |
| struct pdec_target_cmd_payload |
| struct pdec_error_payload |
| struct pdec_distance_payload |
| struct pdec_device_list_payload |
| struct pdec_send_data_result_payload |
| struct pdec_ranging_event_payload |
| struct pdec_tdoa_report_payload |
| struct pdec_tdoa_report_event_payload |
| struct pdec_tdoa_report_event_payload PDEC_PACKED __attribute__((packed)) |
Definition at line 361 of file pdec.c.
References pdec_t::dev, pdec, pdec_parse_byte(), uart_char_available(), and uart_getch().
Referenced by pdec_event().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 310 of file pdec.c.
References pdec_t::dev, foo, pdec, PDEC_RX_SYNC_1, and pdec_t::rx_state.
Referenced by pdec_init().
Here is the caller graph for this function:Definition at line 317 of file pdec.c.
References pdec_tdoa_report_event::count, DefaultChannel, DefaultDevice, pdec_t::devices, pdec_ranging_event::distance, pdec_tdoa_report::distance, pdec_ranging_event::dst_id, foo, pdec_t::last_distance, pdec_t::last_error, pdec_t::last_range, pdec_t::last_ranging_event, pdec_t::last_send_data, pdec_t::last_tdoa_report_event, offset, pdec, pdec_tdoa_report::reporter_id, pdec_tdoa_report_event::reports, pdec_ranging_event::src_id, pdec_error_response::updated, pdec_distance_result::updated, pdec_device_list::updated, pdec_send_data_result::updated, pdec_ranging_event::updated, and pdec_tdoa_report_event::updated.
Referenced by pdec_periodic_report().
Here is the caller graph for this function:Definition at line 120 of file pdec.c.
References pdec_tdoa_report_event::blink_id, pdec_error_response::command, pdec_device_list::count, pdec_tdoa_report_event::count, pdec_t::counters, pdec_device_list::device_ids, pdec_t::devices, pdec_ranging_event::distance, pdec_tdoa_report::distance, pdec_send_data_result::dst_id, pdec_ranging_event::dst_id, pdec_tdoa_report_event::expected_count, foo, get_sys_time_usec(), pdec_ranging_event::kind, pdec_t::last_distance, pdec_t::last_error, pdec_t::last_range, pdec_t::last_ranging_event, pdec_t::last_send_data, pdec_t::last_tdoa_report_event, msg, pdec, PDEC_MAX_DEVICES, PDEC_MAX_PAYLOAD_LEN, PDEC_MAX_TDOA_REPORTS, PDEC_MSG_DEVICE_LIST, PDEC_MSG_DISTANCE, PDEC_MSG_ERROR, PDEC_MSG_RANGE_RESULT, PDEC_MSG_RANGING_EVENT, PDEC_MSG_SEND_DATA_RESULT, PDEC_MSG_TDOA_REPORT_EVENT, pdec_parse_distance_result(), pdec_tdoa_report::reporter_id, pdec_tdoa_report_event::reports, pdec_counters::rx_frames, pdec_t::rx_len, pdec_counters::rx_length_errors, pdec_t::rx_payload, pdec_counters::rx_unknown_messages, pdec_send_data_result::sent_len, pdec_ranging_event::src_id, pdec_error_response::status, pdec_send_data_result::status, pdec_tdoa_report_event::timed_out, pdec_device_list::total_count, pdec_tdoa_report_event::total_count, pdec_device_list::truncated, pdec_tdoa_report_event::truncated, pdec_error_response::updated, pdec_device_list::updated, pdec_send_data_result::updated, pdec_ranging_event::updated, pdec_tdoa_report_event::updated, and UWB_PDEC_ID.
Referenced by pdec_parse_byte().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 427 of file pdec.c.
References _pdec_event(), and pdec.
Here is the call graph for this function:Definition at line 377 of file pdec.c.
References pdec_target_cmd_payload::dst_id, pdec_target_cmd_payload::id, pdec, PDEC_CMD_GET_DISTANCE, and pdec_send_frame().
Here is the call graph for this function:Definition at line 417 of file pdec.c.
References _pdec_init(), and pdec.
Here is the call graph for this function:Definition at line 386 of file pdec.c.
References pdec_cmd_payload::id, pdec, PDEC_CMD_LIST_DEVICES, and pdec_send_frame().
Here is the call graph for this function:Definition at line 263 of file pdec.c.
References byte, pdec_t::counters, pdec, pdec_dispatch_frame(), PDEC_RX_CHECKSUM, PDEC_RX_LEN, PDEC_RX_PAYLOAD, PDEC_RX_SYNC_1, PDEC_RX_SYNC_2, PDEC_SYNC_BYTE, pdec_t::rx_checksum, pdec_counters::rx_checksum_errors, pdec_t::rx_idx, pdec_t::rx_len, pdec_t::rx_payload, and pdec_t::rx_state.
Referenced by _pdec_event().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 111 of file pdec.c.
References pdec_distance_payload::distance, pdec_distance_result::distance, pdec_distance_payload::dst_id, pdec_distance_result::dst_id, pdec_distance_payload::status, pdec_distance_result::status, and pdec_distance_result::updated.
Referenced by pdec_dispatch_frame().
Here is the caller graph for this function:Definition at line 422 of file pdec.c.
References _pdec_periodic_report(), and pdec.
Here is the call graph for this function:Definition at line 368 of file pdec.c.
References pdec_target_cmd_payload::dst_id, pdec_target_cmd_payload::id, pdec, PDEC_CMD_RANGE, and pdec_send_frame().
Referenced by uwb_range().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 394 of file pdec.c.
References pdec_t::counters, pdec_target_cmd_payload::dst_id, foo, pdec_target_cmd_payload::id, pdec, PDEC_CMD_SEND_DATA, PDEC_MAX_DATA_LEN, pdec_send_frame(), and pdec_counters::tx_drops.
Here is the call graph for this function:Definition at line 85 of file pdec.c.
References checksum, pdec_t::counters, pdec_t::dev, fd, foo, frame, pdec, PDEC_FRAME_OVERHEAD, PDEC_MAX_PAYLOAD_LEN, PDEC_SYNC_BYTE, pdec_counters::tx_drops, pdec_counters::tx_frames, and uart_put_buffer().
Referenced by pdec_get_distance(), pdec_list_devices(), pdec_range(), and pdec_send_data().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 433 of file pdec.c.
References pdec_target_cmd_payload::dst_id, and pdec_range().
Here is the call graph for this function:| pdec_t pdec |
Definition at line 22 of file pdec.c.
Referenced by _pdec_event(), _pdec_init(), _pdec_periodic_report(), pdec_dispatch_frame(), pdec_event(), pdec_get_distance(), pdec_init(), pdec_list_devices(), pdec_parse_byte(), pdec_periodic_report(), pdec_range(), pdec_send_data(), and pdec_send_frame().
| struct pdec_tdoa_report_event_payload PDEC_PACKED |