0
0
Fork 0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2025-01-19 08:08:25 +00:00

📺 DGUS_RELOADED 1.03 (#25490)

This commit is contained in:
Neo2003 2023-03-13 22:55:03 +01:00 committed by GitHub
parent db2b8a695d
commit 9039e99df1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 18 deletions

View file

@ -3044,7 +3044,7 @@
* - Product: https://www.aliexpress.com/item/1005002008179262.html
*
* RELOADED (T5UID1)
* - Download https://github.com/Desuuuu/DGUS-reloaded/releases
* - Download https://github.com/Neo2003/DGUS-reloaded/releases
* - Copy the downloaded DWIN_SET folder to the SD card.
*
* IA_CREALITY (T5UID1)

View file

@ -180,12 +180,9 @@
#endif // SDSUPPORT
void DGUSTxHandler::PositionZ(DGUS_VP &vp) {
float position = ExtUI::isAxisPositionKnown(ExtUI::Z) ?
planner.get_axis_position_mm(Z_AXIS)
: 0;
const int16_t data = dgus_display.ToFixedPoint<float, int16_t, 1>(position);
dgus_display.Write((uint16_t)vp.addr, Swap16(data));
const float position = ExtUI::isAxisPositionKnown(ExtUI::Z) ? planner.get_axis_position_mm(Z_AXIS) : 0;
const int32_t data = dgus_display.ToFixedPoint<float, int32_t, 2>(int32_t(position * 50.0f) / 50.0f); // Round to 0.02
dgus_display.Write((uint16_t)vp.addr, dgus_display.SwapBytes(data));
}
void DGUSTxHandler::Elapsed(DGUS_VP &vp) {

View file

@ -107,10 +107,9 @@ enum class DGUS_Addr : uint16_t {
SD_FileName4 = 0x30A5, // 0x30A5 - 0x30C4
SD_ScrollIcons = 0x30C5, // Bits: DGUS_Data::ScrollIcon
SD_SelectedFileName = 0x30C6, // 0x30C6 - 0x30E5
STATUS_PositionZ = 0x30E6, // Type: Fixed point, 1 decimal (16 bits signed)
STATUS_Elapsed = 0x30E7, // 0x30E7 - 0x30F5
STATUS_Percent = 0x30F6, // Type: Integer (16 bits unsigned)
STATUS_Icons = 0x30F7, // Bits: DGUS_Data::StatusIcon
STATUS_PositionZ = 0x30E6, // Type: Fixed point, 2 decimal (32 bits signed)
STATUS_Elapsed = 0x30E8, // 0x30E8 - 0x30F6
STATUS_Percent = 0x30F7, // Type: Integer (16 bits unsigned)
ADJUST_Feedrate = 0x30F8, // Type: Integer (16 bits signed)
ADJUST_Flowrate_CUR = 0x30F9, // Type: Integer (16 bits signed)
#if HAS_MULTI_EXTRUDER
@ -120,11 +119,11 @@ enum class DGUS_Addr : uint16_t {
TEMP_Current_Bed = 0x30FC, // Type: Integer (16 bits signed)
TEMP_Target_Bed = 0x30FD, // Type: Integer (16 bits signed)
TEMP_Max_Bed = 0x30FE, // Type: Integer (16 bits unsigned)
TEMP_Current_H0 = 0x30FF, // Type: Integer (16 bits signed)
TEMP_Current_H0 = 0x30FF, // Type: Fixed point, 1 decimal (16 bits signed)
TEMP_Target_H0 = 0x3100, // Type: Integer (16 bits signed)
TEMP_Max_H0 = 0x3101, // Type: Integer (16 bits unsigned)
#if HAS_MULTI_HOTEND
TEMP_Current_H1 = 0x3102, // Type: Integer (16 bits signed)
TEMP_Current_H1 = 0x3102, // Type: Fixed point, 1 decimal (16 bits signed)
TEMP_Target_H1 = 0x3103, // Type: Integer (16 bits signed)
TEMP_Max_H1 = 0x3104, // Type: Integer (16 bits unsigned)
#endif
@ -156,6 +155,7 @@ enum class DGUS_Addr : uint16_t {
INFOS_LongestPrint = 0x318D, // 0x318D - 0x31A4
INFOS_FilamentUsed = 0x31A5, // 0x31A5 - 0x31BC
WAIT_Icons = 0x31BD, // Bits: DGUS_Data::WaitIcon
STATUS_Icons = 0x31BE, // Bits: DGUS_Data::StatusIcon
// READ-WRITE VARIABLES

View file

@ -116,8 +116,7 @@ const struct DGUS_VP vp_list[] PROGMEM = {
VP_HELPER_RX(DGUS_Addr::LEVEL_MANUAL_Point, &DGUSRxHandler::MoveToPoint),
VP_HELPER_RX_NODATA(DGUS_Addr::LEVEL_AUTO_Probe, &DGUSRxHandler::Probe),
VP_HELPER_RX_NODATA(DGUS_Addr::LEVEL_AUTO_Disable,
&DGUSRxHandler::DisableABL),
VP_HELPER_RX_NODATA(DGUS_Addr::LEVEL_AUTO_Disable, &DGUSRxHandler::DisableABL),
VP_HELPER_RX(DGUS_Addr::FILAMENT_Select, &DGUSRxHandler::FilamentSelect),
VP_HELPER_RX(DGUS_Addr::FILAMENT_SetLength, &DGUSRxHandler::FilamentLength),
@ -205,14 +204,14 @@ const struct DGUS_VP vp_list[] PROGMEM = {
VP_HELPER_TX_AUTO(DGUS_Addr::TEMP_Current_Bed,
&thermalManager.temp_bed.celsius,
&DGUSTxHandler::ExtraToInteger<float>),
(&DGUSTxHandler::ExtraToFixedPoint<float, 1>)),
VP_HELPER_TX_AUTO(DGUS_Addr::TEMP_Target_Bed,
&thermalManager.temp_bed.target,
&DGUSTxHandler::ExtraToInteger<int16_t>),
VP_HELPER_TX(DGUS_Addr::TEMP_Max_Bed, &DGUSTxHandler::TempMax),
VP_HELPER_TX_AUTO(DGUS_Addr::TEMP_Current_H0,
&thermalManager.temp_hotend[ExtUI::heater_t::H0].celsius,
&DGUSTxHandler::ExtraToInteger<float>),
(&DGUSTxHandler::ExtraToFixedPoint<float, 1>)),
VP_HELPER_TX_AUTO(DGUS_Addr::TEMP_Target_H0,
&thermalManager.temp_hotend[ExtUI::heater_t::H0].target,
&DGUSTxHandler::ExtraToInteger<int16_t>),
@ -220,7 +219,7 @@ const struct DGUS_VP vp_list[] PROGMEM = {
#if HAS_MULTI_HOTEND
VP_HELPER_TX_AUTO(DGUS_Addr::TEMP_Current_H1,
&thermalManager.temp_hotend[ExtUI::heater_t::H1].celsius,
&DGUSTxHandler::ExtraToInteger<float>),
(&DGUSTxHandler::ExtraToFixedPoint<float, 1>)),
VP_HELPER_TX_AUTO(DGUS_Addr::TEMP_Target_H1,
&thermalManager.temp_hotend[ExtUI::heater_t::H1].target,
&DGUSTxHandler::ExtraToInteger<int16_t>),