Files
tactility_apps/Apps/M5UnitTest/main/Source/TestUnitJoystick2.h
T
Shadowtrance dbf850c434 Fixes and new apps (#30)
- M5 Unit Modules library + M5 Unit Test app
- Minor fixes for TodoList, TwoEleven, Snake, Brainfuck and Breakout
- Fixed SerialConsole to use the uart controller as it was broken in one of the many updates
- Fixed keyboard input in TwoEleven, Breakout, Magic8Ball and Snake
- Bluetooth Media Keys app, supports pressing physical keys to trigger the corresponding buttonmatrix button
- Epub Reader app
2026-06-07 15:56:32 +02:00

27 lines
710 B
C++

#pragma once
#include "TestViewBase.h"
#include <UnitJoystick2.h>
#include <UnitPaHub.h>
class TestUnitJoystick2 final : public TestViewBase {
public:
void onStart(lv_obj_t* parent, AppHandle handle, M5UnitTest* app) override;
void onStop() override;
private:
UnitPaHub hub_;
UnitJoystick2 unit_;
lv_obj_t* lblXY_ = nullptr;
lv_obj_t* lblButton_ = nullptr;
lv_obj_t* dot_ = nullptr;
lv_obj_t* joyCont_ = nullptr;
lv_timer_t* timer_ = nullptr;
bool usingPaHub_ = false;
int joyArea_ = 120;
int dotSize_ = 16;
void selectIfNeeded();
static void onTimer(lv_timer_t* t);
void update();
};