mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-12-25 07:19:28 -05:00
Touch: Expose metrics calculation struct/function.
This commit is contained in:
parent
20bcbf511e
commit
d0fd56bc78
@ -23,13 +23,7 @@
|
|||||||
|
|
||||||
namespace touch {
|
namespace touch {
|
||||||
|
|
||||||
struct Metrics {
|
Metrics calculate_metrics(const Frame& frame) {
|
||||||
const float x;
|
|
||||||
const float y;
|
|
||||||
const float r;
|
|
||||||
};
|
|
||||||
|
|
||||||
static Metrics calculate_metrics(const Frame& frame) {
|
|
||||||
/* TODO: Yikes! M0 doesn't have floating point, so this code is
|
/* TODO: Yikes! M0 doesn't have floating point, so this code is
|
||||||
* expensive! On the other hand, it seems to be working well (and
|
* expensive! On the other hand, it seems to be working well (and
|
||||||
* fast *enough*?), so maybe leave it alone at least for now.
|
* fast *enough*?), so maybe leave it alone at least for now.
|
||||||
|
@ -106,6 +106,14 @@ struct Frame {
|
|||||||
bool touch { false };
|
bool touch { false };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct Metrics {
|
||||||
|
const float x;
|
||||||
|
const float y;
|
||||||
|
const float r;
|
||||||
|
};
|
||||||
|
|
||||||
|
Metrics calculate_metrics(const Frame& frame);
|
||||||
|
|
||||||
template<size_t N>
|
template<size_t N>
|
||||||
class Filter {
|
class Filter {
|
||||||
public:
|
public:
|
||||||
|
Loading…
Reference in New Issue
Block a user