Use configuration website, fix edit color

This commit is contained in:
InsanityAutomation 2021-02-10 07:34:37 -05:00 committed by Scott Lahteine
parent ba4ce63858
commit ca79af7a46

View File

@ -88,11 +88,8 @@
#ifndef MACHINE_SIZE #ifndef MACHINE_SIZE
#define MACHINE_SIZE STRINGIFY(X_BED_SIZE) "x" STRINGIFY(Y_BED_SIZE) "x" STRINGIFY(Z_MAX_POS) #define MACHINE_SIZE STRINGIFY(X_BED_SIZE) "x" STRINGIFY(Y_BED_SIZE) "x" STRINGIFY(Z_MAX_POS)
#endif #endif
#ifndef CORP_WEBSITE_C #ifndef CORP_WEBSITE
#define CORP_WEBSITE_C "www.cxsw3d.com" #define CORP_WEBSITE WEBSITE_URL
#endif
#ifndef CORP_WEBSITE_E
#define CORP_WEBSITE_E "www.creality.com"
#endif #endif
#define PAUSE_HEAT #define PAUSE_HEAT
@ -1232,7 +1229,7 @@ void HMI_Move_X() {
} }
LIMIT(HMI_ValueStruct.Move_X_scaled, (X_MIN_POS) * MINUNITMULT, (X_MAX_POS) * MINUNITMULT); LIMIT(HMI_ValueStruct.Move_X_scaled, (X_MIN_POS) * MINUNITMULT, (X_MAX_POS) * MINUNITMULT);
current_position.x = HMI_ValueStruct.Move_X_scaled / MINUNITMULT; current_position.x = HMI_ValueStruct.Move_X_scaled / MINUNITMULT;
DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, UNITFDIGITS, 216, MBASE(1), HMI_ValueStruct.Move_X_scaled); DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 216, MBASE(1), HMI_ValueStruct.Move_X_scaled);
DWIN_UpdateLCD(); DWIN_UpdateLCD();
} }
} }
@ -1254,7 +1251,7 @@ void HMI_Move_Y() {
} }
LIMIT(HMI_ValueStruct.Move_Y_scaled, (Y_MIN_POS) * MINUNITMULT, (Y_MAX_POS) * MINUNITMULT); LIMIT(HMI_ValueStruct.Move_Y_scaled, (Y_MIN_POS) * MINUNITMULT, (Y_MAX_POS) * MINUNITMULT);
current_position.y = HMI_ValueStruct.Move_Y_scaled / MINUNITMULT; current_position.y = HMI_ValueStruct.Move_Y_scaled / MINUNITMULT;
DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, UNITFDIGITS, 216, MBASE(2), HMI_ValueStruct.Move_Y_scaled); DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 216, MBASE(2), HMI_ValueStruct.Move_Y_scaled);
DWIN_UpdateLCD(); DWIN_UpdateLCD();
} }
} }
@ -1276,7 +1273,7 @@ void HMI_Move_Z() {
} }
LIMIT(HMI_ValueStruct.Move_Z_scaled, Z_MIN_POS * MINUNITMULT, Z_MAX_POS * MINUNITMULT); LIMIT(HMI_ValueStruct.Move_Z_scaled, Z_MIN_POS * MINUNITMULT, Z_MAX_POS * MINUNITMULT);
current_position.z = HMI_ValueStruct.Move_Z_scaled / MINUNITMULT; current_position.z = HMI_ValueStruct.Move_Z_scaled / MINUNITMULT;
DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, UNITFDIGITS, 216, MBASE(3), HMI_ValueStruct.Move_Z_scaled); DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 216, MBASE(3), HMI_ValueStruct.Move_Z_scaled);
DWIN_UpdateLCD(); DWIN_UpdateLCD();
} }
} }
@ -1304,7 +1301,7 @@ void HMI_Move_Z() {
else if ((last_E_scaled - HMI_ValueStruct.Move_E_scaled) > (EXTRUDE_MAXLENGTH) * MINUNITMULT) else if ((last_E_scaled - HMI_ValueStruct.Move_E_scaled) > (EXTRUDE_MAXLENGTH) * MINUNITMULT)
HMI_ValueStruct.Move_E_scaled = last_E_scaled - (EXTRUDE_MAXLENGTH) * MINUNITMULT; HMI_ValueStruct.Move_E_scaled = last_E_scaled - (EXTRUDE_MAXLENGTH) * MINUNITMULT;
current_position.e = HMI_ValueStruct.Move_E_scaled / MINUNITMULT; current_position.e = HMI_ValueStruct.Move_E_scaled / MINUNITMULT;
DWIN_Draw_Signed_Float(font8x16, Select_Color, 3, UNITFDIGITS, 216, MBASE(4), HMI_ValueStruct.Move_E_scaled); DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 3, UNITFDIGITS, 216, MBASE(4), HMI_ValueStruct.Move_E_scaled);
DWIN_UpdateLCD(); DWIN_UpdateLCD();
} }
} }
@ -1983,7 +1980,6 @@ void Draw_Info_Menu() {
DWIN_Frame_AreaCopy(1, 197, 149, 252, 161, 108, 102); DWIN_Frame_AreaCopy(1, 197, 149, 252, 161, 108, 102);
DWIN_Frame_AreaCopy(1, 1, 164, 56, 176, 108, 175); DWIN_Frame_AreaCopy(1, 1, 164, 56, 176, 108, 175);
DWIN_Frame_AreaCopy(1, 58, 164, 113, 176, 105, 248); DWIN_Frame_AreaCopy(1, 58, 164, 113, 176, 105, 248);
DWIN_Draw_String(false, false, font8x16, Color_White, Color_Bg_Black, (DWIN_WIDTH - strlen(CORP_WEBSITE_C) * MENU_CHR_W) / 2, 268, F(CORP_WEBSITE_C));
} }
else { else {
#ifdef USE_STRING_HEADINGS #ifdef USE_STRING_HEADINGS
@ -1995,8 +1991,8 @@ void Draw_Info_Menu() {
DWIN_Frame_AreaCopy(1, 120, 150, 146, 161, 124, 102); DWIN_Frame_AreaCopy(1, 120, 150, 146, 161, 124, 102);
DWIN_Frame_AreaCopy(1, 146, 151, 254, 161, 82, 175); DWIN_Frame_AreaCopy(1, 146, 151, 254, 161, 82, 175);
DWIN_Frame_AreaCopy(1, 0, 165, 94, 175, 89, 248); DWIN_Frame_AreaCopy(1, 0, 165, 94, 175, 89, 248);
DWIN_Draw_String(false, false, font8x16, Color_White, Color_Bg_Black, (DWIN_WIDTH - strlen(CORP_WEBSITE_E) * MENU_CHR_W) / 2, 268, F(CORP_WEBSITE_E));
} }
DWIN_Draw_String(false, false, font8x16, Color_White, Color_Bg_Black, (DWIN_WIDTH - strlen(CORP_WEBSITE) * MENU_CHR_W) / 2, 268, F(CORP_WEBSITE));
Draw_Back_First(); Draw_Back_First();
LOOP_L_N(i, 3) { LOOP_L_N(i, 3) {