New kernel drivers and device migrations (#563)
This commit is contained in:
committed by
GitHub
parent
955416dac8
commit
8af6204ba1
@@ -1,5 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef ESP_PLATFORM
|
||||
#include <sdkconfig.h>
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_TT_TOUCH_CALIBRATION_SUPPORTED)
|
||||
|
||||
#include <Tactility/app/App.h>
|
||||
|
||||
namespace tt::app::touchcalibration {
|
||||
@@ -7,3 +13,5 @@ namespace tt::app::touchcalibration {
|
||||
LaunchId start();
|
||||
|
||||
} // namespace tt::app::touchcalibration
|
||||
|
||||
#endif
|
||||
|
||||
@@ -4,6 +4,14 @@
|
||||
|
||||
namespace tt::settings::touch {
|
||||
|
||||
/**
|
||||
* @brief Persisted touch calibration coefficients.
|
||||
*
|
||||
* Shape mirrors struct LvglPointerCalibration (tactility/lvgl_pointer.h): xMin/xMax/yMin/yMax are
|
||||
* the raw touch coordinate range that should map onto the display's full resolution. This struct
|
||||
* only concerns itself with persistence - applying it to a live pointer indev is the caller's
|
||||
* responsibility (see lvgl_pointer_set_calibration()).
|
||||
*/
|
||||
struct TouchCalibrationSettings {
|
||||
bool enabled = false;
|
||||
int32_t xMin = 0;
|
||||
@@ -14,20 +22,12 @@ struct TouchCalibrationSettings {
|
||||
|
||||
TouchCalibrationSettings getDefault();
|
||||
|
||||
bool isValid(const TouchCalibrationSettings& settings);
|
||||
|
||||
bool load(TouchCalibrationSettings& settings);
|
||||
|
||||
TouchCalibrationSettings loadOrGetDefault();
|
||||
|
||||
bool save(const TouchCalibrationSettings& settings);
|
||||
|
||||
bool isValid(const TouchCalibrationSettings& settings);
|
||||
|
||||
TouchCalibrationSettings getActive();
|
||||
|
||||
void setRuntimeCalibrationEnabled(bool enabled);
|
||||
|
||||
void invalidateCache();
|
||||
|
||||
bool applyCalibration(const TouchCalibrationSettings& settings, uint16_t xMax, uint16_t yMax, uint16_t& x, uint16_t& y);
|
||||
|
||||
} // namespace tt::settings::touch
|
||||
|
||||
Reference in New Issue
Block a user