fix linux build breaks of sim build

This commit is contained in:
Matthew Colvin 2023-10-11 11:07:39 -05:00
parent 736029c89a
commit 02b664b893
6 changed files with 10 additions and 7 deletions

View file

@ -1,6 +1,5 @@
#pragma once
#include "Notification.hpp"
#include "SPSCQueueInterface.hpp"
#include <memory>
class KeyPressAbstract {

View file

@ -1,5 +1,4 @@
#include "KeyPressSim.hpp"
#include "SimulatorSPSCQueue.hpp"
#include <memory>

View file

@ -4,7 +4,7 @@ template <typename T>
SimulatorSPSCQueue<T>::SimulatorSPSCQueue(uint32_t size)
{
this->size = size;
this->data = new T[](this->size + 1);
this->data = new T[this->size + 1];
this->rd_index = 0;
this->wr_index = 0;
}

View file

@ -1,6 +1,9 @@
#include "HardwareAbstract.hpp"
#include "PageBase.hpp"
namespace UI::Widget{
class Button;
}
namespace UI::Page {
class SettingsPage : public Base {
public:
@ -16,7 +19,7 @@ protected:
void OnHide() override{};
std::vector<UIElement *> sliders;
Widget::Base *mButton;
Widget::Button *mButton;
std::shared_ptr<HardwareAbstract> mHardware;
};
} // namespace UI::Page

View file

@ -6,12 +6,13 @@ using namespace UI::Screen;
HomeScreen::HomeScreen(std::shared_ptr<HardwareAbstract> aHardware)
: Base(UI::ID::Screens::Home), mHardware(aHardware) {
SetBgColor(UI::Color::BLACK);
SetPushAnimation(LV_SCR_LOAD_ANIM_FADE_IN);
mTabView = AddElement<Page::TabView>(std::make_unique<Page::TabView>(
ID(ID::Pages::INVALID_PAGE_ID))); // Adds Tabview to Homescreen
SetBgColor(UI::Color::BLACK);
SetPushAnimation(LV_SCR_LOAD_ANIM_FADE_IN);
// Adds pages to the Tab view
mTabView->AddTab(std::make_unique<Page::SettingsPage>(aHardware), "Settings");
mTabView->AddTab(std::make_unique<Page::SettingsPage>(aHardware),

View file

@ -129,11 +129,12 @@ build_flags =
;-D LV_LOG_LEVEL=LV_LOG_LEVEL_INFO
;-D LV_LOG_PRINTF=1
-lSDL2 ; SDL2 must be installed on system! Windows:msys2 ubuntu:apt-get
-lpthread ; std::thread for Linux
; --------- SDL drivers options -----------------------------
-D LV_LVGL_H_INCLUDE_SIMPLE
-D LV_DRV_NO_CONF
-D USE_SDL
-D SDL_MAIN_HANDLED
-D SDL_MAIN_HANDLED
-D SDL_HOR_RES=SCREEN_WIDTH
-D SDL_VER_RES=SCREEN_HEIGHT
-D SDL_ZOOM=1