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
e5a79858
Commit
e5a79858
authored
9 years ago
by
MagoKimbra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Same fix
parent
22c55024
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
809 additions
and
818 deletions
+809
-818
Configuration_Pins.h
MarlinKimbra/Configuration_Pins.h
+66
-57
Marlin_main.cpp
MarlinKimbra/Marlin_main.cpp
+16
-8
conditionals.h
MarlinKimbra/conditionals.h
+2
-2
pins.h
MarlinKimbra/pins.h
+712
-745
stepper.cpp
MarlinKimbra/stepper.cpp
+13
-6
No files found.
MarlinKimbra/Configuration_Pins.h
View file @
e5a79858
#ifndef CONFIGURATION_PINS_H
#define CONFIGURATION_PINS_H
//===========================
BASIC
==============================
//===========================
======== BASIC ====
==============================
//X axis pins
#define X_STEP_PIN ORIG_X_STEP_PIN
#define X_DIR_PIN ORIG_X_DIR_PIN
#define X_ENABLE_PIN ORIG_X_ENABLE_PIN
//
X axis pins
#define X_STEP_PIN
ORIG_X_STEP_PIN
#define X_DIR_PIN
ORIG_X_DIR_PIN
#define X_ENABLE_PIN
ORIG_X_ENABLE_PIN
//Y axis pins
#define Y_STEP_PIN ORIG_Y_STEP_PIN
#define Y_DIR_PIN ORIG_Y_DIR_PIN
#define Y_ENABLE_PIN ORIG_Y_ENABLE_PIN
//
Y axis pins
#define Y_STEP_PIN
ORIG_Y_STEP_PIN
#define Y_DIR_PIN
ORIG_Y_DIR_PIN
#define Y_ENABLE_PIN
ORIG_Y_ENABLE_PIN
//Z axis pins
#define Z_STEP_PIN ORIG_Z_STEP_PIN
#define Z_DIR_PIN ORIG_Z_DIR_PIN
#define Z_ENABLE_PIN ORIG_Z_ENABLE_PIN
//
Z axis pins
#define Z_STEP_PIN
ORIG_Z_STEP_PIN
#define Z_DIR_PIN
ORIG_Z_DIR_PIN
#define Z_ENABLE_PIN
ORIG_Z_ENABLE_PIN
//E axis pins
//
E axis pins
#if DRIVER_EXTRUDERS > 0
#define E0_STEP_PIN ORIG_E0_STEP_PIN
#define E0_DIR_PIN ORIG_E0_DIR_PIN
#define E0_ENABLE_PIN ORIG_E0_ENABLE_PIN
#define E0_STEP_PIN
ORIG_E0_STEP_PIN
#define E0_DIR_PIN
ORIG_E0_DIR_PIN
#define E0_ENABLE_PIN
ORIG_E0_ENABLE_PIN
#endif
#if DRIVER_EXTRUDERS > 1
#define E1_STEP_PIN ORIG_E1_STEP_PIN
#define E1_DIR_PIN ORIG_E1_DIR_PIN
#define E1_ENABLE_PIN ORIG_E1_ENABLE_PIN
#define E1_STEP_PIN
ORIG_E1_STEP_PIN
#define E1_DIR_PIN
ORIG_E1_DIR_PIN
#define E1_ENABLE_PIN
ORIG_E1_ENABLE_PIN
#endif
#if DRIVER_EXTRUDERS > 2
#define E2_STEP_PIN ORIG_E2_STEP_PIN
#define E2_DIR_PIN ORIG_E2_DIR_PIN
#define E2_ENABLE_PIN ORIG_E2_ENABLE_PIN
#define E2_STEP_PIN
ORIG_E2_STEP_PIN
#define E2_DIR_PIN
ORIG_E2_DIR_PIN
#define E2_ENABLE_PIN
ORIG_E2_ENABLE_PIN
#endif
#if DRIVER_EXTRUDERS > 3
#define E3_STEP_PIN ORIG_E3_STEP_PIN
#define E3_DIR_PIN ORIG_E3_DIR_PIN
#define E3_ENABLE_PIN ORIG_E3_ENABLE_PIN
#define E3_STEP_PIN
ORIG_E3_STEP_PIN
#define E3_DIR_PIN
ORIG_E3_DIR_PIN
#define E3_ENABLE_PIN
ORIG_E3_ENABLE_PIN
#endif
//HEATHER pin
#define HEATER_0_PIN ORIG_HEATER_0_PIN
#define HEATER_1_PIN ORIG_HEATER_1_PIN
#define HEATER_2_PIN ORIG_HEATER_2_PIN
#define HEATER_3_PIN ORIG_HEATER_3_PIN
#define HEATER_BED_PIN ORIG_HEATER_BED_PIN
// ENDSTOP pin
#define X_MIN_PIN ORIG_X_MIN_PIN
#define X_MAX_PIN ORIG_X_MAX_PIN
#define Y_MIN_PIN ORIG_Y_MIN_PIN
#define Y_MAX_PIN ORIG_Y_MAX_PIN
#define Z_MIN_PIN ORIG_Z_MIN_PIN
#define Z_MAX_PIN ORIG_Z_MAX_PIN
//
TEMP
pin
#define
TEMP_0_PIN ORIG_TEMP
_0_PIN
#define
TEMP_1_PIN ORIG_TEMP
_1_PIN
#define
TEMP_2_PIN ORIG_TEMP
_2_PIN
#define
TEMP_3_PIN ORIG_TEMP
_3_PIN
#define
TEMP_BED_PIN ORIG_TEMP
_BED_PIN
//
HEATER
pin
#define
HEATER_0_PIN ORIG_HEATER
_0_PIN
#define
HEATER_1_PIN ORIG_HEATER
_1_PIN
#define
HEATER_2_PIN ORIG_HEATER
_2_PIN
#define
HEATER_3_PIN ORIG_HEATER
_3_PIN
#define
HEATER_BED_PIN ORIG_HEATER
_BED_PIN
//FAN pin
#define FAN_PIN ORIG_FAN_PIN
// TEMP pin
#define TEMP_0_PIN ORIG_TEMP_0_PIN
#define TEMP_1_PIN ORIG_TEMP_1_PIN
#define TEMP_2_PIN ORIG_TEMP_2_PIN
#define TEMP_3_PIN ORIG_TEMP_3_PIN
#define TEMP_BED_PIN ORIG_TEMP_BED_PIN
//==================================================================
// FAN pin
#define FAN_PIN ORIG_FAN_PIN
//=========================== FEATURE ==============================
//============================================================================
//================================= FEATURE ==================================
#if ENABLED(MKR4)
#define E0E1_CHOICE_PIN
-1
#define E0E2_CHOICE_PIN
-1
#define E0E3_CHOICE_PIN
-1
#define E1E3_CHOICE_PIN
-1
#endif
//MKR4
#define E0E1_CHOICE_PIN -1
#define E0E2_CHOICE_PIN -1
#define E0E3_CHOICE_PIN -1
#define E1E3_CHOICE_PIN -1
#endif
#if ENABLED(NPR2)
#define E_MIN_PIN
-1
#define E_MIN_PIN -1
#endif
#if ENABLED(LASERBEAM)
#define LASER_PWR_PIN
-1
#define LASER_TTL_PIN
-1
#define LASER_PWR_PIN -1
#define LASER_TTL_PIN -1
#endif
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
#define FILRUNOUT_PIN
-1
#define FILRUNOUT_PIN -1
#endif
#if ENABLED(FILAMENT_SENSOR)
#define FILWIDTH_PIN
-1 // ANALOG NUMBERING
#define FILWIDTH_PIN
-1
#endif
#if ENABLED(POWER_CONSUMPTION)
#define POWER_CONSUMPTION_PIN -1
// ANALOG NUMBERING
#define POWER_CONSUMPTION_PIN -1
#endif
#if ENABLED(PHOTOGRAPH)
...
...
@@ -118,12 +126,13 @@
#endif
#if ENABLED(Z_PROBE_SLED)
#define SLED_PIN
-1
#define SLED_PIN -1
#endif
#if ENABLED(Z_PROBE_ENDSTOP)
#define Z_PROBE_PIN
-1
#define Z_PROBE_PIN -1
#endif
//====================================================================
#endif
\ No newline at end of file
//============================================================================
#endif
This diff is collapsed.
Click to expand it.
MarlinKimbra/Marlin_main.cpp
View file @
e5a79858
...
...
@@ -697,7 +697,7 @@ bool enqueuecommand(const char *cmd) {
}
#endif
#if HAS(SERVO)
#if HAS(SERVO
S
)
void
servo_init
()
{
#if HAS(SERVO_0)
servo
[
0
].
attach
(
SERVO0_PIN
);
...
...
@@ -717,21 +717,23 @@ bool enqueuecommand(const char *cmd) {
#endif
#if ENABLED(DONDOLO)
servo
[
DONDOLO_SERVO_INDEX
].
attach
(
0
);
servo
[
DONDOLO_SERVO_INDEX
].
write
(
DONDOLO_SERVOPOS_E0
);
delay
(
DONDOLO_SERVO_DELAY
);
servo
[
DONDOLO_SERVO_INDEX
].
detach
();
#endif
// Set position of Servo Endstops that are defined
#if HAS(SERVO_ENDSTOPS)
#if ENABLED(DONDOLO)
for
(
int
i
=
0
;
i
<
3
;
i
++
)
{
if
(
servo_endstop
s
[
i
]
>=
0
&&
servo_endstops
[
i
]
!=
DONDOLO_SERVO_INDEX
)
servo
[
servo_endstop
s
[
i
]].
write
(
servo_endstop_angles
[
i
*
2
+
1
]);
if
(
servo_endstop
_id
[
i
]
>=
0
&&
servo_endstop_id
[
i
]
!=
DONDOLO_SERVO_INDEX
)
servo
[
servo_endstop
_id
[
i
]].
write
(
servo_endstop_angle
[
i
][
1
]);
}
#else
for
(
int
i
=
0
;
i
<
3
;
i
++
)
{
if
(
servo_endstop
s
[
i
]
>=
0
)
servo
[
servo_endstop
s
[
i
]].
write
(
servo_endstop_angles
[
i
*
2
+
1
]);
if
(
servo_endstop
_id
[
i
]
>=
0
)
servo
[
servo_endstop
_id
[
i
]].
write
(
servo_endstop_angle
[
i
][
1
]);
}
#endif
#endif
...
...
@@ -857,7 +859,7 @@ void setup() {
#if ENABLED(LASERBEAM)
setup_laserbeampin
();
// Initialize Laserbeam pin
#endif
#if HAS(SERVO)
#if HAS(SERVO
S
)
servo_init
();
#endif
#if HAS(STEPPER_RESET)
...
...
@@ -5857,7 +5859,7 @@ inline void gcode_M226() {
#endif // DOGLCD
#if HAS(SERVO)
#if HAS(SERVO
S
)
/**
* M280: Get or set servo position. P<index> S<angle>
*/
...
...
@@ -5880,8 +5882,10 @@ inline void gcode_M226() {
}
else
if
(
servo_index
==
DONDOLO_SERVO_INDEX
)
{
Servo
*
srv
=
&
servo
[
servo_index
];
srv
->
attach
(
0
);
srv
->
write
(
servo_position
);
delay
(
DONDOLO_SERVO_DELAY
);
srv
->
detach
();
}
else
{
ECHO_SM
(
ER
,
"Servo "
);
...
...
@@ -6975,13 +6979,17 @@ inline void gcode_T(uint8_t tmp_extruder) {
active_driver
=
0
;
if
(
active_extruder
==
0
)
{
st_synchronize
();
servo
[
DONDOLO_SERVO_INDEX
].
attach
(
0
);
servo
[
DONDOLO_SERVO_INDEX
].
write
(
DONDOLO_SERVOPOS_E0
);
delay
(
DONDOLO_SERVO_DELAY
);
servo
[
DONDOLO_SERVO_INDEX
].
detach
();
}
else
if
(
active_extruder
==
1
)
{
st_synchronize
();
servo
[
DONDOLO_SERVO_INDEX
].
attach
(
0
);
servo
[
DONDOLO_SERVO_INDEX
].
write
(
DONDOLO_SERVOPOS_E1
);
delay
(
DONDOLO_SERVO_DELAY
);
servo
[
DONDOLO_SERVO_INDEX
].
detach
();
}
ECHO_LMV
(
DB
,
MSG_ACTIVE_DRIVER
,
active_driver
);
ECHO_LMV
(
DB
,
MSG_ACTIVE_EXTRUDER
,
active_extruder
);
...
...
@@ -7332,7 +7340,7 @@ void process_next_command() {
gcode_M250
();
break
;
#endif // DOGLCD
#if HAS(SERVO)
#if HAS(SERVO
S
)
case
280
:
// M280 - set servo position absolute. P: servo index, S: angle or microseconds
gcode_M280
();
break
;
#endif // NUM_SERVOS > 0
...
...
This diff is collapsed.
Click to expand it.
MarlinKimbra/conditionals.h
View file @
e5a79858
...
...
@@ -222,7 +222,7 @@
*/
#if ENABLED(DONDOLO)
#undef SINGLENOZZLE
#define DRIVER_EXTRUDERS
0
#define DRIVER_EXTRUDERS
1
#endif
/**
...
...
@@ -238,7 +238,7 @@
/**
* DRIVER_EXTRUDERS
*/
#if DISABLED(MKR4) && DISABLED(NPR2)
#if DISABLED(MKR4) && DISABLED(NPR2)
&& DISABLED(DONDOLO)
#define DRIVER_EXTRUDERS EXTRUDERS // This defines the number of Driver extruder
#endif
...
...
This diff is collapsed.
Click to expand it.
MarlinKimbra/pins.h
View file @
e5a79858
This diff is collapsed.
Click to expand it.
MarlinKimbra/stepper.cpp
View file @
e5a79858
...
...
@@ -570,17 +570,24 @@ void set_stepper_direction() {
#if DISABLED(ADVANCE) && ENABLED(DONDOLO)
if
(
TEST
(
out_bits
,
E_AXIS
))
{
if
(
active_extruder
==
0
)
if
(
active_extruder
==
0
)
{
REV_E_DIR
();
else
count_direction
[
E_AXIS
]
=
-
1
;
}
else
{
NORM_E_DIR
();
count_direction
[
E_AXIS
]
=
-
1
;
count_direction
[
E_AXIS
]
=
-
1
;
}
}
else
{
if
(
active_extruder
==
0
)
if
(
active_extruder
==
0
)
{
NORM_E_DIR
();
else
count_direction
[
E_AXIS
]
=
1
;
}
else
{
REV_E_DIR
();
count_direction
[
E_AXIS
]
=
1
;
count_direction
[
E_AXIS
]
=
1
;
}
}
#elif DISABLED(ADVANCE)
if
(
TEST
(
out_bits
,
E_AXIS
))
{
...
...
This diff is collapsed.
Click to expand it.
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