Fixed non-color lcd cmake

No widgets necessary for B/W.
This commit is contained in:
Raphael Coeffic
2021-05-06 12:55:59 +02:00
committed by Raphael Coeffic
parent 72a7409d10
commit 3ba55ac34e
6 changed files with 9 additions and 12 deletions
+2 -2
View File
@@ -199,9 +199,9 @@ if(NOT LUA STREQUAL NO)
if(LUA STREQUAL YES)
add_definitions(-DLUA_MODEL_SCRIPTS)
endif()
set(SRC ${SRC} lua/interface.cpp lua/api_general.cpp lua/api_model.cpp lua/widgets.cpp)
set(SRC ${SRC} lua/interface.cpp lua/api_general.cpp lua/api_model.cpp)
if(GUI_DIR STREQUAL colorlcd)
set(SRC ${SRC} lua/api_colorlcd.cpp)
set(SRC ${SRC} lua/api_colorlcd.cpp lua/widgets.cpp)
else()
set(SRC ${SRC} lua/api_stdlcd.cpp)
endif()
+3
View File
@@ -22,9 +22,12 @@
#define _LCD_H_
#include <inttypes.h>
#include "board.h"
typedef uint32_t LcdFlags;
typedef uint8_t pixel_t;
typedef int coord_t;
#define BOX_WIDTH 23
#define CENTER
-1
View File
@@ -26,7 +26,6 @@
#include "api_colorlcd.h"
bool luaLcdAllowed = false;
BitmapBuffer* luaLcdBuffer = nullptr;
/*luadoc
+1
View File
@@ -46,6 +46,7 @@ extern "C" {
lua_State *lsScripts = nullptr;
uint8_t luaState = 0;
uint8_t luaScriptsCount = 0;
bool luaLcdAllowed = false;
ScriptInternalData scriptInternalData[MAX_SCRIPTS];
ScriptInputsOutputs scriptInputsOutputs[MAX_SCRIPTS];
ScriptInternalData standaloneScript;
+1
View File
@@ -126,6 +126,7 @@ struct ScriptInputsOutputs {
#define INTERPRETER_PANIC 255
extern uint8_t luaState;
extern uint8_t luaScriptsCount;
extern bool luaLcdAllowed;
extern ScriptInternalData standaloneScript;
extern ScriptInternalData scriptInternalData[MAX_SCRIPTS];
extern ScriptInputsOutputs scriptInputsOutputs[MAX_SCRIPTS];
+2 -9
View File
@@ -21,15 +21,7 @@
#include "lcd.h"
#include "simulcd.h"
// #if defined(SIMU)
// extern pixel_t displayBuf[DISPLAY_BUFFER_SIZE];
// #else
// #define displayBuf lcd->getData()
// #endif
// #define DISPLAY_END (displayBuf + DISPLAY_BUFFER_SIZE)
// #define ASSERT_IN_DISPLAY(p) assert((p) >= displayBuf && (p) < DISPLAY_END)
#if defined(COLORLCD)
BitmapBuffer _lcd(BMP_RGB565, LCD_W, LCD_H, displayBuf);
BitmapBuffer * lcd = &_lcd;
@@ -106,3 +98,4 @@ void DMABitmapConvert(uint16_t * dest, const uint8_t * src, uint16_t w, uint16_t
}
}
}
#endif