M5Unit-GESTURE 0.3.0 git rev:73e6de5
Loading...
Searching...
No Matches
m5::unit::paj7620u2::Data Struct Reference

Measurement data group. More...

#include <unit_PAJ7620U2.hpp>

Public Member Functions

Mode mode () const
 Gets the operation mode.
 
Gesture gesture () const
 Gets the gesture (Common)
 
Proximity mode
uint8_t brightness () const
 Gets the brightness.
 
bool approach () const
 Gets the approach state (true: approach)
 
Cursor mode
uint16_t cursorX () const
 Gets the cursor X of any object.
 
uint16_t cursorY () const
 Gets the cursor Y of any object.
 

Public Attributes

std::array< uint8_t, 2+4 > raw {}
 Raw register data.
 
Gesture data_gesture {}
 Detected gesture.
 
Mode data_mode {}
 Current operating mode.
 
union { 
 
   struct { 
 
      uint8_t   proximity_brightness 
 Proximity brightness (PS data)
 
      bool   proximity_approach 
 Proximity approach state.
 
   }  
 
   struct { 
 
      uint16_t   cursor_x {} 
 
      uint16_t   cursor_y {} 
 Cursor XY coordinates.
 
   }  
 
};  
 

Detailed Description

Measurement data group.

Member Function Documentation

◆ cursorX()

uint16_t m5::unit::paj7620u2::Data::cursorX ( ) const
inline

Gets the cursor X of any object.

Returns
Object center X on the 30x30 sensor array in 1/128 pixel units (0 - 3712), or 0xFFFF if not Cursor mode

◆ cursorY()

uint16_t m5::unit::paj7620u2::Data::cursorY ( ) const
inline

Gets the cursor Y of any object.

Returns
Object center Y on the 30x30 sensor array in 1/128 pixel units (0 - 3712), or 0xFFFF if not Cursor mode