refactor: replace hint feedback with debug crosshair
This commit is contained in:
@@ -433,21 +433,11 @@ void DisplayDriverGFX::drawDashboard(const ScreenState& state) {
|
||||
}
|
||||
}
|
||||
|
||||
void DisplayDriverGFX::updateHint(int x, int y, bool active) {
|
||||
void DisplayDriverGFX::drawDebugTouch(int x, int y) {
|
||||
if(!_gfx)
|
||||
return;
|
||||
|
||||
static uint32_t lastTime = 0;
|
||||
uint32_t now = millis();
|
||||
if(now - lastTime < 100)
|
||||
return;
|
||||
lastTime = now;
|
||||
|
||||
// active=true: faster pulse (500ms), active=false: slower pulse (2000ms)
|
||||
float period = active ? 500.0f : 2000.0f;
|
||||
float t = fmodf(now, period) / period;
|
||||
uint8_t v = static_cast<uint8_t>(30.0f + 30.0f * sinf(t * 2.0f * 3.14159f));
|
||||
uint16_t col = _gfx->color565(v, v, v);
|
||||
|
||||
_gfx->drawCircle(x, y, 50, col);
|
||||
const int size = 20;
|
||||
_gfx->drawLine(x - size, y, x + size, y, TFT_RED);
|
||||
_gfx->drawLine(x, y - size, x, y + size, TFT_RED);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user