Various fixes and improvements (#269)

- Bump version for next release
- Fix default gamma for CYD 2432S032C
- Remember gamma curve setting from Display settings app
- Add UART to Core2 (still has no voltage on Grove port, though)
- LVGL performance improvements: pin to second core and set task priority to "critical"
- Fix build warnings, including deprecations
- Removed deprecated `Thread` constructor
- Fix WaveShare S3 display: Some displays would show a white screen at 12MHz, so I'm putting it back to the
official config values.
This commit is contained in:
Ken Van Hoeylandt
2025-04-01 23:42:56 +02:00
committed by GitHub
parent eb4e9f9649
commit 08029a84dd
30 changed files with 203 additions and 145 deletions
+26 -29
View File
@@ -4,33 +4,17 @@
using namespace tt;
static int interruptable_thread(void* parameter) {
bool* interrupted = (bool*)parameter;
while (!*interrupted) {
kernel::delayMillis(5);
}
return 0;
}
static int immediate_return_thread(void* parameter) {
bool* has_called = (bool*)parameter;
*has_called = true;
return 0;
}
static int thread_with_return_code(void* parameter) {
int* code = (int*)parameter;
return *code;
}
TEST_CASE("when a thread is started then its callback should be called") {
bool has_called = false;
auto* thread = new Thread(
"immediate return task",
4096,
&immediate_return_thread,
&has_called
[&has_called]() {
has_called = true;
return 0;
}
);
CHECK(!has_called);
thread->start();
thread->join();
@@ -43,9 +27,14 @@ TEST_CASE("a thread can be started and stopped") {
auto* thread = new Thread(
"interruptable thread",
4096,
&interruptable_thread,
&interrupted
[&interrupted]() {
while (!interrupted) {
kernel::delayMillis(5);
}
return 0;
}
);
CHECK(thread);
thread->start();
interrupted = true;
@@ -58,8 +47,12 @@ TEST_CASE("thread id should only be set at when thread is started") {
auto* thread = new Thread(
"interruptable thread",
4096,
&interruptable_thread,
&interrupted
[&interrupted]() {
while (!interrupted) {
kernel::delayMillis(5);
}
return 0;
}
);
CHECK_EQ(thread->getId(), nullptr);
thread->start();
@@ -75,8 +68,13 @@ TEST_CASE("thread state should be correct") {
auto* thread = new Thread(
"interruptable thread",
4096,
&interruptable_thread,
&interrupted
[&interrupted]() {
while (!interrupted) {
kernel::delayMillis(5);
}
return 0;
}
);
CHECK_EQ(thread->getState(), Thread::State::Stopped);
thread->start();
@@ -93,8 +91,7 @@ TEST_CASE("thread id should only be set at when thread is started") {
auto* thread = new Thread(
"return code",
4096,
&thread_with_return_code,
&code
[&code]() { return code; }
);
thread->start();
thread->join();