From d05eefaf7f10769ddae3840890af6a1e52440238 Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Thu, 11 Mar 2021 02:56:59 +0100 Subject: vitrual tracking fixed --- fw/fe310/eos/eve/eve_vtrack.h | 51 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 fw/fe310/eos/eve/eve_vtrack.h (limited to 'fw/fe310/eos/eve/eve_vtrack.h') diff --git a/fw/fe310/eos/eve/eve_vtrack.h b/fw/fe310/eos/eve/eve_vtrack.h new file mode 100644 index 0000000..6bf8fa5 --- /dev/null +++ b/fw/fe310/eos/eve/eve_vtrack.h @@ -0,0 +1,51 @@ +#include + +#define EVE_VTRACK_FRICTION 500 + +typedef void (*eve_vtrack_start_t) (EVETouch *, void *); +typedef int (*eve_vtrack_tick_t) (EVETouch *, void *); +typedef void (*eve_vtrack_stop_t) (EVETouch *, void *); + +typedef struct EVEVTrack { + eve_vtrack_start_t start; + eve_vtrack_tick_t tick; + eve_vtrack_stop_t stop; + void *param; +} EVEVTrack; + +void eve_vtrack_init(void); +EVEVTrack *eve_vtrack_get(void); +void eve_vtrack_set(eve_vtrack_start_t start, eve_vtrack_tick_t tick, eve_vtrack_stop_t stop, void *param); +void eve_vtrack_reset(void); +void eve_vtrack_start(uint8_t tag0, int i); +void eve_vtrack_stop(void); + +typedef struct EVEVTrackInert { + int fc; + int f; + int x0; + int y0; +} EVEVTrackInert; + +EVEVTrackInert *eve_vtrack_inert_get_param(void); +void eve_vtrack_inert_init(EVEVTrackInert *param, int fc); +void eve_vtrack_inert_start(EVETouch *touch, void *p); +int eve_vtrack_inert_tick(EVETouch *touch, void *p); +void eve_vtrack_inert_stop(EVETouch *touch, void *p); + +typedef struct EVEVTrackOsc { + int x; + int y; + double f; + double d; + double a; + uint32_t t_max; + int x0; + int y0; +} EVEVTrackOsc; + +EVEVTrackOsc *eve_vtrack_osc_get_param(void); +void eve_vtrack_osc_init(EVEVTrackOsc *param, int x, int y, uint32_t T, double d, uint32_t t_max); +void eve_vtrack_osc_start(EVETouch *touch, void *p); +int eve_vtrack_osc_tick(EVETouch *touch, void *p); +void eve_vtrack_osc_stop(EVETouch *touch, void *p); -- cgit v1.2.3