Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
marlin-anet-a8
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jonas Leder
marlin-anet-a8
Commits
4ace981b
Commit
4ace981b
authored
4 years ago
by
Scott Lahteine
Browse files
Options
Downloads
Patches
Plain Diff
Clean up preheat edit items
parent
859ccd2e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Marlin/src/inc/SanityCheck.h
+1
-1
1 addition, 1 deletion
Marlin/src/inc/SanityCheck.h
Marlin/src/lcd/menu/menu_temperature.cpp
+14
-15
14 additions, 15 deletions
Marlin/src/lcd/menu/menu_temperature.cpp
with
15 additions
and
16 deletions
Marlin/src/inc/SanityCheck.h
+
1
−
1
View file @
4ace981b
...
...
@@ -1646,7 +1646,7 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal
// Pins are required for heaters
#if ENABLED(HEATER_0_USES_MAX6675) && !PIN_EXISTS(MAX6675_SS)
#error "MAX6675_SS_PIN (required for TEMP_SENSOR_0) not defined for this board."
#elif HOTEND
S
&& !HAS_TEMP_HOTEND
#elif
HAS_
HOTEND && !HAS_TEMP_HOTEND
#error "TEMP_0_PIN (required for TEMP_SENSOR_0) not defined for this board."
#elif EITHER(HAS_MULTI_HOTEND, HEATERS_PARALLEL) && !HAS_HEATER_1
#error "HEATER_1_PIN not defined for this board."
...
...
This diff is collapsed.
Click to expand it.
Marlin/src/lcd/menu/menu_temperature.cpp
+
14
−
15
View file @
4ace981b
...
...
@@ -79,32 +79,35 @@ void Temperature::lcd_preheat(const int16_t e, const int8_t indh, const int8_t i
#if HAS_TEMP_HOTEND || HAS_HEATED_BED
#if HAS_TEMP_HOTEND && HAS_HEATED_BED
#define _PREHEAT_ITEMS(M,E) do{ \
// Indexed "Preheat ABC" and "Heat Bed" items
#define PREHEAT_ITEMS(M,E) do{ \
ACTION_ITEM_N_P(E, msg_preheat_h[M], []{ _preheat_both(M, MenuItemBase::itemIndex); }); \
ACTION_ITEM_N_P(E, msg_preheat_end_e[M], []{ _preheat_end(M, MenuItemBase::itemIndex); }); \
}while(0)
#if HAS_MULTI_HOTEND
#define PREHEAT_ITEMS(M,E) _PREHEAT_ITEMS(M,E)
#endif
#elif HAS_MULTI_HOTEND
// No heated bed, so just indexed "Preheat ABC" items
#define PREHEAT_ITEMS(M,E) ACTION_ITEM_N_P(E, msg_preheat_h[M], []{ _preheat_end(M, MenuItemBase::itemIndex); })
#endif
void
menu_preheat_m
(
const
uint8_t
m
)
{
#if HOTENDS == 1
PGM_P
msg_preheat
[]
=
ARRAY_N
(
PREHEAT_COUNT
,
GET_TEXT
(
MSG_PREHEAT_1
),
GET_TEXT
(
MSG_PREHEAT_2
),
GET_TEXT
(
MSG_PREHEAT_3
),
GET_TEXT
(
MSG_PREHEAT_4
),
GET_TEXT
(
MSG_PREHEAT_5
));
PGM_P
msg_preheat_end
[]
=
ARRAY_N
(
PREHEAT_COUNT
,
GET_TEXT
(
MSG_PREHEAT_1_END
),
GET_TEXT
(
MSG_PREHEAT_2_END
),
GET_TEXT
(
MSG_PREHEAT_3_END
),
GET_TEXT
(
MSG_PREHEAT_4_END
),
GET_TEXT
(
MSG_PREHEAT_5_END
));
PGM_P
msg_preheat
[]
=
ARRAY_N
(
PREHEAT_COUNT
,
GET_TEXT
(
MSG_PREHEAT_1
),
GET_TEXT
(
MSG_PREHEAT_2
),
GET_TEXT
(
MSG_PREHEAT_3
),
GET_TEXT
(
MSG_PREHEAT_4
),
GET_TEXT
(
MSG_PREHEAT_5
));
PGM_P
msg_preheat_end
[]
=
ARRAY_N
(
PREHEAT_COUNT
,
GET_TEXT
(
MSG_PREHEAT_1_END
),
GET_TEXT
(
MSG_PREHEAT_2_END
),
GET_TEXT
(
MSG_PREHEAT_3_END
),
GET_TEXT
(
MSG_PREHEAT_4_END
),
GET_TEXT
(
MSG_PREHEAT_5_END
));
#elif HAS_MULTI_HOTEND
PGM_P
msg_preheat_all
[]
=
ARRAY_N
(
PREHEAT_COUNT
,
GET_TEXT
(
MSG_PREHEAT_1_ALL
),
GET_TEXT
(
MSG_PREHEAT_2_ALL
),
GET_TEXT
(
MSG_PREHEAT_3_ALL
),
GET_TEXT
(
MSG_PREHEAT_4_ALL
),
GET_TEXT
(
MSG_PREHEAT_5_ALL
));
PGM_P
msg_preheat_all
[]
=
ARRAY_N
(
PREHEAT_COUNT
,
GET_TEXT
(
MSG_PREHEAT_1_ALL
),
GET_TEXT
(
MSG_PREHEAT_2_ALL
),
GET_TEXT
(
MSG_PREHEAT_3_ALL
),
GET_TEXT
(
MSG_PREHEAT_4_ALL
),
GET_TEXT
(
MSG_PREHEAT_5_ALL
));
#endif
#if HAS_TEMP_HOTEND && HAS_HEATED_BED && HAS_MULTI_HOTEND
PGM_P
msg_preheat_end_e
[]
=
ARRAY_N
(
PREHEAT_COUNT
,
GET_TEXT
(
MSG_PREHEAT_1_END_E
),
GET_TEXT
(
MSG_PREHEAT_2_END_E
),
GET_TEXT
(
MSG_PREHEAT_3_END_E
),
GET_TEXT
(
MSG_PREHEAT_4_END_E
),
GET_TEXT
(
MSG_PREHEAT_5_END_E
));
#endif
PGM_P
msg_preheat_end_e
[]
=
ARRAY_N
(
PREHEAT_COUNT
,
GET_TEXT
(
MSG_PREHEAT_1_END_E
),
GET_TEXT
(
MSG_PREHEAT_2_END_E
),
GET_TEXT
(
MSG_PREHEAT_3_END_E
),
GET_TEXT
(
MSG_PREHEAT_4_END_E
),
GET_TEXT
(
MSG_PREHEAT_5_END_E
));
#if HAS_MULTI_HOTEND
PGM_P
msg_preheat_h
[]
=
ARRAY_N
(
PREHEAT_COUNT
,
GET_TEXT
(
MSG_PREHEAT_1_H
),
GET_TEXT
(
MSG_PREHEAT_2_H
),
GET_TEXT
(
MSG_PREHEAT_3_H
),
GET_TEXT
(
MSG_PREHEAT_4_H
),
GET_TEXT
(
MSG_PREHEAT_5_H
));
PGM_P
msg_preheat_h
[]
=
ARRAY_N
(
PREHEAT_COUNT
,
GET_TEXT
(
MSG_PREHEAT_1_H
),
GET_TEXT
(
MSG_PREHEAT_2_H
),
GET_TEXT
(
MSG_PREHEAT_3_H
),
GET_TEXT
(
MSG_PREHEAT_4_H
),
GET_TEXT
(
MSG_PREHEAT_5_H
));
#endif
MenuItemBase
::
itemIndex
=
m
;
...
...
@@ -123,11 +126,7 @@ void Temperature::lcd_preheat(const int16_t e, const int8_t indh, const int8_t i
#elif HAS_MULTI_HOTEND
#if HAS_HEATED_BED
_PREHEAT_ITEMS
(
MenuItemBase
::
itemIndex
,
0
);
#endif
LOOP_S_L_N
(
n
,
1
,
HOTENDS
)
PREHEAT_ITEMS
(
MenuItemBase
::
itemIndex
,
n
);
LOOP_S_L_N
(
n
,
0
,
HOTENDS
)
PREHEAT_ITEMS
(
MenuItemBase
::
itemIndex
,
n
);
ACTION_ITEM_P
(
msg_preheat_all
[
m
],
[]()
{
TERN_
(
HAS_HEATED_BED
,
_preheat_bed
(
MenuItemBase
::
itemIndex
));
HOTEND_LOOP
()
thermalManager
.
setTargetHotend
(
ui
.
material_preset
[
MenuItemBase
::
itemIndex
].
hotend_temp
,
e
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment