|
#include <stdbool.h>
#include <stddef.h>
#include <stdio.h>
#include <string.h>
#include "acc_control_helper.h"
#include "acc_hal_integration_a121.h"
#include "acc_integration.h"
#include "acc_rss_a121.h"
Go to the source code of this file.
Macros | |
#define | SENSOR_CALIBRATION_TIMEOUT_MS 500 |
#define | SENSOR_MEASURE_TIMEOUT_MS 1000 |
Functions | |
static bool | acc_control_helper_calibrate (acc_control_helper_t *radar) |
bool | acc_control_helper_create (acc_control_helper_t *radar, acc_sensor_id_t sensor_id) |
Create a helper instance. More... | |
void | acc_control_helper_destroy (acc_control_helper_t *radar) |
Destroy a helper instance. More... | |
bool | acc_control_helper_activate (acc_control_helper_t *radar) |
Activate the sensor. More... | |
bool | acc_control_helper_get_next (acc_control_helper_t *radar) |
Perform a radar measurement and wait for the result. More... | |
#define SENSOR_CALIBRATION_TIMEOUT_MS 500 |
Definition at line 18 of file acc_control_helper.c.
#define SENSOR_MEASURE_TIMEOUT_MS 1000 |
Definition at line 19 of file acc_control_helper.c.
bool acc_control_helper_activate | ( | acc_control_helper_t * | radar | ) |
Activate the sensor.
After a successful call to this function the following members of the acc_control_helper_t struct are updated:
buffer_size: The size of the allocated buffer sensor: Pointer to sensor instance processing: Pointer to processing instance cal_result: The calibration data
radar | A pointer to an acc_control_helper_t struct |
Definition at line 81 of file acc_control_helper.c.
|
static |
Definition at line 22 of file acc_control_helper.c.
bool acc_control_helper_create | ( | acc_control_helper_t * | radar, |
acc_sensor_id_t | sensor_id | ||
) |
Create a helper instance.
After a successful call to this function all members of the the acc_control_helper_t are initialized to default values and the config member is created.
radar | A pointer to an acc_control_helper_t struct. The members in this struct will be initialized. |
sensor_id | The sensor id |
Definition at line 41 of file acc_control_helper.c.
void acc_control_helper_destroy | ( | acc_control_helper_t * | radar | ) |
Destroy a helper instance.
radar | A pointer to an acc_control_helper_t struct |
Definition at line 50 of file acc_control_helper.c.
bool acc_control_helper_get_next | ( | acc_control_helper_t * | radar | ) |
Perform a radar measurement and wait for the result.
After each call to this function the "proc_result" member of the acc_control_helper_t is updated.
radar | A pointer to an acc_control_helper_t struct |
Definition at line 157 of file acc_control_helper.c.