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
This commit is contained in:
Shadowtrance
2026-06-07 23:56:32 +10:00
committed by GitHub
parent 1f959c8bbf
commit dbf850c434
127 changed files with 11156 additions and 174 deletions
@@ -0,0 +1,30 @@
#pragma once
#include "TestViewBase.h"
#include <UnitMidi.h>
class TestUnitMidi final : public TestViewBase {
public:
void onStart(lv_obj_t* parent, AppHandle handle, M5UnitTest* app) override;
void onStop() override;
private:
UnitMidi unit_;
lv_obj_t* lblStatus_ = nullptr;
lv_obj_t* lblChannel_ = nullptr;
lv_obj_t* lblProgram_ = nullptr;
uint8_t channel_ = 0;
uint8_t program_ = 0;
uint8_t note_ = 60; // middle C
bool notePlaying_= false;
// UART device name for MIDI unit (adjust to match your board wiring)
static constexpr const char* UART_DEVICE = "uart1";
static void onNoteOnClicked(lv_event_t* e);
static void onNoteOffClicked(lv_event_t* e);
static void onChUp(lv_event_t* e);
static void onChDown(lv_event_t* e);
static void onProgUp(lv_event_t* e);
static void onProgDown(lv_event_t* e);
void updateLabels();
};