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
6f6b1d04
Commit
6f6b1d04
authored
Mar 24, 2016
by
MagoKimbra
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'refs/remotes/origin/dev'
parents
a6d73381
8da450d8
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
49 additions
and
35 deletions
+49
-35
marlinkimbra_v0_7_0.HMI
MK/Nextion FW/marlinkimbra_v0_7_0.HMI
+0
-0
marlinkimbra_v0_7_0.tft
MK/Nextion FW/marlinkimbra_v0_7_0.tft
+0
-0
MK_Main.cpp
MK/module/MK_Main.cpp
+1
-1
stepper.cpp
MK/module/motion/stepper.cpp
+28
-28
Nextion.h
MK/module/nextion/Nextion.h
+3
-4
Nextion_lcd.cpp
MK/module/nextion/Nextion_lcd.cpp
+16
-2
Nextion_lcd.h
MK/module/nextion/Nextion_lcd.h
+1
-0
No files found.
MK/Nextion FW/marlinkimbra_v0_
6_9
.HMI
→
MK/Nextion FW/marlinkimbra_v0_
7_0
.HMI
View file @
6f6b1d04
No preview for this file type
MK/Nextion FW/marlinkimbra_v0_
6_9
.tft
→
MK/Nextion FW/marlinkimbra_v0_
7_0
.tft
View file @
6f6b1d04
No preview for this file type
MK/module/MK_Main.cpp
View file @
6f6b1d04
...
@@ -66,7 +66,7 @@ static char command_queue[BUFSIZE][MAX_CMD_SIZE];
...
@@ -66,7 +66,7 @@ static char command_queue[BUFSIZE][MAX_CMD_SIZE];
float
homing_feedrate
[]
=
HOMING_FEEDRATE
;
float
homing_feedrate
[]
=
HOMING_FEEDRATE
;
bool
axis_relative_modes
[]
=
AXIS_RELATIVE_MODES
;
bool
axis_relative_modes
[]
=
AXIS_RELATIVE_MODES
;
int
feedrate_multiplier
=
100
;
//100->1 200->2
int
feedrate_multiplier
=
100
;
//
100->1 200->2
int
saved_feedrate_multiplier
;
int
saved_feedrate_multiplier
;
int
extruder_multiplier
[
EXTRUDERS
]
=
ARRAY_BY_EXTRUDERS
(
100
);
int
extruder_multiplier
[
EXTRUDERS
]
=
ARRAY_BY_EXTRUDERS
(
100
);
int
density_multiplier
[
EXTRUDERS
]
=
ARRAY_BY_EXTRUDERS
(
100
);
int
density_multiplier
[
EXTRUDERS
]
=
ARRAY_BY_EXTRUDERS
(
100
);
...
...
MK/module/motion/stepper.cpp
View file @
6f6b1d04
...
@@ -163,6 +163,8 @@ volatile signed char count_direction[NUM_AXIS] = { 1 };
...
@@ -163,6 +163,8 @@ volatile signed char count_direction[NUM_AXIS] = { 1 };
#if DISABLED(COLOR_MIXING_EXTRUDER)
#if DISABLED(COLOR_MIXING_EXTRUDER)
#define E_APPLY_STEP(v,Q) E_STEP_WRITE(v)
#define E_APPLY_STEP(v,Q) E_STEP_WRITE(v)
#else
#define E_APPLY_STEP(v,Q)
#endif
#endif
// intRes = intIn1 * intIn2 >> 16
// intRes = intIn1 * intIn2 >> 16
...
@@ -715,20 +717,36 @@ ISR(TIMER1_COMPA_vect) {
...
@@ -715,20 +717,36 @@ ISR(TIMER1_COMPA_vect) {
#define STEP_START(axis, AXIS) \
#define STEP_START(axis, AXIS) \
_COUNTER(axis) += current_block->steps[_AXIS(AXIS)]; \
_COUNTER(axis) += current_block->steps[_AXIS(AXIS)]; \
if (_COUNTER(axis) > 0) { _APPLY_STEP(AXIS)(!_INVERT_STEP_PIN(AXIS),0); }
if (_COUNTER(axis) > 0) _APPLY_STEP(AXIS)(!_INVERT_STEP_PIN(AXIS),0);
#define STEP_START_MIXING \
for (uint8_t j = 0; j < DRIVER_EXTRUDERS; j++) { \
counter_m[j] += current_block->mix_event_count[j]; \
if (counter_m[j] > 0) En_STEP_WRITE(j, !INVERT_E_STEP_PIN); \
}
#define STEP_END(axis, AXIS) \
if (_COUNTER(axis) > 0) { \
_COUNTER(axis) -= current_block->step_event_count; \
count_position[_AXIS(AXIS)] += count_direction[_AXIS(AXIS)]; \
_APPLY_STEP(AXIS)(_INVERT_STEP_PIN(AXIS),0); \
}
#define STEP_END_MIXING \
for (uint8_t j = 0; j < DRIVER_EXTRUDERS; j++) { \
if (counter_m[j] > 0) { \
counter_m[j] -= current_block->step_event_count; \
En_STEP_WRITE(j, INVERT_E_STEP_PIN); \
} \
}
STEP_START
(
x
,
X
);
STEP_START
(
x
,
X
);
STEP_START
(
y
,
Y
);
STEP_START
(
y
,
Y
);
STEP_START
(
z
,
Z
);
STEP_START
(
z
,
Z
);
#if DISABLED(ADVANCE)
#if DISABLED(ADVANCE)
STEP_START
(
e
,
E
);
#if ENABLED(COLOR_MIXING_EXTRUDER)
#if ENABLED(COLOR_MIXING_EXTRUDER)
counter_e
+=
current_block
->
steps
[
E_AXIS
];
STEP_START_MIXING
;
for
(
uint8_t
j
=
0
;
j
<
DRIVER_EXTRUDERS
;
j
++
)
{
counter_m
[
j
]
+=
current_block
->
mix_event_count
[
j
];
if
(
counter_m
[
j
]
>
0
)
En_STEP_WRITE
(
j
,
!
INVERT_E_STEP_PIN
);
}
#else
STEP_START
(
e
,
E
);
#endif
#endif
#endif
#endif
...
@@ -736,31 +754,13 @@ ISR(TIMER1_COMPA_vect) {
...
@@ -736,31 +754,13 @@ ISR(TIMER1_COMPA_vect) {
HAL
::
delayMicroseconds
(
STEPPER_HIGH_LOW_DELAY
);
HAL
::
delayMicroseconds
(
STEPPER_HIGH_LOW_DELAY
);
#endif
#endif
#define STEP_END(axis, AXIS) \
if (_COUNTER(axis) > 0) { \
_COUNTER(axis) -= current_block->step_event_count; \
count_position[_AXIS(AXIS)] += count_direction[_AXIS(AXIS)]; \
_APPLY_STEP(AXIS)(_INVERT_STEP_PIN(AXIS),0); \
}
STEP_END
(
x
,
X
);
STEP_END
(
x
,
X
);
STEP_END
(
y
,
Y
);
STEP_END
(
y
,
Y
);
STEP_END
(
z
,
Z
);
STEP_END
(
z
,
Z
);
#if DISABLED(ADVANCE)
#if DISABLED(ADVANCE)
STEP_END
(
e
,
E
);
#if ENABLED(COLOR_MIXING_EXTRUDER)
#if ENABLED(COLOR_MIXING_EXTRUDER)
// Always count the single E axis
STEP_END_MIXING
;
if
(
counter_e
>
0
)
{
counter_e
-=
current_block
->
step_event_count
;
count_position
[
E_AXIS
]
+=
count_direction
[
E_AXIS
];
}
for
(
uint8_t
j
=
0
;
j
<
DRIVER_EXTRUDERS
;
j
++
)
{
if
(
counter_m
[
j
]
>
0
)
{
counter_m
[
j
]
-=
current_block
->
step_event_count
;
En_STEP_WRITE
(
j
,
INVERT_E_STEP_PIN
);
}
}
#else
STEP_END
(
e
,
E
);
#endif
#endif
#endif
#endif
...
...
MK/module/nextion/Nextion.h
View file @
6f6b1d04
...
@@ -23,17 +23,16 @@
...
@@ -23,17 +23,16 @@
#include "NexHardware.h"
#include "NexHardware.h"
#include "NexButton.h"
#include "NexButton.h"
#include "NexCrop.h"
//
#include "NexCrop.h"
#include "NexGauge.h"
//
#include "NexGauge.h"
#include "NexHotspot.h"
#include "NexHotspot.h"
#include "NexPage.h"
#include "NexPage.h"
#include "NexPicture.h"
#include "NexPicture.h"
#include "NexProgressBar.h"
#include "NexProgressBar.h"
#include "NexSlider.h"
#include "NexSlider.h"
#include "NexText.h"
#include "NexText.h"
#include "NexWaveform.h"
//
#include "NexWaveform.h"
#include "NexTimer.h"
#include "NexTimer.h"
#include "NexVar.h"
#include "NexVar.h"
#endif
/* #ifndef __NEXTION_H__ */
#endif
/* #ifndef __NEXTION_H__ */
MK/module/nextion/Nextion_lcd.cpp
View file @
6f6b1d04
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
NexPage
Psetup
=
NexPage
(
5
,
0
,
"setup"
);
NexPage
Psetup
=
NexPage
(
5
,
0
,
"setup"
);
NexPage
Pmove
=
NexPage
(
6
,
0
,
"move"
);
NexPage
Pmove
=
NexPage
(
6
,
0
,
"move"
);
NexPage
Pspeed
=
NexPage
(
7
,
0
,
"speed"
);
NexPage
Pspeed
=
NexPage
(
7
,
0
,
"speed"
);
NexPage
Pgcode
=
NexPage
(
8
,
0
,
"gcode"
);
// Page 0 Start
// Page 0 Start
NexTimer
startimer
=
NexTimer
(
0
,
1
,
"tm0"
);
NexTimer
startimer
=
NexTimer
(
0
,
1
,
"tm0"
);
...
@@ -115,6 +116,10 @@
...
@@ -115,6 +116,10 @@
// Page 7 Feed
// Page 7 Feed
NexPicture
SpeedOk
=
NexPicture
(
7
,
2
,
"p0"
);
NexPicture
SpeedOk
=
NexPicture
(
7
,
2
,
"p0"
);
// Page 8 Gcode
NexText
Tgcode
=
NexText
(
8
,
1
,
"tgcode"
);
NexButton
Benter
=
NexButton
(
8
,
41
,
"benter"
);
NexTouch
*
nex_listen_list
[]
=
NexTouch
*
nex_listen_list
[]
=
{
{
&
Pstart
,
&
Pstart
,
...
@@ -156,6 +161,7 @@
...
@@ -156,6 +161,7 @@
&
ZUp
,
&
ZUp
,
&
ZDown
,
&
ZDown
,
&
SpeedOk
,
&
SpeedOk
,
&
Benter
,
NULL
NULL
};
};
...
@@ -424,6 +430,13 @@
...
@@ -424,6 +430,13 @@
setpageInfo
();
setpageInfo
();
}
}
void
setgcodePopCallback
(
void
*
ptr
)
{
memset
(
buffer
,
0
,
sizeof
(
buffer
));
Tgcode
.
getText
(
buffer
,
sizeof
(
buffer
));
enqueuecommands_P
(
buffer
);
Pmenu
.
show
();
}
void
setpagePopCallback
(
void
*
ptr
)
{
void
setpagePopCallback
(
void
*
ptr
)
{
if
(
ptr
==
&
Menu
)
{
if
(
ptr
==
&
Menu
)
{
NextionPage
=
3
;
NextionPage
=
3
;
...
@@ -537,6 +550,7 @@
...
@@ -537,6 +550,7 @@
ZUp
.
attachPop
(
setmovePopCallback
);
ZUp
.
attachPop
(
setmovePopCallback
);
ZDown
.
attachPop
(
setmovePopCallback
);
ZDown
.
attachPop
(
setmovePopCallback
);
SpeedOk
.
attachPop
(
ExitPopCallback
);
SpeedOk
.
attachPop
(
ExitPopCallback
);
Benter
.
attachPop
(
setgcodePopCallback
);
startimer
.
enable
();
startimer
.
enable
();
}
}
...
@@ -639,7 +653,7 @@
...
@@ -639,7 +653,7 @@
if
(
IS_SD_PRINTING
)
{
if
(
IS_SD_PRINTING
)
{
// Progress bar solid part
// Progress bar solid part
sdbar
.
setValue
(
card
.
percentDone
());
sdbar
.
setValue
(
card
.
percentDone
());
NPlay
.
setPic
(
1
5
);
NPlay
.
setPic
(
1
7
);
// Estimate End Time
// Estimate End Time
uint16_t
time
=
(
millis
()
-
print_job_start_ms
)
/
60000
;
uint16_t
time
=
(
millis
()
-
print_job_start_ms
)
/
60000
;
...
@@ -654,7 +668,7 @@
...
@@ -654,7 +668,7 @@
}
}
}
}
else
{
else
{
NPlay
.
setPic
(
1
4
);
NPlay
.
setPic
(
1
6
);
}
}
}
}
else
if
(
card
.
cardOK
&&
SDstatus
!=
1
)
{
else
if
(
card
.
cardOK
&&
SDstatus
!=
1
)
{
...
...
MK/module/nextion/Nextion_lcd.h
View file @
6f6b1d04
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
void
settempPopCallback
(
void
*
ptr
);
void
settempPopCallback
(
void
*
ptr
);
void
setfanPopCallback
(
void
*
ptr
);
void
setfanPopCallback
(
void
*
ptr
);
void
setmovePopCallback
(
void
*
ptr
);
void
setmovePopCallback
(
void
*
ptr
);
void
setgcodePopCallback
(
void
*
ptr
);
void
lcd_update
();
void
lcd_update
();
void
lcd_init
();
void
lcd_init
();
void
lcd_setstatus
(
const
char
*
message
,
const
bool
persist
=
false
);
void
lcd_setstatus
(
const
char
*
message
,
const
bool
persist
=
false
);
...
...
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