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
ee98a976
Commit
ee98a976
authored
9 years ago
by
MagoKimbra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New Pid endstop and fix M303 error
parent
7f4d4221
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
103 additions
and
119 deletions
+103
-119
Configuration.h
MarlinKimbra/Configuration.h
+1
-1
Configuration_adv.h
MarlinKimbra/Configuration_adv.h
+1
-1
Marlin.h
MarlinKimbra/Marlin.h
+1
-0
Marlin_main.cpp
MarlinKimbra/Marlin_main.cpp
+12
-7
comunication.h
MarlinKimbra/comunication.h
+9
-9
stepper.cpp
MarlinKimbra/stepper.cpp
+72
-93
temperature.cpp
MarlinKimbra/temperature.cpp
+6
-7
temperature.h
MarlinKimbra/temperature.h
+1
-1
No files found.
MarlinKimbra/Configuration.h
View file @
ee98a976
...
...
@@ -21,7 +21,6 @@
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
// build by the user have been successfully uploaded into firmware.
#define STRING_VERSION "4.1.3"
#define STRING_URL "reprap.org"
#define STRING_VERSION_CONFIG_H __DATE__ " " __TIME__ // build date and time
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
#define STRING_SPLASH_LINE1 "v" STRING_VERSION // will be shown during bootup in line 1
...
...
@@ -222,6 +221,7 @@
#define PID_FUNCTIONAL_RANGE 10 // degC
#define PID_INTEGRAL_DRIVE_MAX PID_MAX // Limit for the integral term
#define K1 0.95 // Smoothing factor within the PID
#define MAX_OVERSHOOT_PID_AUTOTUNE 20 // Max valor for overshoot autotune
// HotEnd{HE0,HE1,HE2,HE3}
#define DEFAULT_Kp {40, 40, 40, 40} // Kp for E0, E1, E2, E3
...
...
This diff is collapsed.
Click to expand it.
MarlinKimbra/Configuration_adv.h
View file @
ee98a976
...
...
@@ -31,7 +31,7 @@
/**
* Whenever an M104 or M109 increases the target temperature the firmware will wait for the
* WATCH_TEMP_PERIOD to
trans
pire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
* WATCH_TEMP_PERIOD to
ex
pire, and if the temperature hasn't increased by WATCH_TEMP_INCREASE
* degrees, the machine is halted, requiring a hard reset. This test restarts with any M104/M109,
* but only if the current temperature is far enough below the target for a reliable test.
*/
...
...
This diff is collapsed.
Click to expand it.
MarlinKimbra/Marlin.h
View file @
ee98a976
...
...
@@ -36,6 +36,7 @@
#define BIT(b) (1<<(b))
#define TEST(n,b) (((n)&BIT(b))!=0)
#define SET_BIT(n,b,value) (n) ^= ((-value)^(n)) & (BIT(b))
#define RADIANS(d) ((d)*M_PI/180.0)
#define DEGREES(r) ((d)*180.0/M_PI)
#define NOLESS(v,n) do{ if (v < n) v = n; }while(0)
...
...
This diff is collapsed.
Click to expand it.
MarlinKimbra/Marlin_main.cpp
View file @
ee98a976
...
...
@@ -3667,11 +3667,13 @@ inline void gcode_G92() {
didXYZ
=
true
;
}
}
#if defined(DELTA) || defined(SCARA)
if
(
didXYZ
)
sync_plan_position_delta
();
#else
if
(
didXYZ
)
sync_plan_position
();
#endif
if
(
didXYZ
)
{
#if defined(DELTA) || defined(SCARA)
sync_plan_position_delta
();
#else
sync_plan_position
();
#endif
}
}
#ifdef ULTIPANEL
...
...
@@ -5961,7 +5963,7 @@ inline void gcode_T() {
#else // !DUAL_X_CARRIAGE
// Offset hotend (only by XY)
#if HOTENDS > 1
for
(
int
i
=
X_AXIS
;
i
<=
Y_AXIS
;
i
++
)
for
(
int
i
=
X_AXIS
;
i
<=
Y_AXIS
;
i
++
)
current_position
[
i
]
+=
hotend_offset
[
i
][
target_extruder
]
-
hotend_offset
[
i
][
active_extruder
];
#endif // HOTENDS > 1
...
...
@@ -6409,7 +6411,10 @@ void process_next_command() {
#endif // PREVENT_DANGEROUS_EXTRUDE
case
303
:
// M303 PID autotune
gcode_M303
();
break
;
gcode_M303
();
gcode_LastN
+=
1
;
FlushSerialRequestResend
();
break
;
#ifdef PIDTEMPBED
case
304
:
// M304
...
...
This diff is collapsed.
Click to expand it.
MarlinKimbra/comunication.h
View file @
ee98a976
...
...
@@ -39,15 +39,15 @@
#endif
#endif
#define START "start"
//start for host
#define OK "ok"
//ok answer for host
#define ER "Error:
"
//error for host
#define WT "wait"
//wait for host
#define DB "
<MK4>: "
//message for user
#define RS "Resend:
"
//resend for host
#define PAUSE "//action:pause"
//command for host that support action
#define RESUME "//action:resume"
//command for host that support action
#define DISCONNECT "//action:disconnect"
//command for host that support action
#define START "start" //start for host
#define OK "ok" //ok answer for host
#define ER "Error:
"
//error for host
#define WT "wait" //wait for host
#define DB "
MK4: "
//message for user
#define RS "Resend:
"
//resend for host
#define PAUSE "//action:pause" //command for host that support action
#define RESUME "//action:resume" //command for host that support action
#define DISCONNECT "//action:disconnect" //command for host that support action
#define SERIAL_INIT(baud) MYSERIAL.begin(baud), delay(1)
#define SERIAL_WRITE(x) MYSERIAL.write(x)
...
...
This diff is collapsed.
Click to expand it.
MarlinKimbra/stepper.cpp
View file @
ee98a976
This diff is collapsed.
Click to expand it.
MarlinKimbra/temperature.cpp
View file @
ee98a976
...
...
@@ -55,9 +55,9 @@ float current_temperature_bed = 0.0;
#endif
#ifdef PIDTEMPBED
float
bedKp
=
DEFAULT_bedKp
;
float
bedKi
=
(
DEFAULT_bedKi
*
PID_dT
);
float
bedKd
=
(
DEFAULT_bedKd
/
PID_dT
);
float
bedKp
=
DEFAULT_bedKp
;
float
bedKi
=
(
DEFAULT_bedKi
*
PID_dT
);
float
bedKd
=
(
DEFAULT_bedKd
/
PID_dT
);
#endif //PIDTEMPBED
#ifdef FAN_SOFT_PWM
...
...
@@ -181,8 +181,7 @@ static void updateTemperaturesFromRawValues();
//================================ Functions ================================
//===========================================================================
void
PID_autotune
(
float
temp
,
int
hotend
,
int
ncycles
)
{
void
PID_autotune
(
float
temp
,
int
hotend
,
int
ncycles
)
{
float
input
=
0.0
;
int
cycles
=
0
;
bool
heating
=
true
;
...
...
@@ -300,7 +299,7 @@ void PID_autotune(float temp, int hotend, int ncycles)
}
}
}
if
(
input
>
temp
+
20
)
{
if
(
input
>
temp
+
MAX_OVERSHOOT_PID_AUTOTUNE
)
{
ECHO_LM
(
ER
,
MSG_PID_TEMP_TOO_HIGH
);
return
;
}
...
...
@@ -315,7 +314,7 @@ void PID_autotune(float temp, int hotend, int ncycles)
}
else
{
p
=
soft_pwm
[
hotend
];
ECHO_SMV
(
OK
,
MSG_T
,
input
);
ECHO_SMV
(
OK
,
MSG_T
,
input
,
1
);
ECHO_EMV
(
MSG_AT
,
p
);
}
...
...
This diff is collapsed.
Click to expand it.
MarlinKimbra/temperature.h
View file @
ee98a976
...
...
@@ -66,7 +66,7 @@ extern float current_temperature_bed;
#ifdef PIDTEMP
extern
float
Kp
[
HOTENDS
],
Ki
[
HOTENDS
],
Kd
[
HOTENDS
];
#define PID_PARAM(param,e) param[e] // use macro to point to array value
#define PID_PARAM(param,
e) param[e] // use macro to point to array value
float
scalePID_i
(
float
i
);
float
scalePID_d
(
float
d
);
float
unscalePID_i
(
float
i
);
...
...
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