Remove legacy fonts and make the bootloader compile with LVGL
This commit is contained in:
committed by
Raphael Coeffic
parent
0404919667
commit
ee0c37157d
@@ -137,6 +137,15 @@ void simuSetSwitch(uint8_t swtch, int8_t state)
|
||||
switchesStates[swtch] = state;
|
||||
}
|
||||
|
||||
#if defined(SIMU_BOOTLOADER)
|
||||
int bootloaderMain();
|
||||
static void* bootloaderThread(void*)
|
||||
{
|
||||
bootloaderMain();
|
||||
return nullptr;
|
||||
}
|
||||
#endif
|
||||
|
||||
void simuStart(bool tests, const char * sdPath, const char * settingsPath)
|
||||
{
|
||||
if (simu_running)
|
||||
@@ -195,7 +204,18 @@ void simuStart(bool tests, const char * sdPath, const char * settingsPath)
|
||||
try {
|
||||
#endif
|
||||
|
||||
#if !defined(SIMU_BOOTLOADER)
|
||||
simuMain();
|
||||
#else
|
||||
pthread_attr_t attr;
|
||||
pthread_attr_init(&attr);
|
||||
struct sched_param sp;
|
||||
sp.sched_priority = SCHED_RR;
|
||||
pthread_attr_setschedparam(&attr, &sp);
|
||||
|
||||
pthread_t bl_pid;
|
||||
pthread_create(&bl_pid, &attr, &bootloaderThread, nullptr);
|
||||
#endif
|
||||
|
||||
simu_running = true;
|
||||
|
||||
@@ -464,24 +484,6 @@ void pwrInit() {}
|
||||
void pwrOn() {}
|
||||
void pwrOff() {}
|
||||
|
||||
void readKeysAndTrims()
|
||||
{
|
||||
uint8_t index = 0;
|
||||
auto keysInput = readKeys();
|
||||
for (auto mask = (1 << 0); mask < (1 << TRM_BASE); mask <<= 1) {
|
||||
keys[index++].input(keysInput & mask);
|
||||
}
|
||||
|
||||
auto trimsInput = readTrims();
|
||||
for (auto mask = (1 << 0); mask < (1 << NUM_TRIMS_KEYS); mask <<= 1) {
|
||||
keys[index++].input(trimsInput & mask);
|
||||
}
|
||||
|
||||
if (keysInput || trimsInput) {
|
||||
resetBacklightTimeout();
|
||||
}
|
||||
}
|
||||
|
||||
bool keyDown()
|
||||
{
|
||||
return readKeys();
|
||||
|
||||
Reference in New Issue
Block a user