summaryrefslogtreecommitdiff
path: root/src/drivers/include/relative_wheel.hpp
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2024-04-10 16:56:10 +1000
committerjacqueline <me@jacqueline.id.au>2024-04-10 16:56:10 +1000
commited82063af5f83530afa5cfb5bf5bd516f3d05f2a (patch)
treef8beba0e107d57bc0324b930d5200fdc405c96c4 /src/drivers/include/relative_wheel.hpp
parent2e59325c22605873bba62c078c196d99c1664590 (diff)
downloadtangara-fw-ed82063af5f83530afa5cfb5bf5bd516f3d05f2a.tar.gz
WIP decompose our giant LVGL driver into smaller classes
Diffstat (limited to 'src/drivers/include/relative_wheel.hpp')
-rw-r--r--src/drivers/include/relative_wheel.hpp52
1 files changed, 0 insertions, 52 deletions
diff --git a/src/drivers/include/relative_wheel.hpp b/src/drivers/include/relative_wheel.hpp
deleted file mode 100644
index e1106143..00000000
--- a/src/drivers/include/relative_wheel.hpp
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright 2023 jacqueline <me@jacqueline.id.au>
- *
- * SPDX-License-Identifier: GPL-3.0-only
- */
-
-#pragma once
-
-#include <stdint.h>
-#include <cstdint>
-#include <functional>
-
-#include "esp_err.h"
-#include "result.hpp"
-
-#include "gpios.hpp"
-#include "touchwheel.hpp"
-
-namespace drivers {
-
-class RelativeWheel {
- public:
- explicit RelativeWheel(TouchWheel& touch);
-
- auto Update() -> void;
- auto SetEnabled(bool) -> void;
-
- auto SetSensitivity(uint8_t) -> void;
- auto GetSensitivity() -> uint8_t;
-
- auto is_clicking() const -> bool;
- auto ticks() const -> std::int_fast16_t;
-
- // Not copyable or movable.
- RelativeWheel(const RelativeWheel&) = delete;
- RelativeWheel& operator=(const RelativeWheel&) = delete;
-
- private:
- TouchWheel& touch_;
-
- bool is_enabled_;
- uint8_t sensitivity_;
- uint8_t threshold_;
-
- bool is_clicking_;
- bool was_clicking_;
- bool is_first_read_;
- std::int_fast16_t ticks_;
- uint8_t last_angle_;
-};
-
-} // namespace drivers