Skip to content

Commit 39595d1

Browse files
Neo2003dwzg
authored andcommitted
📺 DGUS_RELOADED 1.03 (MarlinFirmware#25490)
1 parent 7e67fb2 commit 39595d1

File tree

4 files changed

+14
-18
lines changed

4 files changed

+14
-18
lines changed

Marlin/Configuration.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3061,7 +3061,7 @@
30613061
* - Product: https://www.aliexpress.com/item/1005002008179262.html
30623062
*
30633063
* RELOADED (T5UID1)
3064-
* - Download https://github.com/Desuuuu/DGUS-reloaded/releases
3064+
* - Download https://github.com/Neo2003/DGUS-reloaded/releases
30653065
* - Copy the downloaded DWIN_SET folder to the SD card.
30663066
*
30673067
* IA_CREALITY (T5UID1)

Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -180,12 +180,9 @@
180180
#endif // SDSUPPORT
181181

182182
void DGUSTxHandler::PositionZ(DGUS_VP &vp) {
183-
float position = ExtUI::isAxisPositionKnown(ExtUI::Z) ?
184-
planner.get_axis_position_mm(Z_AXIS)
185-
: 0;
186-
187-
const int16_t data = dgus_display.ToFixedPoint<float, int16_t, 1>(position);
188-
dgus_display.Write((uint16_t)vp.addr, Swap16(data));
183+
const float position = ExtUI::isAxisPositionKnown(ExtUI::Z) ? planner.get_axis_position_mm(Z_AXIS) : 0;
184+
const int32_t data = dgus_display.ToFixedPoint<float, int32_t, 2>(int32_t(position * 50.0f) / 50.0f); // Round to 0.02
185+
dgus_display.Write((uint16_t)vp.addr, dgus_display.SwapBytes(data));
189186
}
190187

191188
void DGUSTxHandler::Elapsed(DGUS_VP &vp) {

Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Addr.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,9 @@ enum class DGUS_Addr : uint16_t {
107107
SD_FileName4 = 0x30A5, // 0x30A5 - 0x30C4
108108
SD_ScrollIcons = 0x30C5, // Bits: DGUS_Data::ScrollIcon
109109
SD_SelectedFileName = 0x30C6, // 0x30C6 - 0x30E5
110-
STATUS_PositionZ = 0x30E6, // Type: Fixed point, 1 decimal (16 bits signed)
111-
STATUS_Elapsed = 0x30E7, // 0x30E7 - 0x30F5
112-
STATUS_Percent = 0x30F6, // Type: Integer (16 bits unsigned)
113-
STATUS_Icons = 0x30F7, // Bits: DGUS_Data::StatusIcon
110+
STATUS_PositionZ = 0x30E6, // Type: Fixed point, 2 decimal (32 bits signed)
111+
STATUS_Elapsed = 0x30E8, // 0x30E8 - 0x30F6
112+
STATUS_Percent = 0x30F7, // Type: Integer (16 bits unsigned)
114113
ADJUST_Feedrate = 0x30F8, // Type: Integer (16 bits signed)
115114
ADJUST_Flowrate_CUR = 0x30F9, // Type: Integer (16 bits signed)
116115
#if HAS_MULTI_EXTRUDER
@@ -120,11 +119,11 @@ enum class DGUS_Addr : uint16_t {
120119
TEMP_Current_Bed = 0x30FC, // Type: Integer (16 bits signed)
121120
TEMP_Target_Bed = 0x30FD, // Type: Integer (16 bits signed)
122121
TEMP_Max_Bed = 0x30FE, // Type: Integer (16 bits unsigned)
123-
TEMP_Current_H0 = 0x30FF, // Type: Integer (16 bits signed)
122+
TEMP_Current_H0 = 0x30FF, // Type: Fixed point, 1 decimal (16 bits signed)
124123
TEMP_Target_H0 = 0x3100, // Type: Integer (16 bits signed)
125124
TEMP_Max_H0 = 0x3101, // Type: Integer (16 bits unsigned)
126125
#if HAS_MULTI_HOTEND
127-
TEMP_Current_H1 = 0x3102, // Type: Integer (16 bits signed)
126+
TEMP_Current_H1 = 0x3102, // Type: Fixed point, 1 decimal (16 bits signed)
128127
TEMP_Target_H1 = 0x3103, // Type: Integer (16 bits signed)
129128
TEMP_Max_H1 = 0x3104, // Type: Integer (16 bits unsigned)
130129
#endif
@@ -156,6 +155,7 @@ enum class DGUS_Addr : uint16_t {
156155
INFOS_LongestPrint = 0x318D, // 0x318D - 0x31A4
157156
INFOS_FilamentUsed = 0x31A5, // 0x31A5 - 0x31BC
158157
WAIT_Icons = 0x31BD, // Bits: DGUS_Data::WaitIcon
158+
STATUS_Icons = 0x31BE, // Bits: DGUS_Data::StatusIcon
159159

160160
// READ-WRITE VARIABLES
161161

Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VPList.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,7 @@ const struct DGUS_VP vp_list[] PROGMEM = {
116116
VP_HELPER_RX(DGUS_Addr::LEVEL_MANUAL_Point, &DGUSRxHandler::MoveToPoint),
117117

118118
VP_HELPER_RX_NODATA(DGUS_Addr::LEVEL_AUTO_Probe, &DGUSRxHandler::Probe),
119-
VP_HELPER_RX_NODATA(DGUS_Addr::LEVEL_AUTO_Disable,
120-
&DGUSRxHandler::DisableABL),
119+
VP_HELPER_RX_NODATA(DGUS_Addr::LEVEL_AUTO_Disable, &DGUSRxHandler::DisableABL),
121120

122121
VP_HELPER_RX(DGUS_Addr::FILAMENT_Select, &DGUSRxHandler::FilamentSelect),
123122
VP_HELPER_RX(DGUS_Addr::FILAMENT_SetLength, &DGUSRxHandler::FilamentLength),
@@ -205,22 +204,22 @@ const struct DGUS_VP vp_list[] PROGMEM = {
205204

206205
VP_HELPER_TX_AUTO(DGUS_Addr::TEMP_Current_Bed,
207206
&thermalManager.temp_bed.celsius,
208-
&DGUSTxHandler::ExtraToInteger<float>),
207+
(&DGUSTxHandler::ExtraToFixedPoint<float, 1>)),
209208
VP_HELPER_TX_AUTO(DGUS_Addr::TEMP_Target_Bed,
210209
&thermalManager.temp_bed.target,
211210
&DGUSTxHandler::ExtraToInteger<int16_t>),
212211
VP_HELPER_TX(DGUS_Addr::TEMP_Max_Bed, &DGUSTxHandler::TempMax),
213212
VP_HELPER_TX_AUTO(DGUS_Addr::TEMP_Current_H0,
214213
&thermalManager.temp_hotend[ExtUI::heater_t::H0].celsius,
215-
&DGUSTxHandler::ExtraToInteger<float>),
214+
(&DGUSTxHandler::ExtraToFixedPoint<float, 1>)),
216215
VP_HELPER_TX_AUTO(DGUS_Addr::TEMP_Target_H0,
217216
&thermalManager.temp_hotend[ExtUI::heater_t::H0].target,
218217
&DGUSTxHandler::ExtraToInteger<int16_t>),
219218
VP_HELPER_TX(DGUS_Addr::TEMP_Max_H0, &DGUSTxHandler::TempMax),
220219
#if HAS_MULTI_HOTEND
221220
VP_HELPER_TX_AUTO(DGUS_Addr::TEMP_Current_H1,
222221
&thermalManager.temp_hotend[ExtUI::heater_t::H1].celsius,
223-
&DGUSTxHandler::ExtraToInteger<float>),
222+
(&DGUSTxHandler::ExtraToFixedPoint<float, 1>)),
224223
VP_HELPER_TX_AUTO(DGUS_Addr::TEMP_Target_H1,
225224
&thermalManager.temp_hotend[ExtUI::heater_t::H1].target,
226225
&DGUSTxHandler::ExtraToInteger<int16_t>),

0 commit comments

Comments
 (0)