Doly C++ SDK v1.00
Loading...
Searching...
No Matches
TofControl.h
Go to the documentation of this file.
1#pragma once
2#include <stdint.h>
3#include <vector>
4#include "TofEvent.h"
5
20
21namespace TofControl
22{
36 int8_t init(int8_t offset_left = 0, int8_t offset_right = 0);
37
45 int8_t dispose();
46
64 int8_t setup_continuous(uint16_t interval_ms = 50, uint8_t distance = 0);
65
73 std::vector<TofData> getSensorsData();
74
79 bool isActive();
80
85 bool isReading();
86
94 float getVersion();
95};
Event registration helpers for the ToF (Time of Flight) subsystem.
Definition TofControl.h:22
int8_t init(int8_t offset_left=0, int8_t offset_right=0)
Initialize ToF sensors.
int8_t setup_continuous(uint16_t interval_ms=50, uint8_t distance=0)
Configure continuous reading for gesture detection and threshold events.
float getVersion()
Get current library version.
int8_t dispose()
Dispose/stop the ToF subsystem and release resources.
bool isActive()
Check whether the ToF subsystem is active (initialized).
std::vector< TofData > getSensorsData()
Read both sensors once and return the latest values.
bool isReading()
Check whether the subsystem is currently performing frequent/continuous readings.