Multi-platform DWIN_CREALITY_LCD support (#20738)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
a26f2fb00b
commit
7f3dcb3e8a
@ -497,14 +497,21 @@ inline void Draw_Back_First(const bool is_sel=true) {
|
||||
if (is_sel) Draw_Menu_Cursor(0);
|
||||
}
|
||||
|
||||
inline bool Apply_Encoder(const ENCODER_DiffState &encoder_diffState, auto &valref) {
|
||||
if (encoder_diffState == ENCODER_DIFF_CW)
|
||||
valref += EncoderRate.encoderMoveValue;
|
||||
else if (encoder_diffState == ENCODER_DIFF_CCW)
|
||||
valref -= EncoderRate.encoderMoveValue;
|
||||
else if (encoder_diffState == ENCODER_DIFF_ENTER)
|
||||
return true;
|
||||
#define APPLY_ENCODER_F \
|
||||
if (encoder_diffState == ENCODER_DIFF_CW) \
|
||||
valref += EncoderRate.encoderMoveValue; \
|
||||
else if (encoder_diffState == ENCODER_DIFF_CCW) \
|
||||
valref -= EncoderRate.encoderMoveValue; \
|
||||
else if (encoder_diffState == ENCODER_DIFF_ENTER) \
|
||||
return true; \
|
||||
return false;
|
||||
|
||||
inline bool Apply_Encoder(const ENCODER_DiffState &encoder_diffState, int16_t &valref) {
|
||||
APPLY_ENCODER_F
|
||||
}
|
||||
|
||||
inline bool Apply_Encoder(const ENCODER_DiffState &encoder_diffState, float &valref) {
|
||||
APPLY_ENCODER_F
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -249,7 +249,8 @@ typedef struct {
|
||||
float Move_E_scale = 0;
|
||||
#endif
|
||||
float offset_value = 0;
|
||||
char show_mode = 0; // -1: Temperature control 0: Printing temperature
|
||||
TERN_(__STM32F1__, signed)
|
||||
char show_mode = 0; // -1: Temperature control 0: Printing temperature
|
||||
} HMI_value_t;
|
||||
|
||||
#define DWIN_CHINESE 123
|
||||
|
Reference in New Issue
Block a user