Events for modular UI and other listeners

This commit is contained in:
Sassa NF
2024-10-05 16:35:01 +01:00
parent 0c760610df
commit bdd00039b2
9 changed files with 175 additions and 50 deletions
+14
View File
@@ -102,6 +102,20 @@ int BarChart::y2pos(float y)
return height - height * (y - min_y) / (max_y - min_y);
}
void BarChart::onEvent(Event &e)
{
if (e.type != DETECTED)
{
return;
}
int u = updatePoint(e.emitter.current_frequency, e.detected.rssi);
if (e.emitter.animated)
{
drawOne(u);
}
}
void DecoratedBarChart::reset(uint16_t x, uint16_t y, uint16_t w, uint16_t h)
{
Chart::reset(x, y, w, h);