Doly C++ SDK v1.00
Loading...
Searching...
No Matches
TofControl.h File Reference

Public API for Doly ToF (Time of Flight) sensor control. More...

#include <stdint.h>
#include <vector>
#include "TofEvent.h"

Go to the source code of this file.

Namespaces

namespace  TofControl

Functions

int8_t TofControl::init (int8_t offset_left=0, int8_t offset_right=0)
 Initialize ToF sensors.
int8_t TofControl::dispose ()
 Dispose/stop the ToF subsystem and release resources.
int8_t TofControl::setup_continuous (uint16_t interval_ms=50, uint8_t distance=0)
 Configure continuous reading for gesture detection and threshold events.
std::vector< TofDataTofControl::getSensorsData ()
 Read both sensors once and return the latest values.
bool TofControl::isActive ()
 Check whether the ToF subsystem is active (initialized).
bool TofControl::isReading ()
 Check whether the subsystem is currently performing frequent/continuous readings.
float TofControl::getVersion ()
 Get current library version.

Detailed Description

Public API for Doly ToF (Time of Flight) sensor control.

This API manages left/right ToF sensors, supports single-shot reads, and can run a continuous reading loop for gesture detection and proximity threshold notifications.

Design notes:

  • Singleton-style control (namespace API; no instances)
  • init() must be called before continuous operations
  • setup_continuous() enables frequent readings handled internally; events are reported via TofEvent