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