fix linux build breaks of sim build
This commit is contained in:
parent
736029c89a
commit
02b664b893
6 changed files with 10 additions and 7 deletions
|
@ -1,6 +1,5 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
#include "Notification.hpp"
|
#include "Notification.hpp"
|
||||||
#include "SPSCQueueInterface.hpp"
|
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
class KeyPressAbstract {
|
class KeyPressAbstract {
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#include "KeyPressSim.hpp"
|
#include "KeyPressSim.hpp"
|
||||||
#include "SimulatorSPSCQueue.hpp"
|
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ template <typename T>
|
||||||
SimulatorSPSCQueue<T>::SimulatorSPSCQueue(uint32_t size)
|
SimulatorSPSCQueue<T>::SimulatorSPSCQueue(uint32_t size)
|
||||||
{
|
{
|
||||||
this->size = size;
|
this->size = size;
|
||||||
this->data = new T[](this->size + 1);
|
this->data = new T[this->size + 1];
|
||||||
this->rd_index = 0;
|
this->rd_index = 0;
|
||||||
this->wr_index = 0;
|
this->wr_index = 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
#include "HardwareAbstract.hpp"
|
#include "HardwareAbstract.hpp"
|
||||||
#include "PageBase.hpp"
|
#include "PageBase.hpp"
|
||||||
|
|
||||||
|
namespace UI::Widget{
|
||||||
|
class Button;
|
||||||
|
}
|
||||||
namespace UI::Page {
|
namespace UI::Page {
|
||||||
class SettingsPage : public Base {
|
class SettingsPage : public Base {
|
||||||
public:
|
public:
|
||||||
|
@ -16,7 +19,7 @@ protected:
|
||||||
void OnHide() override{};
|
void OnHide() override{};
|
||||||
|
|
||||||
std::vector<UIElement *> sliders;
|
std::vector<UIElement *> sliders;
|
||||||
Widget::Base *mButton;
|
Widget::Button *mButton;
|
||||||
std::shared_ptr<HardwareAbstract> mHardware;
|
std::shared_ptr<HardwareAbstract> mHardware;
|
||||||
};
|
};
|
||||||
} // namespace UI::Page
|
} // namespace UI::Page
|
||||||
|
|
|
@ -6,12 +6,13 @@ using namespace UI::Screen;
|
||||||
|
|
||||||
HomeScreen::HomeScreen(std::shared_ptr<HardwareAbstract> aHardware)
|
HomeScreen::HomeScreen(std::shared_ptr<HardwareAbstract> aHardware)
|
||||||
: Base(UI::ID::Screens::Home), mHardware(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>(
|
mTabView = AddElement<Page::TabView>(std::make_unique<Page::TabView>(
|
||||||
ID(ID::Pages::INVALID_PAGE_ID))); // Adds Tabview to Homescreen
|
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
|
// Adds pages to the Tab view
|
||||||
mTabView->AddTab(std::make_unique<Page::SettingsPage>(aHardware), "Settings");
|
mTabView->AddTab(std::make_unique<Page::SettingsPage>(aHardware), "Settings");
|
||||||
mTabView->AddTab(std::make_unique<Page::SettingsPage>(aHardware),
|
mTabView->AddTab(std::make_unique<Page::SettingsPage>(aHardware),
|
||||||
|
|
|
@ -129,11 +129,12 @@ build_flags =
|
||||||
;-D LV_LOG_LEVEL=LV_LOG_LEVEL_INFO
|
;-D LV_LOG_LEVEL=LV_LOG_LEVEL_INFO
|
||||||
;-D LV_LOG_PRINTF=1
|
;-D LV_LOG_PRINTF=1
|
||||||
-lSDL2 ; SDL2 must be installed on system! Windows:msys2 ubuntu:apt-get
|
-lSDL2 ; SDL2 must be installed on system! Windows:msys2 ubuntu:apt-get
|
||||||
|
-lpthread ; std::thread for Linux
|
||||||
; --------- SDL drivers options -----------------------------
|
; --------- SDL drivers options -----------------------------
|
||||||
-D LV_LVGL_H_INCLUDE_SIMPLE
|
-D LV_LVGL_H_INCLUDE_SIMPLE
|
||||||
-D LV_DRV_NO_CONF
|
-D LV_DRV_NO_CONF
|
||||||
-D USE_SDL
|
-D USE_SDL
|
||||||
-D SDL_MAIN_HANDLED
|
-D SDL_MAIN_HANDLED
|
||||||
-D SDL_HOR_RES=SCREEN_WIDTH
|
-D SDL_HOR_RES=SCREEN_WIDTH
|
||||||
-D SDL_VER_RES=SCREEN_HEIGHT
|
-D SDL_VER_RES=SCREEN_HEIGHT
|
||||||
-D SDL_ZOOM=1
|
-D SDL_ZOOM=1
|
||||||
|
|
Loading…
Add table
Reference in a new issue