Data Structures | Macros | Enumerations | Functions
example_detector_distance.c File Reference
`#include <stdbool.h>`
`#include <stdint.h>`
`#include <stdio.h>`
`#include <stdlib.h>`
`#include "acc_definitions_a121.h"`
`#include "acc_detector_distance.h"`
`#include "acc_hal_definitions_a121.h"`
`#include "acc_hal_integration_a121.h"`
`#include "acc_integration.h"`
`#include "acc_integration_log.h"`
`#include "acc_rss_a121.h"`
`#include "acc_sensor.h"`
`#include "acc_version.h"`

Go to the source code of this file.

## Data Structures
struct | distance_detector_resources_t

## Macros
#define | SENSOR_ID (1U)
#define | SENSOR_TIMEOUT_MS (2000U)

## Enumerations
enum | distance_preset_config_t { DISTANCE_PRESET_CONFIG_NONE = 0, DISTANCE_PRESET_CONFIG_BALANCED, DISTANCE_PRESET_CONFIG_HIGH_ACCURACY, DISTANCE_PRESET_CONFIG_NONE = 0, DISTANCE_PRESET_CONFIG_BALANCED, DISTANCE_PRESET_CONFIG_HIGH_ACCURACY }

## Functions
static void | cleanup (distance_detector_resources_t *resources)
static void | set_config (acc_detector_distance_config_t *detector_config, distance_preset_config_t preset)
static bool | initialize_detector_resources (distance_detector_resources_t *resources)
static bool | do_sensor_calibration (acc_sensor_t *sensor, acc_cal_result_t *sensor_cal_result, void *buffer, uint32_t buffer_size)
static bool | do_full_detector_calibration (distance_detector_resources_t *resources, const acc_cal_result_t *sensor_cal_result)
static bool | do_detector_recalibration (distance_detector_resources_t *resources, const acc_cal_result_t *sensor_cal_result)
static bool | do_detector_get_next (distance_detector_resources_t *resources, const acc_cal_result_t *sensor_cal_result, acc_detector_distance_result_t *result)
static void | print_distance_result (const acc_detector_distance_result_t *result)
int | acconeer_main (int argc, char *argv[])
| Assembly test example. More...

## Macro Definition Documentation

## ◆ SENSOR_ID

#define SENSOR_ID (1U)

Examples
  example_detector_distance.c.

Definition at line 57 of file example_detector_distance.c.

## ◆ SENSOR_TIMEOUT_MS

#define SENSOR_TIMEOUT_MS (2000U)

Examples
  example_detector_distance.c.

Definition at line 59 of file example_detector_distance.c.

## Enumeration Type Documentation

## ◆ distance_preset_config_t

enum distance_preset_config_t

Enumerator
DISTANCE_PRESET_CONFIG_NONE |
DISTANCE_PRESET_CONFIG_BALANCED |
DISTANCE_PRESET_CONFIG_HIGH_ACCURACY |
DISTANCE_PRESET_CONFIG_NONE |
DISTANCE_PRESET_CONFIG_BALANCED |
DISTANCE_PRESET_CONFIG_HIGH_ACCURACY |

Examples
  example_detector_distance.c.

Definition at line 49 of file example_detector_distance.c.

## Function Documentation

## ◆ acconeer_main()

int acconeer_main | ( | int | argc,
|  | char * | argv[]
| ) |  |

Assembly test example.

Surface velocity example application.

Tank level reference application.

Smart presence reference application.

Breathing example application.

Service subsweeps example.

Service multple configurations example.

Low power service example.

Service example.

Processing subtract adaptive background example.

Processing static presence example.

Processing peak interpolation example.

Processing noncoherent mean example.

Processing coherent mean example.

Processing amplitude example.

Detector presence example with multiple configurations.

Low power detector presence example.

Detector presence example.

Distance detector low power example.

Detector distance example.

Control helper example.

Returns
  Returns EXIT_SUCCESS if successful, otherwise EXIT_FAILURE

Test if measure on wake up is enable Do a measurement if the the detector is ready (configured and calibrated)

Test if measure on wake up is enable Do a measurement if the the detector is ready (configured and calibrated)

Detector filters and states are reset on prepare (reconfiguration) to avoid risk of false detections when switching back to a zone.

Detector filters and states are reset on prepare (reconfiguration) to avoid risk of false detections when switching back to a zone.

Examples
  example_detector_distance.c.

Definition at line 108 of file example_detector_distance.c.

## ◆ cleanup()

static void cleanup | ( | distance_detector_resources_t * | resources | ) |
| static

Examples
  example_detector_distance.c.

Definition at line 219 of file example_detector_distance.c.

## ◆ do_detector_get_next()

static bool do_detector_get_next | ( | distance_detector_resources_t * | resources,
|  | const acc_cal_result_t * | sensor_cal_result,
|  | acc_detector_distance_result_t * | result
| ) |  |
| static

Examples
  example_detector_distance.c.

Definition at line 402 of file example_detector_distance.c.

## ◆ do_detector_recalibration()

static bool do_detector_recalibration | ( | distance_detector_resources_t * | resources,
|  | const acc_cal_result_t * | sensor_cal_result
| ) |  |
| static

Examples
  example_detector_distance.c.

Definition at line 375 of file example_detector_distance.c.

## ◆ do_full_detector_calibration()

static bool do_full_detector_calibration | ( | distance_detector_resources_t * | resources,
|  | const acc_cal_result_t * | sensor_cal_result
| ) |  |
| static

Examples
  example_detector_distance.c.

Definition at line 348 of file example_detector_distance.c.

## ◆ do_sensor_calibration()

static bool do_sensor_calibration | ( | acc_sensor_t * | sensor,
|  | acc_cal_result_t * | sensor_cal_result,
|  | void * | buffer,
|  | uint32_t | buffer_size
| ) |  |
| static

Examples
  example_detector_distance.c.

Definition at line 310 of file example_detector_distance.c.

## ◆ initialize_detector_resources()

static bool initialize_detector_resources | ( | distance_detector_resources_t * | resources | ) |
| static

Examples
  example_detector_distance.c.

Definition at line 277 of file example_detector_distance.c.

## ◆ print_distance_result()

static void print_distance_result | ( | const acc_detector_distance_result_t * | result | ) |
| static

Examples
  example_detector_distance.c.

Definition at line 447 of file example_detector_distance.c.

## ◆ set_config()

static void set_config | ( | acc_detector_distance_config_t * | detector_config,
|  | distance_preset_config_t | preset
| ) |  |
| static

Examples
  example_detector_distance.c.

Definition at line 237 of file example_detector_distance.c.