Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
MarlinKimbra
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
machinery
MarlinKimbra
Commits
63ef2d1c
Commit
63ef2d1c
authored
Mar 17, 2016
by
MagoKimbra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix
Nextion GFX for DELTA
parent
d11d187d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
22 deletions
+38
-22
Boards.h
MK/Boards.h
+1
-1
MK_Main.cpp
MK/module/MK_Main.cpp
+29
-17
ultralcd_implementation_hitachi_HD44780.h
MK/module/lcd/ultralcd_implementation_hitachi_HD44780.h
+1
-1
stepper.cpp
MK/module/motion/stepper.cpp
+2
-2
Nextion_lcd.cpp
MK/module/nextion/Nextion_lcd.cpp
+5
-1
No files found.
MK/Boards.h
View file @
63ef2d1c
...
@@ -99,7 +99,7 @@
...
@@ -99,7 +99,7 @@
#define BOARD_DUEMILANOVE_328P 4 // Duemilanove w/ ATMega328P pin assignments
#define BOARD_DUEMILANOVE_328P 4 // Duemilanove w/ ATMega328P pin assignments
#define BOARD_MKS_BASE 40 // MKS BASE 1.0
#define BOARD_MKS_BASE 40 // MKS BASE 1.0
#define BOARD_MKS_MINI 41 // MKS MINI 1.0
#define BOARD_MKS_MINI 41 // MKS MINI 1.0
#define BOARD_RADDS 40
2
// RADDS ARM 32
#define BOARD_RADDS 40
1
// RADDS ARM 32
#define BOARD_RAMPS_FD_V1 403 // RAMPS-FD V1 ARM 32
#define BOARD_RAMPS_FD_V1 403 // RAMPS-FD V1 ARM 32
#define BOARD_RAMPS_FD_V2 404 // RAMPS-FD V2 ARM 32
#define BOARD_RAMPS_FD_V2 404 // RAMPS-FD V2 ARM 32
#define BOARD_SMART_RAMPS 408 // SMART RAMPS ARM 32
#define BOARD_SMART_RAMPS 408 // SMART RAMPS ARM 32
...
...
MK/module/MK_Main.cpp
View file @
63ef2d1c
...
@@ -2875,10 +2875,17 @@ void gcode_get_destination() {
...
@@ -2875,10 +2875,17 @@ void gcode_get_destination() {
#endif
#endif
#if ENABLED(NEXTION) && ENABLED(NEXTION_GFX)
#if ENABLED(NEXTION) && ENABLED(NEXTION_GFX)
if
((
code_seen
(
axis_codes
[
X_AXIS
])
||
code_seen
(
axis_codes
[
Y_AXIS
]))
&&
code_seen
(
axis_codes
[
E_AXIS
]))
#if MECH(DELTA)
gfx_line_to
(
destination
[
X_AXIS
],
destination
[
Y_AXIS
],
destination
[
Z_AXIS
]);
if
((
code_seen
(
axis_codes
[
X_AXIS
])
||
code_seen
(
axis_codes
[
Y_AXIS
]))
&&
code_seen
(
axis_codes
[
E_AXIS
]))
else
gfx_line_to
(
destination
[
X_AXIS
]
+
(
X_MAX_POS
),
destination
[
Y_AXIS
]
+
(
Y_MAX_POS
),
destination
[
Z_AXIS
]);
gfx_cursor_to
(
destination
[
X_AXIS
],
destination
[
Y_AXIS
],
destination
[
Z_AXIS
]);
else
gfx_cursor_to
(
destination
[
X_AXIS
]
+
(
X_MAX_POS
),
destination
[
Y_AXIS
]
+
(
Y_MAX_POS
),
destination
[
Z_AXIS
]);
#else
if
((
code_seen
(
axis_codes
[
X_AXIS
])
||
code_seen
(
axis_codes
[
Y_AXIS
]))
&&
code_seen
(
axis_codes
[
E_AXIS
]))
gfx_line_to
(
destination
[
X_AXIS
],
destination
[
Y_AXIS
],
destination
[
Z_AXIS
]);
else
gfx_cursor_to
(
destination
[
X_AXIS
],
destination
[
Y_AXIS
],
destination
[
Z_AXIS
]);
#endif
#endif
#endif
}
}
...
@@ -3230,7 +3237,7 @@ inline void gcode_G28() {
...
@@ -3230,7 +3237,7 @@ inline void gcode_G28() {
sync_plan_position
();
sync_plan_position
();
do_blocking_move_to
(
current_position
[
X_AXIS
],
current_position
[
Y_AXIS
],
Z_MIN_POS
+
5
);
do_blocking_move_to
(
current_position
[
X_AXIS
],
current_position
[
Y_AXIS
],
(
Z_MIN_POS
)
+
5
);
// PROBE FIRST POINT
// PROBE FIRST POINT
set_pageShowInfo
(
1
);
set_pageShowInfo
(
1
);
...
@@ -3242,43 +3249,43 @@ inline void gcode_G28() {
...
@@ -3242,43 +3249,43 @@ inline void gcode_G28() {
// PROBE SECOND POINT
// PROBE SECOND POINT
set_pageShowInfo
(
2
);
set_pageShowInfo
(
2
);
do_blocking_move_to
(
current_position
[
X_AXIS
],
current_position
[
Y_AXIS
],
Z_MIN_POS
+
5
);
do_blocking_move_to
(
current_position
[
X_AXIS
],
current_position
[
Y_AXIS
],
(
Z_MIN_POS
)
+
5
);
do_blocking_move_to
(
RIGHT_PROBE_BED_POSITION
,
FRONT_PROBE_BED_POSITION
,
current_position
[
Z_AXIS
]);
do_blocking_move_to
(
RIGHT_PROBE_BED_POSITION
,
FRONT_PROBE_BED_POSITION
,
current_position
[
Z_AXIS
]);
do_blocking_move_to
(
current_position
[
X_AXIS
],
current_position
[
Y_AXIS
],
Z_MIN_POS
);
do_blocking_move_to
(
current_position
[
X_AXIS
],
current_position
[
Y_AXIS
],
Z_MIN_POS
);
while
(
!
lcd_clicked
())
{
while
(
!
lcd_clicked
())
{
idle
(
true
);
idle
(
true
);
}
}
// PROBE THIRD POINT
// PROBE THIRD POINT
set_pageShowInfo
(
3
);
set_pageShowInfo
(
3
);
do_blocking_move_to
(
current_position
[
X_AXIS
],
current_position
[
Y_AXIS
],
Z_MIN_POS
+
5
);
do_blocking_move_to
(
current_position
[
X_AXIS
],
current_position
[
Y_AXIS
],
(
Z_MIN_POS
)
+
5
);
do_blocking_move_to
(
RIGHT_PROBE_BED_POSITION
,
BACK_PROBE_BED_POSITION
,
current_position
[
Z_AXIS
]);
do_blocking_move_to
(
RIGHT_PROBE_BED_POSITION
,
BACK_PROBE_BED_POSITION
,
current_position
[
Z_AXIS
]);
do_blocking_move_to
(
current_position
[
X_AXIS
],
current_position
[
Y_AXIS
],
Z_MIN_POS
);
do_blocking_move_to
(
current_position
[
X_AXIS
],
current_position
[
Y_AXIS
],
Z_MIN_POS
);
while
(
!
lcd_clicked
())
{
while
(
!
lcd_clicked
())
{
idle
(
true
);
idle
(
true
);
}
}
// PROBE FOURTH POINT
// PROBE FOURTH POINT
set_pageShowInfo
(
4
);
set_pageShowInfo
(
4
);
do_blocking_move_to
(
current_position
[
X_AXIS
],
current_position
[
Y_AXIS
],
Z_MIN_POS
+
5
);
do_blocking_move_to
(
current_position
[
X_AXIS
],
current_position
[
Y_AXIS
],
(
Z_MIN_POS
)
+
5
);
do_blocking_move_to
(
LEFT_PROBE_BED_POSITION
,
BACK_PROBE_BED_POSITION
,
current_position
[
Z_AXIS
]);
do_blocking_move_to
(
LEFT_PROBE_BED_POSITION
,
BACK_PROBE_BED_POSITION
,
current_position
[
Z_AXIS
]);
do_blocking_move_to
(
current_position
[
X_AXIS
],
current_position
[
Y_AXIS
],
Z_MIN_POS
);
do_blocking_move_to
(
current_position
[
X_AXIS
],
current_position
[
Y_AXIS
],
Z_MIN_POS
);
while
(
!
lcd_clicked
())
{
while
(
!
lcd_clicked
())
{
idle
(
true
);
idle
(
true
);
}
}
// PROBE CENTER
// PROBE CENTER
set_pageShowInfo
(
5
);
set_pageShowInfo
(
5
);
do_blocking_move_to
(
current_position
[
X_AXIS
],
current_position
[
Y_AXIS
],
Z_MIN_POS
+
5
);
do_blocking_move_to
(
current_position
[
X_AXIS
],
current_position
[
Y_AXIS
],
(
Z_MIN_POS
)
+
5
);
do_blocking_move_to
((
X_MAX_POS
-
X_MIN_POS
)
/
2
,
(
Y_MAX_POS
-
Y_MIN_POS
)
/
2
,
current_position
[
Z_AXIS
]);
do_blocking_move_to
((
(
X_MAX_POS
)
-
(
X_MIN_POS
))
/
2
,
((
Y_MAX_POS
)
-
(
Y_MIN_POS
))
/
2
,
current_position
[
Z_AXIS
]);
do_blocking_move_to
(
current_position
[
X_AXIS
],
current_position
[
Y_AXIS
],
Z_MIN_POS
);
do_blocking_move_to
(
current_position
[
X_AXIS
],
current_position
[
Y_AXIS
],
Z_MIN_POS
);
while
(
!
lcd_clicked
())
{
while
(
!
lcd_clicked
())
{
idle
(
true
);
idle
(
true
);
}
}
// FINISH MANUAL BED LEVEL
// FINISH MANUAL BED LEVEL
set_pageShowInfo
(
6
);
set_pageShowInfo
(
6
);
do_blocking_move_to
(
current_position
[
X_AXIS
],
current_position
[
Y_AXIS
],
Z_MIN_POS
+
5
);
do_blocking_move_to
(
current_position
[
X_AXIS
],
current_position
[
Y_AXIS
],
(
Z_MIN_POS
)
+
5
);
enqueuecommands_P
(
PSTR
(
"G28"
));
enqueuecommands_P
(
PSTR
(
"G28"
));
#endif // ULTIPANEL
#endif // ULTIPANEL
}
}
...
@@ -3441,8 +3448,13 @@ inline void gcode_G28() {
...
@@ -3441,8 +3448,13 @@ inline void gcode_G28() {
}
}
#if ENABLED(NEXTION) && ENABLED(NEXTION_GFX)
#if ENABLED(NEXTION) && ENABLED(NEXTION_GFX)
gfx_clear
(
X_MAX_POS
,
Y_MAX_POS
,
Z_MAX_POS
);
#if MECH(DELTA)
gfx_cursor_to
(
current_position
[
X_AXIS
],
current_position
[
Y_AXIS
],
current_position
[
Z_AXIS
]);
gfx_clear
((
X_MAX_POS
)
*
2
,
(
Y_MAX_POS
)
*
2
,
Z_MAX_POS
);
gfx_cursor_to
(
current_position
[
X_AXIS
]
+
(
X_MAX_POS
),
current_position
[
Y_AXIS
]
+
(
Y_MAX_POS
),
current_position
[
Z_AXIS
]);
#else
gfx_clear
(
X_MAX_POS
,
Y_MAX_POS
,
Z_MAX_POS
);
gfx_cursor_to
(
current_position
[
X_AXIS
],
current_position
[
Y_AXIS
],
current_position
[
Z_AXIS
]);
#endif
#endif
#endif
if
(
debugLevel
&
DEBUG_INFO
)
ECHO_LM
(
INFO
,
"<<< gcode_G28"
);
if
(
debugLevel
&
DEBUG_INFO
)
ECHO_LM
(
INFO
,
"<<< gcode_G28"
);
...
...
MK/module/lcd/ultralcd_implementation_hitachi_HD44780.h
View file @
63ef2d1c
...
@@ -463,7 +463,7 @@ unsigned lcd_print(char c) { return charset_mapper(c); }
...
@@ -463,7 +463,7 @@ unsigned lcd_print(char c) { return charset_mapper(c); }
#if ENABLED(SHOW_BOOTSCREEN)
#if ENABLED(SHOW_BOOTSCREEN)
void
lcd_erase_line
(
int
line
)
{
void
lcd_erase_line
(
int
line
)
{
lcd
.
setCursor
(
0
,
3
);
lcd
.
setCursor
(
0
,
line
);
for
(
int
i
=
0
;
i
<
LCD_WIDTH
;
i
++
)
for
(
int
i
=
0
;
i
<
LCD_WIDTH
;
i
++
)
lcd_print
(
' '
);
lcd_print
(
' '
);
}
}
...
...
MK/module/motion/stepper.cpp
View file @
63ef2d1c
...
@@ -572,11 +572,11 @@ void set_stepper_direction(bool onlye) {
...
@@ -572,11 +572,11 @@ void set_stepper_direction(bool onlye) {
#define SET_STEP_DIR(AXIS) \
#define SET_STEP_DIR(AXIS) \
if (TEST(out_bits, AXIS ##_AXIS)) { \
if (TEST(out_bits, AXIS ##_AXIS)) { \
AXIS ##_APPLY_DIR(INVERT_## AXIS ##_DIR,
0
); \
AXIS ##_APPLY_DIR(INVERT_## AXIS ##_DIR,
false
); \
count_direction[AXIS ##_AXIS] = -1; \
count_direction[AXIS ##_AXIS] = -1; \
} \
} \
else { \
else { \
AXIS ##_APPLY_DIR(!INVERT_## AXIS ##_DIR,
0
); \
AXIS ##_APPLY_DIR(!INVERT_## AXIS ##_DIR,
false
); \
count_direction[AXIS ##_AXIS] = 1; \
count_direction[AXIS ##_AXIS] = 1; \
}
}
...
...
MK/module/nextion/Nextion_lcd.cpp
View file @
63ef2d1c
...
@@ -173,7 +173,11 @@
...
@@ -173,7 +173,11 @@
PageInfo
=
true
;
PageInfo
=
true
;
#if ENABLED(NEXTION_GFX)
#if ENABLED(NEXTION_GFX)
gfx_clear
(
X_MAX_POS
,
Y_MAX_POS
,
Z_MAX_POS
);
#if MECH(DELTA)
gfx_clear
((
X_MAX_POS
)
*
2
,
(
Y_MAX_POS
)
*
2
,
Z_MAX_POS
);
#else
gfx_clear
(
X_MAX_POS
,
Y_MAX_POS
,
Z_MAX_POS
);
#endif
#endif
#endif
#if HAS_TEMP_0
#if HAS_TEMP_0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment