Implement native ESP-IDF radar firmware
This commit is contained in:
30
main/radar_service.h
Normal file
30
main/radar_service.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "esp_err.h"
|
||||
|
||||
#define RADAR_SERVICE_MAX_TARGETS 3
|
||||
|
||||
typedef struct {
|
||||
bool valid;
|
||||
uint32_t id;
|
||||
float x_mm;
|
||||
float y_mm;
|
||||
float speed_cm_s;
|
||||
uint16_t resolution_mm;
|
||||
uint32_t age_ms;
|
||||
} radar_target_view_t;
|
||||
|
||||
typedef struct {
|
||||
bool sensor_online;
|
||||
uint8_t target_count;
|
||||
uint32_t frame_count;
|
||||
uint32_t invalid_frame_count;
|
||||
uint32_t last_frame_age_ms;
|
||||
radar_target_view_t targets[RADAR_SERVICE_MAX_TARGETS];
|
||||
} radar_snapshot_t;
|
||||
|
||||
esp_err_t radar_service_init(void);
|
||||
void radar_service_get_snapshot(radar_snapshot_t *snapshot);
|
||||
Reference in New Issue
Block a user