Skip to content

Commit

Permalink
Fix to pass Github checks
Browse files Browse the repository at this point in the history
Add conditional directive for touch.h
  • Loading branch information
lukasradek committed Apr 7, 2023
1 parent 336374f commit 9b92dfa
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
9 changes: 7 additions & 2 deletions Marlin/src/lcd/tft/tft.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@
#include "tft_string.h"
#include "tft_image.h"
#include "../tft_io/tft_io.h"
#include "touch.h"

#if ENABLED(TOUCH_SCREEN)
#include "touch.h"
#endif

#include "../../inc/MarlinConfig.h"

Expand Down Expand Up @@ -87,7 +90,9 @@ class TFT {
static void add_bar(uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint16_t color) { queue.add_bar(x, y, width, height, color); }
static void add_rectangle(uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint16_t color) { queue.add_rectangle(x, y, width, height, color); }
static void draw_edit_screen_buttons(bool mode_keypad = false);
static void drawSimpleBtn(const char *label, uint16_t x, uint16_t y, uint16_t w, uint16_t h, uint16_t color, uint16_t colorTxt, BTN_STYLE style, bool selected, TouchControlType touchType = BUTTON, intptr_t data = 0, int32_t index = 0);
#if ENABLED(TOUCH_SCREEN)
static void drawSimpleBtn(const char *label, uint16_t x, uint16_t y, uint16_t w, uint16_t h, uint16_t color, uint16_t colorTxt, BTN_STYLE style, bool selected, TouchControlType touchType = BUTTON, intptr_t data = 0, int32_t index = 0);
#endif
};

extern TFT tft;
2 changes: 1 addition & 1 deletion Marlin/src/lcd/tft/touch.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ enum TouchControlType : uint16_t {
MOVE_AXIS,
STOP,
BUTTON,
CALLBACK,
CALLBACK
};

typedef void (*screenFunc_t)();
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/lcd/tft/ui_1024x600.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ void MenuEditItemBase::draw_edit_screen(FSTR_P const fstr, const char * const va
tft.draw_edit_screen_buttons();
}

void TFT::draw_edit_screen_buttons() {
void TFT::draw_edit_screen_buttons(bool mode_keypad) {
#if ENABLED(TOUCH_SCREEN)
add_control(164, TFT_HEIGHT - 64, DECREASE, imgDecrease);
add_control(796, TFT_HEIGHT - 64, INCREASE, imgIncrease);
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/lcd/tft/ui_480x320.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ void MenuEditItemBase::draw_edit_screen(FSTR_P const fstr, const char * const va
tft.draw_edit_screen_buttons();
}

void TFT::draw_edit_screen_buttons() {
void TFT::draw_edit_screen_buttons(bool mode_keyboard) {
#if ENABLED(TOUCH_SCREEN)
add_control(64, TFT_HEIGHT - 64, DECREASE, imgDecrease);
add_control(352, TFT_HEIGHT - 64, INCREASE, imgIncrease);
Expand Down

0 comments on commit 9b92dfa

Please sign in to comment.