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
aedb4d4e
Commit
aedb4d4e
authored
Jan 23, 2015
by
MagoKimbra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix code
parent
173df6c2
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
229 additions
and
216 deletions
+229
-216
Configuration.h
MarlinKimbra/Configuration.h
+6
-4
Configuration_Cartesian.h
MarlinKimbra/Configuration_Cartesian.h
+1
-1
Marlin_main.cpp
MarlinKimbra/Marlin_main.cpp
+26
-26
boards.h
MarlinKimbra/boards.h
+3
-4
language.h
MarlinKimbra/language.h
+3
-0
language_it.h
MarlinKimbra/language_it.h
+18
-18
pins.h
MarlinKimbra/pins.h
+8
-8
stepper.cpp
MarlinKimbra/stepper.cpp
+12
-21
temperature.cpp
MarlinKimbra/temperature.cpp
+145
-126
temperature.h
MarlinKimbra/temperature.h
+2
-3
ultralcd.cpp
MarlinKimbra/ultralcd.cpp
+3
-3
ultralcd.h
MarlinKimbra/ultralcd.h
+2
-2
No files found.
MarlinKimbra/Configuration.h
View file @
aedb4d4e
...
@@ -317,14 +317,16 @@
...
@@ -317,14 +317,16 @@
// If you want to enable this feature for all your extruder heaters,
// If you want to enable this feature for all your extruder heaters,
// uncomment the 2 defines below:
// uncomment the 2 defines below:
// Parameters for all extruder heaters
// Parameters for all extruder heaters
//#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 // seconds
//#define THERMAL_RUNAWAY_PROTECTION_PERIOD 40 //
in
seconds
//#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 //
degC
//#define THERMAL_RUNAWAY_PROTECTION_HYSTERESIS 4 //
in degree Celsius
// If you want to enable this feature for your bed heater,
// If you want to enable this feature for your bed heater,
// uncomment the 2 defines below:
// uncomment the 2 defines below:
// Parameters for the bed heater
// Parameters for the bed heater
//#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 // seconds
//#define THERMAL_RUNAWAY_PROTECTION_BED_PERIOD 20 //in seconds
//#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // degC
//#define THERMAL_RUNAWAY_PROTECTION_BED_HYSTERESIS 2 // in degree Celsius
//===========================================================================
//===========================================================================
//===========================================================================
...
...
MarlinKimbra/Configuration_Cartesian.h
View file @
aedb4d4e
...
@@ -218,7 +218,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the lo
...
@@ -218,7 +218,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the lo
#define DEFAULT_MAX_ACCELERATION {3000,3000,50,1000,1000,1000,1000} // X, Y, Z, E0, E1, E2, E3 maximum start speed for accelerated moves.
#define DEFAULT_MAX_ACCELERATION {3000,3000,50,1000,1000,1000,1000} // X, Y, Z, E0, E1, E2, E3 maximum start speed for accelerated moves.
#define DEFAULT_ACCELERATION 2500 // X, Y, Z and E max acceleration in mm/s^2 for printing moves
#define DEFAULT_ACCELERATION 2500 // X, Y, Z and E max acceleration in mm/s^2 for printing moves
#define DEFAULT_RETRACT_ACCELERATION
3000 // X, Y, Z and
E max acceleration in mm/s^2 for retracts
#define DEFAULT_RETRACT_ACCELERATION
10000 //
E max acceleration in mm/s^2 for retracts
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
...
...
MarlinKimbra/Marlin_main.cpp
View file @
aedb4d4e
...
@@ -239,9 +239,9 @@ int extruder_multiply[EXTRUDERS] = {100
...
@@ -239,9 +239,9 @@ int extruder_multiply[EXTRUDERS] = {100
,
100
,
100
#if EXTRUDERS > 2
#if EXTRUDERS > 2
,
100
,
100
#if EXTRUDERS > 3
#if EXTRUDERS > 3
,
100
,
100
#endif
#endif
#endif
#endif
#endif
#endif
};
};
...
@@ -4041,32 +4041,32 @@ Sigma_Exit:
...
@@ -4041,32 +4041,32 @@ Sigma_Exit:
float
area
=
.0
;
float
area
=
.0
;
if
(
code_seen
(
'D'
))
{
if
(
code_seen
(
'D'
))
{
float
diameter
=
(
float
)
code_value
();
float
diameter
=
(
float
)
code_value
();
if
(
diameter
==
0.0
)
{
if
(
diameter
==
0.0
)
{
// setting any extruder filament size disables volumetric on the assumption that
// setting any extruder filament size disables volumetric on the assumption that
// slicers either generate in extruder values as cubic mm or as as filament feeds
// slicers either generate in extruder values as cubic mm or as as filament feeds
// for all extruders
// for all extruders
volumetric_enabled
=
false
;
volumetric_enabled
=
false
;
}
else
{
}
else
{
filament_size
[
tmp_extruder
]
=
(
float
)
code_value
();
filament_size
[
tmp_extruder
]
=
(
float
)
code_value
();
// make sure all extruders have some sane value for the filament size
// make sure all extruders have some sane value for the filament size
filament_size
[
0
]
=
(
filament_size
[
0
]
==
0.0
?
DEFAULT_NOMINAL_FILAMENT_DIA
:
filament_size
[
0
]);
filament_size
[
0
]
=
(
filament_size
[
0
]
==
0.0
?
DEFAULT_NOMINAL_FILAMENT_DIA
:
filament_size
[
0
]);
#if EXTRUDERS > 1
#if EXTRUDERS > 1
filament_size
[
1
]
=
(
filament_size
[
1
]
==
0.0
?
DEFAULT_NOMINAL_FILAMENT_DIA
:
filament_size
[
1
]);
filament_size
[
1
]
=
(
filament_size
[
1
]
==
0.0
?
DEFAULT_NOMINAL_FILAMENT_DIA
:
filament_size
[
1
]);
#if EXTRUDERS > 2
#if EXTRUDERS > 2
filament_size
[
2
]
=
(
filament_size
[
2
]
==
0.0
?
DEFAULT_NOMINAL_FILAMENT_DIA
:
filament_size
[
2
]);
filament_size
[
2
]
=
(
filament_size
[
2
]
==
0.0
?
DEFAULT_NOMINAL_FILAMENT_DIA
:
filament_size
[
2
]);
#if EXTRUDERS > 3
#if EXTRUDERS > 3
filament_size
[
3
]
=
(
filament_size
[
3
]
==
0.0
?
DEFAULT_NOMINAL_FILAMENT_DIA
:
filament_size
[
3
]);
filament_size
[
3
]
=
(
filament_size
[
3
]
==
0.0
?
DEFAULT_NOMINAL_FILAMENT_DIA
:
filament_size
[
3
]);
#endif
#endif //EXTRUDERS > 3
#endif
#endif //EXTRUDERS > 2
#endif
#endif //EXTRUDERS > 1
volumetric_enabled
=
true
;
volumetric_enabled
=
true
;
}
}
}
else
{
}
else
{
//reserved for setting filament diameter via UFID or filament measuring device
//reserved for setting filament diameter via UFID or filament measuring device
break
;
break
;
}
}
calculate_volumetric_multipliers
();
calculate_volumetric_multipliers
();
}
}
break
;
break
;
case
201
:
// M201
case
201
:
// M201
...
@@ -6104,8 +6104,8 @@ void calculate_volumetric_multipliers() {
...
@@ -6104,8 +6104,8 @@ void calculate_volumetric_multipliers() {
volumetric_multiplier
[
2
]
=
calculate_volumetric_multiplier
(
filament_size
[
2
]);
volumetric_multiplier
[
2
]
=
calculate_volumetric_multiplier
(
filament_size
[
2
]);
#if EXTRUDERS > 3
#if EXTRUDERS > 3
volumetric_multiplier
[
3
]
=
calculate_volumetric_multiplier
(
filament_size
[
3
]);
volumetric_multiplier
[
3
]
=
calculate_volumetric_multiplier
(
filament_size
[
3
]);
#endif
#endif
//EXTRUDERS > 3
#endif
#endif
//EXTRUDERS > 2
#endif
#endif
//EXTRUDERS > 1
}
}
MarlinKimbra/boards.h
View file @
aedb4d4e
...
@@ -28,7 +28,8 @@
...
@@ -28,7 +28,8 @@
#define BOARD_ULTIMAKER 7 // Ultimaker
#define BOARD_ULTIMAKER 7 // Ultimaker
#define BOARD_ULTIMAKER_OLD 71 // Ultimaker (Older electronics. Pre 1.5.4. This is rare)
#define BOARD_ULTIMAKER_OLD 71 // Ultimaker (Older electronics. Pre 1.5.4. This is rare)
#define BOARD_ULTIMAIN_2 72 // Ultimainboard 2.x (Uses TEMP_SENSOR 20)
#define BOARD_ULTIMAIN_2 72 // Ultimainboard 2.x (Uses TEMP_SENSOR 20)
#define BOARD_3DRAG 77 // 3Drag Controller / Vellemann K8200 Controller
#define BOARD_3DRAG 77 // 3Drag Controller
#define BOARD_K8200 78 // Vellemann K8200 Controller (derived from 3Drag Controller)
#define BOARD_TEENSYLU 8 // Teensylu
#define BOARD_TEENSYLU 8 // Teensylu
#define BOARD_RUMBA 80 // Rumba
#define BOARD_RUMBA 80 // Rumba
#define BOARD_PRINTRBOARD 81 // Printrboard (AT90USB1286)
#define BOARD_PRINTRBOARD 81 // Printrboard (AT90USB1286)
...
@@ -40,7 +41,6 @@
...
@@ -40,7 +41,6 @@
#define BOARD_MEGATRONICS 70 // Megatronics
#define BOARD_MEGATRONICS 70 // Megatronics
#define BOARD_MEGATRONICS_2 701 // Megatronics v2.0
#define BOARD_MEGATRONICS_2 701 // Megatronics v2.0
#define BOARD_MEGATRONICS_1 702 // Minitronics v1.0
#define BOARD_MEGATRONICS_1 702 // Minitronics v1.0
#define BOARD_MEGATRONICS_3 703 // Megatronics v3.0
#define BOARD_OMCA_A 90 // Alpha OMCA board
#define BOARD_OMCA_A 90 // Alpha OMCA board
#define BOARD_OMCA 91 // Final OMCA board
#define BOARD_OMCA 91 // Final OMCA board
#define BOARD_RAMBO 301 // Rambo
#define BOARD_RAMBO 301 // Rambo
...
@@ -48,8 +48,7 @@
...
@@ -48,8 +48,7 @@
#define BOARD_5DPRINT 88 // 5DPrint D8 Driver Board
#define BOARD_5DPRINT 88 // 5DPrint D8 Driver Board
#define BOARD_LEAPFROG 999 // Leapfrog
#define BOARD_LEAPFROG 999 // Leapfrog
#define BOARD_99 99 // This is in pins.h but...?
#define MB(board) (MOTHERBOARD==BOARD_##board)
#define MB(board) (MOTHERBOARD==BOARD_##board)
#define IS_RAMPS (MB(RAMPS_OLD) || MB(RAMPS_13_EFB) || MB(RAMPS_13_EEB) || MB(RAMPS_13_EFF) || MB(RAMPS_13_EEF))
#define IS_RAMPS (MB(RAMPS_OLD) || MB(RAMPS_13_EFB) || MB(RAMPS_13_EEB) || MB(RAMPS_13_EFF) || MB(RAMPS_13_EEF))
...
...
MarlinKimbra/language.h
View file @
aedb4d4e
...
@@ -36,6 +36,9 @@
...
@@ -36,6 +36,9 @@
#elif MB(3DRAG)
#elif MB(3DRAG)
#define MACHINE_NAME "3Drag"
#define MACHINE_NAME "3Drag"
#define FIRMWARE_URL "http://3dprint.elettronicain.it/"
#define FIRMWARE_URL "http://3dprint.elettronicain.it/"
#elif MB(K8200)
#define MACHINE_NAME "K8200"
#define FIRMWARE_URL "https://github.com/MagoKimbra/MarlinKimbra"
#elif MB(5DPRINT)
#elif MB(5DPRINT)
#define MACHINE_NAME "Makibox"
#define MACHINE_NAME "Makibox"
#define FIRMWARE_URL "https://github.com/MagoKimbra/MarlinKimbra"
#define FIRMWARE_URL "https://github.com/MagoKimbra/MarlinKimbra"
...
...
MarlinKimbra/language_it.h
View file @
aedb4d4e
...
@@ -47,16 +47,16 @@
...
@@ -47,16 +47,16 @@
#define MSG_EXTRUDE "Estrudi"
#define MSG_EXTRUDE "Estrudi"
#define MSG_RETRACT "Ritrai"
#define MSG_RETRACT "Ritrai"
#define MSG_MOVE_AXIS "Muovi Asse"
#define MSG_MOVE_AXIS "Muovi Asse"
#define MSG_MOVE_X "M
ove
X"
#define MSG_MOVE_X "M
uovi
X"
#define MSG_MOVE_Y "M
ove
Y"
#define MSG_MOVE_Y "M
uovi
Y"
#define MSG_MOVE_Z "M
ove
Z"
#define MSG_MOVE_Z "M
uovi
Z"
#define MSG_MOVE_E "E
xtruder
"
#define MSG_MOVE_E "E
strusore
"
#define MSG_MOVE_E1 "E
xtruder
2"
#define MSG_MOVE_E1 "E
strusore
2"
#define MSG_MOVE_E2 "E
xtruder
3"
#define MSG_MOVE_E2 "E
strusore
3"
#define MSG_MOVE_E3 "E
xtruder
4"
#define MSG_MOVE_E3 "E
strusore
4"
#define MSG_MOVE_01MM "M
ove
0.1mm"
#define MSG_MOVE_01MM "M
uovi di
0.1mm"
#define MSG_MOVE_1MM "M
ove
1mm"
#define MSG_MOVE_1MM "M
uovi di
1mm"
#define MSG_MOVE_10MM "M
ove
10mm"
#define MSG_MOVE_10MM "M
uovi di
10mm"
#define MSG_SPEED "Velcità"
#define MSG_SPEED "Velcità"
#define MSG_NOZZLE "Ugello"
#define MSG_NOZZLE "Ugello"
#define MSG_NOZZLE1 "Ugello2"
#define MSG_NOZZLE1 "Ugello2"
...
@@ -88,7 +88,7 @@
...
@@ -88,7 +88,7 @@
#define MSG_PID_P3 "PID-P E4"
#define MSG_PID_P3 "PID-P E4"
#define MSG_PID_I3 "PID-I E4"
#define MSG_PID_I3 "PID-I E4"
#define MSG_PID_D3 "PID-D E4"
#define MSG_PID_D3 "PID-D E4"
#define MSG_ACC "Accel"
#define MSG_ACC "Accel
.
"
#define MSG_VXY_JERK "Vxy-jerk"
#define MSG_VXY_JERK "Vxy-jerk"
#define MSG_VZ_JERK "Vz-jerk"
#define MSG_VZ_JERK "Vz-jerk"
#define MSG_VE_JERK "Ve-jerk"
#define MSG_VE_JERK "Ve-jerk"
...
@@ -111,12 +111,12 @@
...
@@ -111,12 +111,12 @@
#define MSG_TEMPERATURE "Temperatura"
#define MSG_TEMPERATURE "Temperatura"
#define MSG_MOTION "Movimento"
#define MSG_MOTION "Movimento"
#define MSG_VOLUMETRIC "Filament"
#define MSG_VOLUMETRIC "Filament"
#define MSG_VOLUMETRIC_ENABLED
"E in mm3
"
#define MSG_VOLUMETRIC_ENABLED
"E in mm³
"
#define MSG_FILAMENT_SIZE_EXTRUDER_0 "
Fil. Dia.
1"
#define MSG_FILAMENT_SIZE_EXTRUDER_0 "
Diam. filo
1"
#define MSG_FILAMENT_SIZE_EXTRUDER_1 "
Fil. Dia.
2"
#define MSG_FILAMENT_SIZE_EXTRUDER_1 "
Diam. filo
2"
#define MSG_FILAMENT_SIZE_EXTRUDER_2 "
Fil. Dia.
3"
#define MSG_FILAMENT_SIZE_EXTRUDER_2 "
Diam. filo
3"
#define MSG_FILAMENT_SIZE_EXTRUDER_3 "
Fil. Dia.
4"
#define MSG_FILAMENT_SIZE_EXTRUDER_3 "
Diam. filo
4"
#define MSG_CONTRAST "
LCD contrast
"
#define MSG_CONTRAST "
Contrasto LCD
"
#define MSG_STORE_EPROM "Salva in EEPROM"
#define MSG_STORE_EPROM "Salva in EEPROM"
#define MSG_LOAD_EPROM "Carica da EEPROM"
#define MSG_LOAD_EPROM "Carica da EEPROM"
#define MSG_RESTORE_FAILSAFE "Impostaz. default"
#define MSG_RESTORE_FAILSAFE "Impostaz. default"
...
@@ -153,7 +153,7 @@
...
@@ -153,7 +153,7 @@
#define MSG_BABYSTEP_X "Babystep X"
#define MSG_BABYSTEP_X "Babystep X"
#define MSG_BABYSTEP_Y "Babystep Y"
#define MSG_BABYSTEP_Y "Babystep Y"
#define MSG_BABYSTEP_Z "Babystep Z"
#define MSG_BABYSTEP_Z "Babystep Z"
#define MSG_ENDSTOP_ABORT "
Endstop
abort"
#define MSG_ENDSTOP_ABORT "
Finecorsa
abort"
#define MSG_RECTRACT "Ritrai"
#define MSG_RECTRACT "Ritrai"
...
...
MarlinKimbra/pins.h
View file @
aedb4d4e
...
@@ -656,12 +656,12 @@
...
@@ -656,12 +656,12 @@
#endif
#endif
#if MB(RAMPS_13_EFB) || MB(RAMPS_13_EFF) || MB(AZTEEG_X3) || MB(AZTEEG_X3_PRO)
#if MB(RAMPS_13_EFB) || MB(RAMPS_13_EFF) || MB(AZTEEG_X3) || MB(AZTEEG_X3_PRO)
#define ORIG_FAN_PIN 9 //
9
(Sprinter config)
#define ORIG_FAN_PIN 9 // (Sprinter config)
#else
#else
#define ORIG_FAN_PIN 4 // IO pin. Buffer needed
#define ORIG_FAN_PIN 4 // IO pin. Buffer needed
#endif
#endif
#if MB(3DRAG) || MB(RAMPS_13_EEF)
#if MB(3DRAG) || MB(
K8200) || MB(
RAMPS_13_EEF)
#define ORIG_FAN_PIN 8
#define ORIG_FAN_PIN 8
#endif
#endif
...
@@ -690,7 +690,7 @@
...
@@ -690,7 +690,7 @@
#endif
#endif
#if MB(3DRAG)
#if MB(3DRAG)
|| MB(K8200)
#define ORIG_HEATER_0_PIN 10
#define ORIG_HEATER_0_PIN 10
#define ORIG_HEATER_1_PIN 12
#define ORIG_HEATER_1_PIN 12
#define ORIG_HEATER_2_PIN 6
#define ORIG_HEATER_2_PIN 6
...
@@ -720,7 +720,7 @@
...
@@ -720,7 +720,7 @@
#if MB(RAMPS_13_EFF) || MB(RAMPS_13_EEF)
#if MB(RAMPS_13_EFF) || MB(RAMPS_13_EEF)
#define ORIG_HEATER_BED_PIN -1 // NO BED
#define ORIG_HEATER_BED_PIN -1 // NO BED
#else
#else
#if MB(3DRAG)
#if MB(3DRAG)
|| MB(K8200)
#define ORIG_HEATER_BED_PIN 9 // BED
#define ORIG_HEATER_BED_PIN 9 // BED
#else
#else
#define ORIG_HEATER_BED_PIN 8 // BED
#define ORIG_HEATER_BED_PIN 8 // BED
...
@@ -813,7 +813,7 @@
...
@@ -813,7 +813,7 @@
#endif
#endif
#if MB(3DRAG)
#if MB(3DRAG)
|| MB(K8200)
#define BEEPER -1
#define BEEPER -1
#define LCD_PINS_RS 27
#define LCD_PINS_RS 27
...
@@ -895,7 +895,7 @@
...
@@ -895,7 +895,7 @@
#define ORIG_TEMP_2_PIN -1
#define ORIG_TEMP_2_PIN -1
#define ORIG_TEMP_BED_PIN 1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
#define ORIG_TEMP_BED_PIN 1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
#endif // RAMPS_13_EFB || RAMPS_13_EEB || RAMPS_13_EFF || 3DRAG
#endif // RAMPS_13_EFB || RAMPS_13_EEB || RAMPS_13_EFF || 3DRAG
|| K8200
// SPI for Max6675 Thermocouple
// SPI for Max6675 Thermocouple
...
@@ -909,7 +909,7 @@
...
@@ -909,7 +909,7 @@
#define MAX6675_SS 66// Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present
#define MAX6675_SS 66// Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present
#endif
#endif
#endif // RAMPS_OLD || RAMPS_13_EFB || RAMPS_13_EEB || RAMPS_13_EFF || 3DRAG
#endif // RAMPS_OLD || RAMPS_13_EFB || RAMPS_13_EEB || RAMPS_13_EFF || 3DRAG
|| K8200
/****************************************************************************************
/****************************************************************************************
* Duemilanove w/ ATMega328P pin assignment
* Duemilanove w/ ATMega328P pin assignment
...
@@ -3204,4 +3204,4 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a
...
@@ -3204,4 +3204,4 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a
HEATER_BED_PIN, FAN_PIN, \
HEATER_BED_PIN, FAN_PIN, \
_E0_PINS _E1_PINS _E2_PINS _E3_PINS \
_E0_PINS _E1_PINS _E2_PINS _E3_PINS \
analogInputToDigitalPin(TEMP_0_PIN), analogInputToDigitalPin(TEMP_1_PIN), analogInputToDigitalPin(TEMP_2_PIN), analogInputToDigitalPin(TEMP_3_PIN), analogInputToDigitalPin(TEMP_BED_PIN) }
analogInputToDigitalPin(TEMP_0_PIN), analogInputToDigitalPin(TEMP_1_PIN), analogInputToDigitalPin(TEMP_2_PIN), analogInputToDigitalPin(TEMP_3_PIN), analogInputToDigitalPin(TEMP_BED_PIN) }
#endif
#endif
//__PINS_H
MarlinKimbra/stepper.cpp
View file @
aedb4d4e
...
@@ -299,12 +299,6 @@ void st_wake_up() {
...
@@ -299,12 +299,6 @@ void st_wake_up() {
ENABLE_STEPPER_DRIVER_INTERRUPT
();
ENABLE_STEPPER_DRIVER_INTERRUPT
();
}
}
void
step_wait
(){
for
(
int8_t
i
=
0
;
i
<
6
;
i
++
){
}
}
FORCE_INLINE
unsigned
short
calc_timer
(
unsigned
short
step_rate
)
{
FORCE_INLINE
unsigned
short
calc_timer
(
unsigned
short
step_rate
)
{
unsigned
short
timer
;
unsigned
short
timer
;
if
(
step_rate
>
MAX_STEP_FREQUENCY
)
step_rate
=
MAX_STEP_FREQUENCY
;
if
(
step_rate
>
MAX_STEP_FREQUENCY
)
step_rate
=
MAX_STEP_FREQUENCY
;
...
@@ -1107,7 +1101,7 @@ void st_init()
...
@@ -1107,7 +1101,7 @@ void st_init()
WRITE
(
E3_STEP_PIN
,
INVERT_E_STEP_PIN
);
WRITE
(
E3_STEP_PIN
,
INVERT_E_STEP_PIN
);
disable_e3
();
disable_e3
();
#endif
#endif
// waveform generation = 0100 = CTC
// waveform generation = 0100 = CTC
TCCR1B
&=
~
(
1
<<
WGM13
);
TCCR1B
&=
~
(
1
<<
WGM13
);
TCCR1B
|=
(
1
<<
WGM12
);
TCCR1B
|=
(
1
<<
WGM12
);
...
@@ -1249,9 +1243,9 @@ void babystep(const uint8_t axis,const bool direction)
...
@@ -1249,9 +1243,9 @@ void babystep(const uint8_t axis,const bool direction)
#ifdef DUAL_X_CARRIAGE
#ifdef DUAL_X_CARRIAGE
WRITE
(
X2_STEP_PIN
,
!
INVERT_X_STEP_PIN
);
WRITE
(
X2_STEP_PIN
,
!
INVERT_X_STEP_PIN
);
#endif
#endif
{
float
x
=
1.
/
float
(
axis
+
1
)
/
float
(
axis
+
2
);
//wait a tiny bit
_delay_us
(
1U
);
// wait 1 microsecond
}
WRITE
(
X_STEP_PIN
,
INVERT_X_STEP_PIN
);
WRITE
(
X_STEP_PIN
,
INVERT_X_STEP_PIN
);
#ifdef DUAL_X_CARRIAGE
#ifdef DUAL_X_CARRIAGE
WRITE
(
X2_STEP_PIN
,
INVERT_X_STEP_PIN
);
WRITE
(
X2_STEP_PIN
,
INVERT_X_STEP_PIN
);
...
@@ -1281,9 +1275,9 @@ void babystep(const uint8_t axis,const bool direction)
...
@@ -1281,9 +1275,9 @@ void babystep(const uint8_t axis,const bool direction)
#ifdef DUAL_Y_CARRIAGE
#ifdef DUAL_Y_CARRIAGE
WRITE
(
Y2_STEP_PIN
,
!
INVERT_Y_STEP_PIN
);
WRITE
(
Y2_STEP_PIN
,
!
INVERT_Y_STEP_PIN
);
#endif
#endif
{
float
x
=
1.
/
float
(
axis
+
1
)
/
float
(
axis
+
2
);
//wait a tiny bit
_delay_us
(
1U
);
// wait 1 microsecond
}
WRITE
(
Y_STEP_PIN
,
INVERT_Y_STEP_PIN
);
WRITE
(
Y_STEP_PIN
,
INVERT_Y_STEP_PIN
);
#ifdef DUAL_Y_CARRIAGE
#ifdef DUAL_Y_CARRIAGE
WRITE
(
Y2_STEP_PIN
,
INVERT_Y_STEP_PIN
);
WRITE
(
Y2_STEP_PIN
,
INVERT_Y_STEP_PIN
);
...
@@ -1313,10 +1307,9 @@ void babystep(const uint8_t axis,const bool direction)
...
@@ -1313,10 +1307,9 @@ void babystep(const uint8_t axis,const bool direction)
#ifdef Z_DUAL_STEPPER_DRIVERS
#ifdef Z_DUAL_STEPPER_DRIVERS
WRITE
(
Z2_STEP_PIN
,
!
INVERT_Z_STEP_PIN
);
WRITE
(
Z2_STEP_PIN
,
!
INVERT_Z_STEP_PIN
);
#endif
#endif
//wait a tiny bit
{
_delay_us
(
1U
);
// wait 1 microsecond
float
x
=
1.
/
float
(
axis
+
1
);
//absolutely useless
}
WRITE
(
Z_STEP_PIN
,
INVERT_Z_STEP_PIN
);
WRITE
(
Z_STEP_PIN
,
INVERT_Z_STEP_PIN
);
#ifdef Z_DUAL_STEPPER_DRIVERS
#ifdef Z_DUAL_STEPPER_DRIVERS
WRITE
(
Z2_STEP_PIN
,
INVERT_Z_STEP_PIN
);
WRITE
(
Z2_STEP_PIN
,
INVERT_Z_STEP_PIN
);
...
@@ -1349,10 +1342,8 @@ void babystep(const uint8_t axis,const bool direction)
...
@@ -1349,10 +1342,8 @@ void babystep(const uint8_t axis,const bool direction)
WRITE
(
Y_STEP_PIN
,
!
INVERT_Y_STEP_PIN
);
WRITE
(
Y_STEP_PIN
,
!
INVERT_Y_STEP_PIN
);
WRITE
(
Z_STEP_PIN
,
!
INVERT_Z_STEP_PIN
);
WRITE
(
Z_STEP_PIN
,
!
INVERT_Z_STEP_PIN
);
//wait a tiny bit
_delay_us
(
1U
);
// wait 1 microsecond
{
float
x
=
1.
/
float
(
axis
+
1
);
//absolutely useless
}
WRITE
(
X_STEP_PIN
,
INVERT_X_STEP_PIN
);
WRITE
(
X_STEP_PIN
,
INVERT_X_STEP_PIN
);
WRITE
(
Y_STEP_PIN
,
INVERT_Y_STEP_PIN
);
WRITE
(
Y_STEP_PIN
,
INVERT_Y_STEP_PIN
);
WRITE
(
Z_STEP_PIN
,
INVERT_Z_STEP_PIN
);
WRITE
(
Z_STEP_PIN
,
INVERT_Z_STEP_PIN
);
...
...
MarlinKimbra/temperature.cpp
View file @
aedb4d4e
...
@@ -163,8 +163,8 @@ static volatile bool temp_meas_ready = false;
...
@@ -163,8 +163,8 @@ static volatile bool temp_meas_ready = false;
// Init min and max temp with extreme values to prevent false errors during startup
// Init min and max temp with extreme values to prevent false errors during startup
#ifndef SINGLENOZZLE
#ifndef SINGLENOZZLE
static
int
minttemp_raw
[
EXTRUDERS
]
=
ARRAY_BY_EXTRUDERS
(
HEATER_0_RAW_LO_TEMP
,
HEATER_1_RAW_LO_TEMP
,
HEATER_2_RAW_LO_TEMP
,
HEATER_3_RAW_LO_TEMP
);
static
int
minttemp_raw
[
EXTRUDERS
]
=
ARRAY_BY_EXTRUDERS
(
HEATER_0_RAW_LO_TEMP
,
HEATER_1_RAW_LO_TEMP
,
HEATER_2_RAW_LO_TEMP
,
HEATER_3_RAW_LO_TEMP
);
static
int
maxttemp_raw
[
EXTRUDERS
]
=
ARRAY_BY_EXTRUDERS
(
HEATER_0_RAW_HI_TEMP
,
HEATER_1_RAW_HI_TEMP
,
HEATER_2_RAW_HI_TEMP
,
HEATER_3_RAW_HI_TEMP
);
static
int
maxttemp_raw
[
EXTRUDERS
]
=
ARRAY_BY_EXTRUDERS
(
HEATER_0_RAW_HI_TEMP
,
HEATER_1_RAW_HI_TEMP
,
HEATER_2_RAW_HI_TEMP
,
HEATER_3_RAW_HI_TEMP
);
static
int
minttemp
[
EXTRUDERS
]
=
ARRAY_BY_EXTRUDERS
(
0
,
0
,
0
,
0
);
static
int
minttemp
[
EXTRUDERS
]
=
ARRAY_BY_EXTRUDERS
(
0
,
0
,
0
,
0
);
static
int
maxttemp
[
EXTRUDERS
]
=
ARRAY_BY_EXTRUDERS
(
16383
,
16383
,
16383
,
16383
);
static
int
maxttemp
[
EXTRUDERS
]
=
ARRAY_BY_EXTRUDERS
(
16383
,
16383
,
16383
,
16383
);
//static int bed_minttemp_raw = HEATER_BED_RAW_LO_TEMP; /* No bed mintemp error implemented?!? */
//static int bed_minttemp_raw = HEATER_BED_RAW_LO_TEMP; /* No bed mintemp error implemented?!? */
...
@@ -576,7 +576,7 @@ void manage_heater()
...
@@ -576,7 +576,7 @@ void manage_heater()
SERIAL_ECHO
(
" iTerm "
);
SERIAL_ECHO
(
" iTerm "
);
SERIAL_ECHO
(
iTerm
[
e
]);
SERIAL_ECHO
(
iTerm
[
e
]);
SERIAL_ECHO
(
" dTerm "
);
SERIAL_ECHO
(
" dTerm "
);
SERIAL_ECHOLN
(
dTerm
[
e
]);
SERIAL_ECHOLN
(
dTerm
[
e
]);
#endif //PID_DEBUG
#endif //PID_DEBUG
#else
/* PID off */
#else
/* PID off */
pid_output
=
0
;
pid_output
=
0
;
...
@@ -969,29 +969,29 @@ void tp_init()
...
@@ -969,29 +969,29 @@ void tp_init()
DIDR2
|=
1
<<
(
TEMP_0_PIN
-
8
);
DIDR2
|=
1
<<
(
TEMP_0_PIN
-
8
);
#endif
#endif
#endif
#endif
#ifndef SINGLENOZZLE
#ifndef SINGLENOZZLE
#if defined(TEMP_1_PIN) && (TEMP_1_PIN > -1)
#if defined(TEMP_1_PIN) && (TEMP_1_PIN > -1)
#if TEMP_1_PIN < 8
#if TEMP_1_PIN < 8
DIDR0
|=
1
<<
TEMP_1_PIN
;
DIDR0
|=
1
<<
TEMP_1_PIN
;
#else
#else
DIDR2
|=
1
<<
(
TEMP_1_PIN
-
8
);
DIDR2
|=
1
<<
(
TEMP_1_PIN
-
8
);
#endif
#endif
#endif
#if defined(TEMP_2_PIN) && (TEMP_2_PIN > -1)
#endif
#if TEMP_2_PIN < 8
#if defined(TEMP_2_PIN) && (TEMP_2_PIN > -1)
DIDR0
|=
1
<<
TEMP_2_PIN
;
#if TEMP_2_PIN < 8
#else
DIDR0
|=
1
<<
TEMP_2_PIN
;
DIDR2
|=
1
<<
(
TEMP_2_PIN
-
8
);
#else
#endif
DIDR2
|=
1
<<
(
TEMP_2_PIN
-
8
);
#endif
#endif
#if defined(TEMP_3_PIN) && (TEMP_3_PIN > -1)
#endif
#if TEMP_3_PIN < 8
#if defined(TEMP_3_PIN) && (TEMP_3_PIN > -1)
DIDR0
|=
1
<<
TEMP_3_PIN
;
#if TEMP_3_PIN < 8
#else
DIDR0
|=
1
<<
TEMP_3_PIN
;
DIDR2
|=
1
<<
(
TEMP_3_PIN
-
8
);
#else
#endif
DIDR2
|=
1
<<
(
TEMP_3_PIN
-
8
);
#endif
#endif
#endif // !SINGLENOZZLE
#endif
#endif // !SINGLENOZZLE
#if defined(TEMP_BED_PIN) && (TEMP_BED_PIN > -1)
#if defined(TEMP_BED_PIN) && (TEMP_BED_PIN > -1)
#if TEMP_BED_PIN < 8
#if TEMP_BED_PIN < 8
...
@@ -1003,13 +1003,13 @@ void tp_init()
...
@@ -1003,13 +1003,13 @@ void tp_init()
//Added for Filament Sensor
//Added for Filament Sensor
#ifdef FILAMENT_SENSOR
#ifdef FILAMENT_SENSOR
#if defined(FILWIDTH_PIN) && (FILWIDTH_PIN > -1)
#if defined(FILWIDTH_PIN) && (FILWIDTH_PIN > -1)
#if FILWIDTH_PIN < 8
#if FILWIDTH_PIN < 8
DIDR0
|=
1
<<
FILWIDTH_PIN
;
DIDR0
|=
1
<<
FILWIDTH_PIN
;
#else
#else
DIDR2
|=
1
<<
(
FILWIDTH_PIN
-
8
);
DIDR2
|=
1
<<
(
FILWIDTH_PIN
-
8
);
#endif
#endif
#endif
#endif
#endif
#endif
// Use timer0 for temperature measurement
// Use timer0 for temperature measurement
...
@@ -1041,68 +1041,68 @@ void tp_init()
...
@@ -1041,68 +1041,68 @@ void tp_init()
}
}
#endif //MAXTEMP
#endif //MAXTEMP
#ifndef SINGLENOZZLE
#ifndef SINGLENOZZLE
#if (EXTRUDERS > 1) && defined(HEATER_1_MINTEMP)
#if (EXTRUDERS > 1) && defined(HEATER_1_MINTEMP)
minttemp
[
1
]
=
HEATER_1_MINTEMP
;
minttemp
[
1
]
=
HEATER_1_MINTEMP
;
while
(
analog2temp
(
minttemp_raw
[
1
],
1
)
<
HEATER_1_MINTEMP
)
{
while
(
analog2temp
(
minttemp_raw
[
1
],
1
)
<
HEATER_1_MINTEMP
)
{
#if HEATER_1_RAW_LO_TEMP < HEATER_1_RAW_HI_TEMP
#if HEATER_1_RAW_LO_TEMP < HEATER_1_RAW_HI_TEMP
minttemp_raw
[
1
]
+=
OVERSAMPLENR
;
minttemp_raw
[
1
]
+=
OVERSAMPLENR
;
#else
#else
minttemp_raw
[
1
]
-=
OVERSAMPLENR
;
minttemp_raw
[
1
]
-=
OVERSAMPLENR
;
#endif
#endif
}
}
#endif // MINTEMP 1
#endif // MINTEMP 1
#if (EXTRUDERS > 1) && defined(HEATER_1_MAXTEMP)
#if (EXTRUDERS > 1) && defined(HEATER_1_MAXTEMP)
maxttemp
[
1
]
=
HEATER_1_MAXTEMP
;
maxttemp
[
1
]
=
HEATER_1_MAXTEMP
;
while
(
analog2temp
(
maxttemp_raw
[
1
],
1
)
>
HEATER_1_MAXTEMP
)
{
while
(
analog2temp
(
maxttemp_raw
[
1
],
1
)
>
HEATER_1_MAXTEMP
)
{
#if HEATER_1_RAW_LO_TEMP < HEATER_1_RAW_HI_TEMP
#if HEATER_1_RAW_LO_TEMP < HEATER_1_RAW_HI_TEMP
maxttemp_raw
[
1
]
-=
OVERSAMPLENR
;
maxttemp_raw
[
1
]
-=
OVERSAMPLENR
;
#else
#else
maxttemp_raw
[
1
]
+=
OVERSAMPLENR
;
maxttemp_raw
[
1
]
+=
OVERSAMPLENR
;
#endif
#endif
}
}
#endif //MAXTEMP 1
#endif //MAXTEMP 1
#if (EXTRUDERS > 2) && defined(HEATER_2_MINTEMP)
#if (EXTRUDERS > 2) && defined(HEATER_2_MINTEMP)
minttemp
[
2
]
=
HEATER_2_MINTEMP
;
minttemp
[
2
]
=
HEATER_2_MINTEMP
;
while
(
analog2temp
(
minttemp_raw
[
2
],
2
)
<
HEATER_2_MINTEMP
)
{
while
(
analog2temp
(
minttemp_raw
[
2
],
2
)
<
HEATER_2_MINTEMP
)
{
#if HEATER_2_RAW_LO_TEMP < HEATER_2_RAW_HI_TEMP
#if HEATER_2_RAW_LO_TEMP < HEATER_2_RAW_HI_TEMP
minttemp_raw
[
2
]
+=
OVERSAMPLENR
;
minttemp_raw
[
2
]
+=
OVERSAMPLENR
;
#else
#else
minttemp_raw
[
2
]
-=
OVERSAMPLENR
;
minttemp_raw
[
2
]
-=
OVERSAMPLENR
;
#endif
#endif
}
}
#endif //MINTEMP 2
#endif //MINTEMP 2
#if (EXTRUDERS > 2) && defined(HEATER_2_MAXTEMP)
#if (EXTRUDERS > 2) && defined(HEATER_2_MAXTEMP)
maxttemp
[
2
]
=
HEATER_2_MAXTEMP
;
maxttemp
[
2
]
=
HEATER_2_MAXTEMP
;
while
(
analog2temp
(
maxttemp_raw
[
2
],
2
)
>
HEATER_2_MAXTEMP
)
{
while
(
analog2temp
(
maxttemp_raw
[
2
],
2
)
>
HEATER_2_MAXTEMP
)
{
#if HEATER_2_RAW_LO_TEMP < HEATER_2_RAW_HI_TEMP
#if HEATER_2_RAW_LO_TEMP < HEATER_2_RAW_HI_TEMP
maxttemp_raw
[
2
]
-=
OVERSAMPLENR
;
maxttemp_raw
[
2
]
-=
OVERSAMPLENR
;
#else
#else
maxttemp_raw
[
2
]
+=
OVERSAMPLENR
;
maxttemp_raw
[
2
]
+=
OVERSAMPLENR
;
#endif
#endif
}
}
#endif //MAXTEMP 2
#endif //MAXTEMP 2
#if (EXTRUDERS > 3) && defined(HEATER_3_MINTEMP)
#if (EXTRUDERS > 3) && defined(HEATER_3_MINTEMP)
minttemp
[
3
]
=
HEATER_3_MINTEMP
;
minttemp
[
3
]
=
HEATER_3_MINTEMP
;
while
(
analog2temp
(
minttemp_raw
[
3
],
3
)
<
HEATER_3_MINTEMP
)
{
while
(
analog2temp
(
minttemp_raw
[
3
],
3
)
<
HEATER_3_MINTEMP
)
{
#if HEATER_3_RAW_LO_TEMP < HEATER_3_RAW_HI_TEMP
#if HEATER_3_RAW_LO_TEMP < HEATER_3_RAW_HI_TEMP
minttemp_raw
[
3
]
+=
OVERSAMPLENR
;
minttemp_raw
[
3
]
+=
OVERSAMPLENR
;
#else
#else
minttemp_raw
[
3
]
-=
OVERSAMPLENR
;
minttemp_raw
[
3
]
-=
OVERSAMPLENR
;
#endif
#endif
}
}
#endif //MINTEMP 3
#endif //MINTEMP 3
#if (EXTRUDERS > 3) && defined(HEATER_3_MAXTEMP)
#if (EXTRUDERS > 3) && defined(HEATER_3_MAXTEMP)
maxttemp
[
3
]
=
HEATER_3_MAXTEMP
;
maxttemp
[
3
]
=
HEATER_3_MAXTEMP
;
while
(
analog2temp
(
maxttemp_raw
[
3
],
3
)
>
HEATER_3_MAXTEMP
)
{
while
(
analog2temp
(
maxttemp_raw
[
3
],
3
)
>
HEATER_3_MAXTEMP
)
{
#if HEATER_3_RAW_LO_TEMP < HEATER_3_RAW_HI_TEMP
#if HEATER_3_RAW_LO_TEMP < HEATER_3_RAW_HI_TEMP
maxttemp_raw
[
3
]
-=
OVERSAMPLENR
;
maxttemp_raw
[
3
]
-=
OVERSAMPLENR
;
#else
#else
maxttemp_raw
[
3
]
+=
OVERSAMPLENR
;
maxttemp_raw
[
3
]
+=
OVERSAMPLENR
;
#endif
#endif
}
}
#endif // MAXTEMP 3
#endif // MAXTEMP 3
#endif // !SINGLENOZZLE
#endif // !SINGLENOZZLE
#ifdef BED_MINTEMP
#ifdef BED_MINTEMP
...
@@ -1225,31 +1225,31 @@ void disable_heater()
...
@@ -1225,31 +1225,31 @@ void disable_heater()
#endif
#endif
#endif
#endif
#ifndef SINGLENOZZLE
#ifndef SINGLENOZZLE
#if defined(TEMP_1_PIN) && TEMP_1_PIN > -1 && EXTRUDERS > 1
#if defined(TEMP_1_PIN) && TEMP_1_PIN > -1 && EXTRUDERS > 1
target_temperature
[
1
]
=
0
;
target_temperature
[
1
]
=
0
;
soft_pwm
[
1
]
=
0
;
soft_pwm
[
1
]
=
0
;
#if defined(HEATER_1_PIN) && HEATER_1_PIN > -1
#if defined(HEATER_1_PIN) && HEATER_1_PIN > -1
WRITE
(
HEATER_1_PIN
,
LOW
);
WRITE
(
HEATER_1_PIN
,
LOW
);
#endif
#endif
#endif
#endif
#if defined(TEMP_2_PIN) && TEMP_2_PIN > -1 && EXTRUDERS > 2
#if defined(TEMP_2_PIN) && TEMP_2_PIN > -1 && EXTRUDERS > 2
target_temperature
[
2
]
=
0
;
target_temperature
[
2
]
=
0
;
soft_pwm
[
2
]
=
0
;
soft_pwm
[
2
]
=
0
;
#if defined(HEATER_2_PIN) && HEATER_2_PIN > -1
#if defined(HEATER_2_PIN) && HEATER_2_PIN > -1
WRITE
(
HEATER_2_PIN
,
LOW
);
WRITE
(
HEATER_2_PIN
,
LOW
);
#endif
#endif
#endif
#endif
#if defined(TEMP_3_PIN) && TEMP_3_PIN > -1 && EXTRUDERS > 3
target_temperature
[
3
]
=
0
;
#if defined(TEMP_3_PIN) && TEMP_3_PIN > -1 && EXTRUDERS > 3
soft_pwm
[
3
]
=
0
;
target_temperature
[
3
]
=
0
;
#if defined(HEATER_3_PIN) && HEATER_3_PIN > -1
soft_pwm
[
3
]
=
0
;
WRITE
(
HEATER_3_PIN
,
LOW
);
#if defined(HEATER_3_PIN) && HEATER_3_PIN > -1
#endif
WRITE
(
HEATER_3_PIN
,
LOW
);
#endif
#endif
#endif // !SINGLENOZZLE
#endif
#endif // !SINGLENOZZLE
#if defined(TEMP_BED_PIN) && TEMP_BED_PIN > -1
#if defined(TEMP_BED_PIN) && TEMP_BED_PIN > -1
target_temperature_bed
=
0
;
target_temperature_bed
=
0
;
...
@@ -1406,9 +1406,9 @@ ISR(TIMER0_COMPB_vect)
...
@@ -1406,9 +1406,9 @@ ISR(TIMER0_COMPB_vect)
#endif
#endif
#endif
#endif
#if defined(FILWIDTH_PIN) &&(FILWIDTH_PIN > -1)
#if defined(FILWIDTH_PIN) &&(FILWIDTH_PIN > -1)
static
unsigned
long
raw_filwidth_value
=
0
;
//added for filament width sensor
static
unsigned
long
raw_filwidth_value
=
0
;
//added for filament width sensor
#endif
#endif
#ifndef SLOW_PWM_HEATERS
#ifndef SLOW_PWM_HEATERS
/*
/*
...
@@ -1424,19 +1424,19 @@ ISR(TIMER0_COMPB_vect)
...
@@ -1424,19 +1424,19 @@ ISR(TIMER0_COMPB_vect)
}
else
WRITE
(
HEATER_0_PIN
,
0
);
}
else
WRITE
(
HEATER_0_PIN
,
0
);
#ifndef SINGLENOZZLE
#ifndef SINGLENOZZLE
#if EXTRUDERS > 1
#if EXTRUDERS > 1
soft_pwm_1
=
soft_pwm
[
1
];
soft_pwm_1
=
soft_pwm
[
1
];
if
(
soft_pwm_1
>
0
)
WRITE
(
HEATER_1_PIN
,
1
);
else
WRITE
(
HEATER_1_PIN
,
0
);
if
(
soft_pwm_1
>
0
)
WRITE
(
HEATER_1_PIN
,
1
);
else
WRITE
(
HEATER_1_PIN
,
0
);
#endif
#endif
#if EXTRUDERS > 2
#if EXTRUDERS > 2
soft_pwm_2
=
soft_pwm
[
2
];
soft_pwm_2
=
soft_pwm
[
2
];
if
(
soft_pwm_2
>
0
)
WRITE
(
HEATER_2_PIN
,
1
);
else
WRITE
(
HEATER_2_PIN
,
0
);
if
(
soft_pwm_2
>
0
)
WRITE
(
HEATER_2_PIN
,
1
);
else
WRITE
(
HEATER_2_PIN
,
0
);
#endif
#endif
#if EXTRUDERS > 3
#if EXTRUDERS > 3
soft_pwm_3
=
soft_pwm
[
3
];
soft_pwm_3
=
soft_pwm
[
3
];
if
(
soft_pwm_3
>
0
)
WRITE
(
HEATER_3_PIN
,
1
);
else
WRITE
(
HEATER_3_PIN
,
0
);
if
(
soft_pwm_3
>
0
)
WRITE
(
HEATER_3_PIN
,
1
);
else
WRITE
(
HEATER_3_PIN
,
0
);
#endif
#endif
#endif // !SINGLENOZZLE
#endif // !SINGLENOZZLE
#if defined(HEATER_BED_PIN) && HEATER_BED_PIN > -1
#if defined(HEATER_BED_PIN) && HEATER_BED_PIN > -1
soft_pwm_b
=
soft_pwm_bed
;
soft_pwm_b
=
soft_pwm_bed
;
if
(
soft_pwm_b
>
0
)
WRITE
(
HEATER_BED_PIN
,
1
);
else
WRITE
(
HEATER_BED_PIN
,
0
);
if
(
soft_pwm_b
>
0
)
WRITE
(
HEATER_BED_PIN
,
1
);
else
WRITE
(
HEATER_BED_PIN
,
0
);
...
@@ -1663,6 +1663,21 @@ ISR(TIMER0_COMPB_vect)
...
@@ -1663,6 +1663,21 @@ ISR(TIMER0_COMPB_vect)
}
}
}
}
#endif
#endif
#if EXTRUDERS > 3
// EXTRUDER 3
if
(
soft_pwm_3
<
slow_pwm_count
)
{
// turn OFF heather only if the minimum time is up
if
(
state_timer_heater_3
==
0
)
{
// if change state set timer
if
(
state_heater_3
==
1
)
{
state_timer_heater_3
=
MIN_STATE_TIME
;
}
state_heater_3
=
0
;
WRITE
(
HEATER_3_PIN
,
0
);
}
}
#endif
#if defined(HEATER_BED_PIN) && HEATER_BED_PIN > -1
#if defined(HEATER_BED_PIN) && HEATER_BED_PIN > -1
// BED
// BED
...
@@ -1711,6 +1726,12 @@ ISR(TIMER0_COMPB_vect)
...
@@ -1711,6 +1726,12 @@ ISR(TIMER0_COMPB_vect)
if
(
state_timer_heater_2
>
0
)
if
(
state_timer_heater_2
>
0
)
state_timer_heater_2
--
;
state_timer_heater_2
--
;
#endif
#endif
#if EXTRUDERS > 3
// Extruder 3
if
(
state_timer_heater_3
>
0
)
state_timer_heater_3
--
;
#endif
#if defined(HEATER_BED_PIN) && HEATER_BED_PIN > -1
#if defined(HEATER_BED_PIN) && HEATER_BED_PIN > -1
// Bed
// Bed
...
@@ -2018,5 +2039,3 @@ float unscalePID_d(float d)
...
@@ -2018,5 +2039,3 @@ float unscalePID_d(float d)
}
}
#endif //PIDTEMP
#endif //PIDTEMP
MarlinKimbra/temperature.h
View file @
aedb4d4e
...
@@ -211,8 +211,8 @@ static int thermal_runaway_state_machine[4]; // = {0,0,0,0};
...
@@ -211,8 +211,8 @@ static int thermal_runaway_state_machine[4]; // = {0,0,0,0};
static
unsigned
long
thermal_runaway_timer
[
4
];
// = {0,0,0,0};
static
unsigned
long
thermal_runaway_timer
[
4
];
// = {0,0,0,0};
static
bool
thermal_runaway
=
false
;
static
bool
thermal_runaway
=
false
;
#if TEMP_SENSOR_BED != 0
#if TEMP_SENSOR_BED != 0
static
int
thermal_runaway_bed_state_machine
;
static
int
thermal_runaway_bed_state_machine
;
static
unsigned
long
thermal_runaway_bed_timer
;
static
unsigned
long
thermal_runaway_bed_timer
;
#endif
#endif
#endif
#endif
...
@@ -233,4 +233,3 @@ void setExtruderAutoFanState(int pin, bool state);
...
@@ -233,4 +233,3 @@ void setExtruderAutoFanState(int pin, bool state);
void
checkExtruderAutoFans
();
void
checkExtruderAutoFans
();
#endif
#endif
MarlinKimbra/ultralcd.cpp
View file @
aedb4d4e
...
@@ -1160,9 +1160,9 @@ static void lcd_control_volumetric_menu()
...
@@ -1160,9 +1160,9 @@ static void lcd_control_volumetric_menu()
MENU_ITEM_EDIT_CALLBACK
(
float43
,
MSG_FILAMENT_SIZE_EXTRUDER_2
,
&
filament_size
[
2
],
DEFAULT_NOMINAL_FILAMENT_DIA
-
.5
,
DEFAULT_NOMINAL_FILAMENT_DIA
+
.5
,
calculate_volumetric_multipliers
);
MENU_ITEM_EDIT_CALLBACK
(
float43
,
MSG_FILAMENT_SIZE_EXTRUDER_2
,
&
filament_size
[
2
],
DEFAULT_NOMINAL_FILAMENT_DIA
-
.5
,
DEFAULT_NOMINAL_FILAMENT_DIA
+
.5
,
calculate_volumetric_multipliers
);
#if EXTRUDERS > 3
#if EXTRUDERS > 3
MENU_ITEM_EDIT_CALLBACK
(
float43
,
MSG_FILAMENT_SIZE_EXTRUDER_3
,
&
filament_size
[
3
],
DEFAULT_NOMINAL_FILAMENT_DIA
-
.5
,
DEFAULT_NOMINAL_FILAMENT_DIA
+
.5
,
calculate_volumetric_multipliers
);
MENU_ITEM_EDIT_CALLBACK
(
float43
,
MSG_FILAMENT_SIZE_EXTRUDER_3
,
&
filament_size
[
3
],
DEFAULT_NOMINAL_FILAMENT_DIA
-
.5
,
DEFAULT_NOMINAL_FILAMENT_DIA
+
.5
,
calculate_volumetric_multipliers
);
#endif
#endif
//EXTRUDERS > 3
#endif
#endif
//EXTRUDERS > 2
#endif
#endif
//EXTRUDERS > 1
}
}
END_MENU
();
END_MENU
();
...
...
MarlinKimbra/ultralcd.h
View file @
aedb4d4e
...
@@ -50,9 +50,9 @@
...
@@ -50,9 +50,9 @@
extern
bool
cancel_heatup
;
extern
bool
cancel_heatup
;
#ifdef FILAMENT_LCD_DISPLAY
#ifdef FILAMENT_LCD_DISPLAY
extern
unsigned
long
message_millis
;
extern
unsigned
long
message_millis
;
#endif
#endif
void
lcd_buzz
(
long
duration
,
uint16_t
freq
);
void
lcd_buzz
(
long
duration
,
uint16_t
freq
);
bool
lcd_clicked
();
bool
lcd_clicked
();
...
...
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