mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-11 14:47:39 +00:00
More arguments pass-by-reference.
This commit is contained in:
@@ -29,7 +29,7 @@ struct Metrics {
|
|||||||
const float r;
|
const float r;
|
||||||
};
|
};
|
||||||
|
|
||||||
static Metrics calculate_metrics(const Frame frame) {
|
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.
|
||||||
@@ -66,7 +66,7 @@ static Metrics calculate_metrics(const Frame frame) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
void Manager::feed(const Frame frame) {
|
void Manager::feed(const Frame& frame) {
|
||||||
// touch_debounce.feed(touch_raw);
|
// touch_debounce.feed(touch_raw);
|
||||||
const auto touch_raw = frame.touch;
|
const auto touch_raw = frame.touch;
|
||||||
//const auto touch_stable = touch_debounce.state();
|
//const auto touch_stable = touch_debounce.state();
|
||||||
|
@@ -165,7 +165,7 @@ class Manager {
|
|||||||
public:
|
public:
|
||||||
std::function<void(ui::TouchEvent)> on_event;
|
std::function<void(ui::TouchEvent)> on_event;
|
||||||
|
|
||||||
void feed(const Frame frame);
|
void feed(const Frame& frame);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum State {
|
enum State {
|
||||||
|
Reference in New Issue
Block a user