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
971c0ac5
Commit
971c0ac5
authored
Aug 19, 2015
by
MagoKimbra
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'Development'
parents
f7820b15
704a4ba0
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
210 additions
and
56 deletions
+210
-56
changelog.md
Documentation/changelog.md
+6
-0
Configuration.h
MarlinKimbra/Configuration.h
+25
-0
Configuration_adv.h
MarlinKimbra/Configuration_adv.h
+11
-25
Default_Version.h
MarlinKimbra/Default_Version.h
+1
-1
Marlin.h
MarlinKimbra/Marlin.h
+3
-0
Marlin_main.cpp
MarlinKimbra/Marlin_main.cpp
+8
-8
conditionals.h
MarlinKimbra/conditionals.h
+22
-9
temperature.cpp
MarlinKimbra/temperature.cpp
+133
-12
README.md
README.md
+1
-1
No files found.
Documentation/changelog.md
View file @
971c0ac5
### Version 4.1.5
*
Implemented FAST_PWM_FAN and FAN_SOFT_PWM also for other fan that can be added in configuration_adv file.
*
Added the ability to set a min speed to the fan that can be added in configuration_adv file.
*
Critical stepper motor frequency bugfix
*
General bugfix
### Version 4.1.4
### Version 4.1.4
*
Add support for Piggy Alligator board
*
Add support for Piggy Alligator board
*
Add Debug_info. Repetier button info for enabled or disabled, or M111 S2 for enabled and M111 S0 for disabled.
*
Add Debug_info. Repetier button info for enabled or disabled, or M111 S2 for enabled and M111 S0 for disabled.
...
...
MarlinKimbra/Configuration.h
View file @
971c0ac5
...
@@ -314,6 +314,31 @@
...
@@ -314,6 +314,31 @@
//#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all hotends
//#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all hotends
//#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed
//#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed
//===========================================================================
//======================== Extruder Idle Oozing Prevention =======================
//===========================================================================
/**
* Extruder Idle Oozing Prevention prevents undesired ejection of filament while the printer
* is in idle with the hotend turned on.
* Eg. during the heating up process.
*
* If the extruder motor is idle for more than SECONDS, and the temperature is over IDLE_OOZING_MINTEMP,
* some filament is retracted. The filament retracted is re-added before the next extrusion
* or when the target temperature is less than IDLE_OOZING_MINTEMP and the actual temperature
* is greater than IDLE_OOZING_MINTEMP.
*
* PS: Always remember to set your extruder target temperature to 0°C before shoudown the printer if you enable this feature.
*/
//#define IDLE_OOZING_PREVENT
#define IDLE_OOZING_MINTEMP EXTRUDE_MINTEMP + 5
#define IDLE_OOZING_MAXTEMP IDLE_OOZING_MINTEMP + 5
#define IDLE_OOZING_FEEDRATE 50 //default feedrate for retracting (mm/s)
#define IDLE_OOZING_SECONDS 5
#define IDLE_OOZING_LENGTH 15 //default retract length (positive mm)
#define IDLE_OOZING_RECOVER_LENGTH 0 //default additional recover length (mm, added to retract length when recovering)
#define IDLE_OOZING_RECOVER_FEEDRATE 50 //default feedrate for recovering from retraction (mm/s)
//===========================================================================
//===========================================================================
//============================ User Interfaces ==============================
//============================ User Interfaces ==============================
//===========================================================================
//===========================================================================
...
...
MarlinKimbra/Configuration_adv.h
View file @
971c0ac5
...
@@ -64,23 +64,6 @@
...
@@ -64,23 +64,6 @@
//The M105 command return, besides traditional information, the ADC value read from temperature sensors.
//The M105 command return, besides traditional information, the ADC value read from temperature sensors.
//#define SHOW_TEMP_ADC_VALUES
//#define SHOW_TEMP_ADC_VALUES
/**
* Extruder Idle Oozing Prevention
* If the extruder motor is idle for more than SECONDS, and the temperature is over IDLE_OOZING_MINTEMP,
* some filament is retracted. The filament retracted is re-added before the next extrusion
* or when the target temperature is less than IDLE_OOZING_MINTEMP and the actual temperature
* is greater than IDLE_OOZING_MINTEMP.
* PS: Always remember to set your extruder target temperature to 0°C before shoudown the printer if you enable this feature.
*/
//#define IDLE_OOZING_PREVENT
#define IDLE_OOZING_MINTEMP EXTRUDE_MINTEMP + 5
#define IDLE_OOZING_MAXTEMP IDLE_OOZING_MINTEMP + 5
#define IDLE_OOZING_FEEDRATE 50 //default feedrate for retracting (mm/s)
#define IDLE_OOZING_SECONDS 5
#define IDLE_OOZING_LENGTH 15 //default retract length (positive mm)
#define IDLE_OOZING_RECOVER_LENGTH 0 //default additional recover length (mm, added to retract length when recovering)
#define IDLE_OOZING_RECOVER_FEEDRATE 50 //default feedrate for recovering from retraction (mm/s)
// extruder run-out prevention.
// extruder run-out prevention.
//if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded
//if the machine is idle, and the temperature over MINTEMP, every couple of SECONDS some filament is extruded
//#define EXTRUDER_RUNOUT_PREVENT
//#define EXTRUDER_RUNOUT_PREVENT
...
@@ -98,9 +81,10 @@
...
@@ -98,9 +81,10 @@
//This is for controlling a fan to cool down the stepper drivers
//This is for controlling a fan to cool down the stepper drivers
//it will turn on when any driver is enabled
//it will turn on when any driver is enabled
//and turn off after the set amount of seconds from last driver being disabled again
//and turn off after the set amount of seconds from last driver being disabled again
#define CONTROLLERFAN_PIN -1 //Pin used for the fan to cool controller (-1 to disable)
#define CONTROLLERFAN_PIN -1 // Pin used for the fan to cool controller (-1 to disable)
#define CONTROLLERFAN_SECS 60 //How many seconds, after all motors were disabled, the fan should run
#define CONTROLLERFAN_SECS 60 // How many seconds, after all motors were disabled, the fan should run
#define CONTROLLERFAN_SPEED 255 // == full speed
#define CONTROLLERFAN_SPEED 255 // 255 = full speed
#define CONTROLLERFAN_MIN_SPEED 0
// When first starting the main fan, run it at full speed for the
// When first starting the main fan, run it at full speed for the
// given number of milliseconds. This gets the fan spinning reliably
// given number of milliseconds. This gets the fan spinning reliably
...
@@ -122,7 +106,8 @@
...
@@ -122,7 +106,8 @@
#define EXTRUDER_2_AUTO_FAN_PIN -1
#define EXTRUDER_2_AUTO_FAN_PIN -1
#define EXTRUDER_3_AUTO_FAN_PIN -1
#define EXTRUDER_3_AUTO_FAN_PIN -1
#define EXTRUDER_AUTO_FAN_TEMPERATURE 50
#define EXTRUDER_AUTO_FAN_TEMPERATURE 50
#define EXTRUDER_AUTO_FAN_SPEED 255 // == full speed
#define EXTRUDER_AUTO_FAN_SPEED 255 // 255 = full speed
#define EXTRUDER_AUTO_FAN_MIN_SPEED 0
#define LCD_MAX_TEMP_OFFSET -15
#define LCD_MAX_TEMP_OFFSET -15
...
@@ -349,11 +334,12 @@
...
@@ -349,11 +334,12 @@
// it can e.g. be used to change z-positions in the print startup phase in real-time
// it can e.g. be used to change z-positions in the print startup phase in real-time
// does not respect endstops!
// does not respect endstops!
//#define BABYSTEPPING
//#define BABYSTEPPING
#if ENABLED(BABYSTEPPING)
#if ENABLED(BABYSTEPPING)
#define BABYSTEP_XY //not only z, but also XY in the menu. more clutter, more functions
#define BABYSTEP_XY //
not only z, but also XY in the menu. more clutter, more functions
//not implemented for CoreXY and deltabots!
//
not implemented for CoreXY and deltabots!
#define BABYSTEP_INVERT_Z false
//
true for inverse movements in Z
#define BABYSTEP_INVERT_Z false
//
true for inverse movements in Z
#define BABYSTEP_Z_MULTIPLICATOR 2
//
faster z movements
#define BABYSTEP_Z_MULTIPLICATOR 2
//
faster z movements
#endif
#endif
// extruder advance constant (s2/mm3)
// extruder advance constant (s2/mm3)
...
...
MarlinKimbra/Default_Version.h
View file @
971c0ac5
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
// #error "You must specify the following parameters related to your distribution"
// #error "You must specify the following parameters related to your distribution"
#if true
#if true
#define SHORT_BUILD_VERSION "4.1.
4
dev"
#define SHORT_BUILD_VERSION "4.1.
5
dev"
#define STRING_DISTRIBUTION_DATE __DATE__ " " __TIME__ // build date and time
#define STRING_DISTRIBUTION_DATE __DATE__ " " __TIME__ // build date and time
// It might also be appropriate to define a location where additional information can be found
// It might also be appropriate to define a location where additional information can be found
#define SOURCE_CODE_URL "https://github.com/MagoKimbra/MarlinKimbra"
#define SOURCE_CODE_URL "https://github.com/MagoKimbra/MarlinKimbra"
...
...
MarlinKimbra/Marlin.h
View file @
971c0ac5
...
@@ -273,6 +273,9 @@ extern int fanSpeed;
...
@@ -273,6 +273,9 @@ extern int fanSpeed;
#if ENABLED(FAN_SOFT_PWM)
#if ENABLED(FAN_SOFT_PWM)
extern
unsigned
char
fanSpeedSoftPwm
;
extern
unsigned
char
fanSpeedSoftPwm
;
#if HAS_CONTROLLERFAN
extern
unsigned
char
fanSpeedSoftPwm_controller
;
#endif
#endif
#endif
#if ENABLED(FILAMENT_SENSOR)
#if ENABLED(FILAMENT_SENSOR)
...
...
MarlinKimbra/Marlin_main.cpp
View file @
971c0ac5
...
@@ -756,10 +756,6 @@ void setup() {
...
@@ -756,10 +756,6 @@ void setup() {
setup_laserbeampin
();
// Initialize Laserbeam pin
setup_laserbeampin
();
// Initialize Laserbeam pin
servo_init
();
servo_init
();
#if HAS_CONTROLLERFAN
SET_OUTPUT
(
CONTROLLERFAN_PIN
);
//Set pin used for driver cooling fan
#endif
#if HAS_STEPPER_RESET
#if HAS_STEPPER_RESET
enableStepperDrivers
();
enableStepperDrivers
();
#endif
#endif
...
@@ -7391,14 +7387,18 @@ void plan_arc(
...
@@ -7391,14 +7387,18 @@ void plan_arc(
}
}
#ifdef INVERTED_HEATER_PINS
#ifdef INVERTED_HEATER_PINS
uint8_t
speed
=
(
lastMotor
==
0
||
ms
>=
lastMotor
+
(
CONTROLLERFAN_SECS
*
1000UL
))
?
255
:
(
255
-
CONTROLLERFAN_SPEED
);
uint8_t
speed
=
(
lastMotor
==
0
||
ms
>=
lastMotor
+
(
CONTROLLERFAN_SECS
*
1000UL
))
?
255
-
CONTROLLERFAN_MIN_SPEED
:
(
255
-
CONTROLLERFAN_SPEED
);
#else
#else
uint8_t
speed
=
(
lastMotor
==
0
||
ms
>=
lastMotor
+
(
CONTROLLERFAN_SECS
*
1000UL
))
?
0
:
CONTROLLERFAN_SPEED
;
uint8_t
speed
=
(
lastMotor
==
0
||
ms
>=
lastMotor
+
(
CONTROLLERFAN_SECS
*
1000UL
))
?
CONTROLLERFAN_MIN_SPEED
:
CONTROLLERFAN_SPEED
;
#endif
#endif
// allows digital or PWM fan output to be used (see M42 handling)
// allows digital or PWM fan output to be used (see M42 handling)
digitalWrite
(
CONTROLLERFAN_PIN
,
speed
);
#if ENABLED(FAN_SOFT_PWM)
analogWrite
(
CONTROLLERFAN_PIN
,
speed
);
fanSpeedSoftPwm_controller
=
speed
;
#else
digitalWrite
(
CONTROLLERFAN_PIN
,
speed
);
analogWrite
(
CONTROLLERFAN_PIN
,
speed
);
#endif
}
}
}
}
...
...
MarlinKimbra/conditionals.h
View file @
971c0ac5
...
@@ -41,7 +41,6 @@
...
@@ -41,7 +41,6 @@
#define DOGLCD // Support for I2C LCD 128x64 (Controller SSD1306 graphic Display Family)
#define DOGLCD // Support for I2C LCD 128x64 (Controller SSD1306 graphic Display Family)
#endif
#endif
#if ENABLED(PANEL_ONE)
#if ENABLED(PANEL_ONE)
#define SDSUPPORT
#define SDSUPPORT
#define ULTIMAKERCONTROLLER
#define ULTIMAKERCONTROLLER
...
@@ -98,7 +97,6 @@
...
@@ -98,7 +97,6 @@
/**
/**
* I2C PANELS
* I2C PANELS
*/
*/
#if ENABLED(LCD_I2C_SAINSMART_YWROBOT)
#if ENABLED(LCD_I2C_SAINSMART_YWROBOT)
// This uses the LiquidCrystal_I2C library ( https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home )
// This uses the LiquidCrystal_I2C library ( https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home )
// Make sure it is placed in the Arduino libraries directory.
// Make sure it is placed in the Arduino libraries directory.
...
@@ -368,7 +366,7 @@
...
@@ -368,7 +366,7 @@
#define MAX_PROBE_Y (min(Y_MAX_POS, Y_MAX_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
#define MAX_PROBE_Y (min(Y_MAX_POS, Y_MAX_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
// Z_RAISE_AFTER_PROBING is not for all probes. Be sure that it is zero in that cases
// Z_RAISE_AFTER_PROBING is not for all probes. Be sure that it is zero in that cases
#if (NUM_SERVOS == 0) &&
!defined
(Z_PROBE_SLED)
#if (NUM_SERVOS == 0) &&
DISABLED
(Z_PROBE_SLED)
#undef Z_RAISE_AFTER_PROBING
#undef Z_RAISE_AFTER_PROBING
#define Z_RAISE_AFTER_PROBING 0
#define Z_RAISE_AFTER_PROBING 0
#endif
#endif
...
@@ -379,13 +377,20 @@
...
@@ -379,13 +377,20 @@
*/
*/
#define SERVO_LEVELING (defined(SERVO_ENDSTOPS) && defined(DEACTIVATE_SERVOS_AFTER_MOVE))
#define SERVO_LEVELING (defined(SERVO_ENDSTOPS) && defined(DEACTIVATE_SERVOS_AFTER_MOVE))
/**
/**
* Sled Options
* Sled Options
*/
*/
#if ENABLED(Z_PROBE_SLED)
#if ENABLED(Z_PROBE_SLED)
#define Z_SAFE_HOMING
#define Z_SAFE_HOMING
#endif
#endif
/**
* Babystepping
*/
#if ENABLED(CARTESIAN)
#define BABYSTEPPING // On Cartesian printer this can be enabled as default as fully working
#endif
/**
/**
* MAX_STEP_FREQUENCY differs for TOSHIBA OR ARDUINO DUE OR ARDUINO MEGA
* MAX_STEP_FREQUENCY differs for TOSHIBA OR ARDUINO DUE OR ARDUINO MEGA
*/
*/
...
@@ -431,8 +436,10 @@
...
@@ -431,8 +436,10 @@
#undef SD_DETECT_INVERTED
#undef SD_DETECT_INVERTED
#endif
#endif
// Power Signal Control Definitions
/**
// By default use Normal definition
* Power Signal Control Definitions
* By default use Normal definition
*/
#ifndef POWER_SUPPLY
#ifndef POWER_SUPPLY
#define POWER_SUPPLY 0
#define POWER_SUPPLY 0
#endif
#endif
...
@@ -524,7 +531,7 @@
...
@@ -524,7 +531,7 @@
#else
#else
#define ARRAY_BY_EXTRUDER(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10) { v1 }
#define ARRAY_BY_EXTRUDER(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10) { v1 }
#endif
#endif
#define ARRAY_BY_EXTRUDERS(v1) ARRAY_BY_EXTRUDER(v1, v1, v1, v1, v1, v1, v1, v1, v1, v1)
#define ARRAY_BY_EXTRUDERS(v1) ARRAY_BY_EXTRUDER(v1, v1, v1, v1, v1, v1, v1, v1, v1, v1)
/**
/**
...
@@ -673,8 +680,14 @@
...
@@ -673,8 +680,14 @@
#endif
#endif
#endif
#endif
/**
* Buzzer
*/
#define HAS_BUZZER (PIN_EXISTS(BEEPER) || defined(LCD_USE_I2C_BUZZER))
#define HAS_BUZZER (PIN_EXISTS(BEEPER) || defined(LCD_USE_I2C_BUZZER))
/**
* Servos
*/
#if HAS_SERVOS
#if HAS_SERVOS
#if X_ENDSTOP_SERVO_NR >= 0 || Y_ENDSTOP_SERVO_NR >= 0 || Z_ENDSTOP_SERVO_NR >= 0
#if X_ENDSTOP_SERVO_NR >= 0 || Y_ENDSTOP_SERVO_NR >= 0 || Z_ENDSTOP_SERVO_NR >= 0
#define HAS_SERVO_ENDSTOPS true
#define HAS_SERVO_ENDSTOPS true
...
...
MarlinKimbra/temperature.cpp
View file @
971c0ac5
...
@@ -60,7 +60,13 @@ float current_temperature_bed = 0.0;
...
@@ -60,7 +60,13 @@ float current_temperature_bed = 0.0;
#endif //PIDTEMPBED
#endif //PIDTEMPBED
#if ENABLED(FAN_SOFT_PWM)
#if ENABLED(FAN_SOFT_PWM)
unsigned
char
fanSpeedSoftPwm
;
unsigned
char
fanSpeedSoftPwm
=
0
;
#if HAS_AUTO_FAN
unsigned
char
fanSpeedSoftPwm_auto
=
EXTRUDER_AUTO_FAN_MIN_SPEED
;
#endif
#if HAS_CONTROLLERFAN
unsigned
char
fanSpeedSoftPwm_controller
=
CONTROLLERFAN_MIN_SPEED
;
#endif
#endif
#endif
unsigned
char
soft_pwm_bed
;
unsigned
char
soft_pwm_bed
;
...
@@ -128,6 +134,12 @@ static unsigned char soft_pwm[HOTENDS];
...
@@ -128,6 +134,12 @@ static unsigned char soft_pwm[HOTENDS];
#if ENABLED(FAN_SOFT_PWM)
#if ENABLED(FAN_SOFT_PWM)
static
unsigned
char
soft_pwm_fan
;
static
unsigned
char
soft_pwm_fan
;
#if HAS_AUTO_FAN
static
unsigned
char
soft_pwm_fan_auto
;
#endif
#if HAS_CONTROLLERFAN
static
unsigned
char
soft_pwm_fan_controller
=
0
;
#endif
#endif
#endif
#if HAS_AUTO_FAN
#if HAS_AUTO_FAN
static
millis_t
next_auto_fan_check_ms
;
static
millis_t
next_auto_fan_check_ms
;
...
@@ -374,10 +386,14 @@ int getHeaterPower(int heater) {
...
@@ -374,10 +386,14 @@ int getHeaterPower(int heater) {
#if HAS_AUTO_FAN
#if HAS_AUTO_FAN
void
setExtruderAutoFanState
(
int
pin
,
bool
state
)
{
void
setExtruderAutoFanState
(
int
pin
,
bool
state
)
{
unsigned
char
newFanSpeed
=
(
state
!=
0
)
?
EXTRUDER_AUTO_FAN_SPEED
:
0
;
unsigned
char
newFanSpeed
=
(
state
!=
0
)
?
EXTRUDER_AUTO_FAN_SPEED
:
EXTRUDER_AUTO_FAN_MIN_SPEED
;
// this idiom allows both digital and PWM fan outputs (see M42 handling).
// this idiom allows both digital and PWM fan outputs (see M42 handling).
digitalWrite
(
pin
,
newFanSpeed
);
#if ENABLED(FAN_SOFT_PWM)
analogWrite
(
pin
,
newFanSpeed
);
fanSpeedSoftPwm_auto
=
newFanSpeed
;
#else
digitalWrite
(
pin
,
newFanSpeed
);
analogWrite
(
pin
,
newFanSpeed
);
#endif
}
}
void
checkExtruderAutoFans
()
{
void
checkExtruderAutoFans
()
{
...
@@ -940,17 +956,45 @@ void tp_init() {
...
@@ -940,17 +956,45 @@ void tp_init() {
ANALOG_SELECT
(
FILWIDTH_PIN
);
ANALOG_SELECT
(
FILWIDTH_PIN
);
#endif
#endif
#if HAS_CONTROLLERFAN
SET_OUTPUT
(
CONTROLLERFAN_PIN
);
//Set pin used for driver cooling fan
#if ENABLED(FAST_PWM_FAN)
setPwmFrequency
(
CONTROLLERFAN_PIN
,
1
);
// No prescaling. Pwm frequency = F_CPU/256/8
#endif
#if ENABLED(FAN_SOFT_PWM)
soft_pwm_fan_controller
=
fanSpeedSoftPwm_controller
/
2
;
#endif
#endif
#if HAS_AUTO_FAN_0
#if HAS_AUTO_FAN_0
pinMode
(
EXTRUDER_0_AUTO_FAN_PIN
,
OUTPUT
);
SET_OUTPUT
(
EXTRUDER_0_AUTO_FAN_PIN
);
#if ENABLED(FAST_PWM_FAN)
setPwmFrequency
(
EXTRUDER_0_AUTO_FAN_PIN
,
1
);
// No prescaling. Pwm frequency = F_CPU/256/8
#endif
#endif
#endif
#if HAS_AUTO_FAN_1 && (EXTRUDER_1_AUTO_FAN_PIN != EXTRUDER_0_AUTO_FAN_PIN)
#if HAS_AUTO_FAN_1 && (EXTRUDER_1_AUTO_FAN_PIN != EXTRUDER_0_AUTO_FAN_PIN)
pinMode
(
EXTRUDER_1_AUTO_FAN_PIN
,
OUTPUT
);
SET_OUTPUT
(
EXTRUDER_1_AUTO_FAN_PIN
);
#if ENABLED(FAST_PWM_FAN)
setPwmFrequency
(
EXTRUDER_1_AUTO_FAN_PIN
,
1
);
// No prescaling. Pwm frequency = F_CPU/256/8
#endif
#endif
#endif
#if HAS_AUTO_FAN_2 && (EXTRUDER_2_AUTO_FAN_PIN != EXTRUDER_0_AUTO_FAN_PIN) && (EXTRUDER_2_AUTO_FAN_PIN != EXTRUDER_1_AUTO_FAN_PIN)
#if HAS_AUTO_FAN_2 && (EXTRUDER_2_AUTO_FAN_PIN != EXTRUDER_0_AUTO_FAN_PIN) && (EXTRUDER_2_AUTO_FAN_PIN != EXTRUDER_1_AUTO_FAN_PIN)
pinMode
(
EXTRUDER_2_AUTO_FAN_PIN
,
OUTPUT
);
SET_OUTPUT
(
EXTRUDER_2_AUTO_FAN_PIN
);
#if ENABLED(FAST_PWM_FAN)
setPwmFrequency
(
EXTRUDER_2_AUTO_FAN_PIN
,
1
);
// No prescaling. Pwm frequency = F_CPU/256/8
#endif
#endif
#endif
#if HAS_AUTO_FAN_3 && (EXTRUDER_3_AUTO_FAN_PIN != EXTRUDER_0_AUTO_FAN_PIN) && (EXTRUDER_3_AUTO_FAN_PIN != EXTRUDER_1_AUTO_FAN_PIN) && (EXTRUDER_3_AUTO_FAN_PIN != EXTRUDER_2_AUTO_FAN_PIN)
#if HAS_AUTO_FAN_3 && (EXTRUDER_3_AUTO_FAN_PIN != EXTRUDER_0_AUTO_FAN_PIN) && (EXTRUDER_3_AUTO_FAN_PIN != EXTRUDER_1_AUTO_FAN_PIN) && (EXTRUDER_3_AUTO_FAN_PIN != EXTRUDER_2_AUTO_FAN_PIN)
pinMode
(
EXTRUDER_3_AUTO_FAN_PIN
,
OUTPUT
);
SET_OUTPUT
(
EXTRUDER_3_AUTO_FAN_PIN
);
#if ENABLED(FAST_PWM_FAN)
setPwmFrequency
(
EXTRUDER_3_AUTO_FAN_PIN
,
1
);
// No prescaling. Pwm frequency = F_CPU/256/8
#endif
#endif
#if ENABLED(FAN_SOFT_PWM)
#if HAS_AUTO_FAN
soft_pwm_fan_auto
=
fanSpeedSoftPwm_auto
/
2
;
#endif
#endif
#endif
#if HAS_POWER_CONSUMPTION_SENSOR
#if HAS_POWER_CONSUMPTION_SENSOR
...
@@ -1339,7 +1383,26 @@ ISR(TIMER0_COMPB_vect) {
...
@@ -1339,7 +1383,26 @@ ISR(TIMER0_COMPB_vect) {
#endif
#endif
#if ENABLED(FAN_SOFT_PWM)
#if ENABLED(FAN_SOFT_PWM)
soft_pwm_fan
=
fanSpeedSoftPwm
/
2
;
soft_pwm_fan
=
fanSpeedSoftPwm
/
2
;
#if HAS_CONTROLLERFAN
soft_pwm_fan_controller
=
fanSpeedSoftPwm_controller
/
2
;
WRITE
(
CONTROLLERFAN_PIN
,
soft_pwm_fan_controller
>
0
?
1
:
0
);
#endif
WRITE_FAN
(
soft_pwm_fan
>
0
?
1
:
0
);
WRITE_FAN
(
soft_pwm_fan
>
0
?
1
:
0
);
#if HAS_AUTO_FAN
soft_pwm_fan_auto
=
fanSpeedSoftPwm_auto
/
2
;
#endif
#if HAS_AUTO_FAN_0
WRITE
(
EXTRUDER_0_AUTO_FAN_PIN
,
soft_pwm_fan_auto
>
0
?
1
:
0
);
#endif
#if HAS_AUTO_FAN_1
WRITE
(
EXTRUDER_1_AUTO_FAN_PIN
,
soft_pwm_fan_auto
>
0
?
1
:
0
);
#endif
#if HAS_AUTO_FAN_2
WRITE
(
EXTRUDER_2_AUTO_FAN_PIN
,
soft_pwm_fan_auto
>
0
?
1
:
0
);
#endif
#if HAS_AUTO_FAN_3
WRITE
(
EXTRUDER_3_AUTO_FAN_PIN
,
soft_pwm_fan_auto
>
0
?
1
:
0
);
#endif
#endif
#endif
}
}
...
@@ -1360,11 +1423,30 @@ ISR(TIMER0_COMPB_vect) {
...
@@ -1360,11 +1423,30 @@ ISR(TIMER0_COMPB_vect) {
#if ENABLED(FAN_SOFT_PWM)
#if ENABLED(FAN_SOFT_PWM)
if
(
soft_pwm_fan
<
pwm_count
)
WRITE_FAN
(
0
);
if
(
soft_pwm_fan
<
pwm_count
)
WRITE_FAN
(
0
);
#if HAS_CONTROLLERFAN
if
(
soft_pwm_fan_controller
<
pwm_count
)
WRITE
(
CONTROLLERFAN_PIN
,
0
);
#endif
#if HAS_AUTO_FAN
if
(
soft_pwm_fan_auto
<
pwm_count
)
{
#if HAS_AUTO_FAN_0
WRITE
(
EXTRUDER_0_AUTO_FAN_PIN
,
0
);
#endif
#if HAS_AUTO_FAN_1
WRITE
(
EXTRUDER_1_AUTO_FAN_PIN
,
0
);
#endif
#if HAS_AUTO_FAN_2
WRITE
(
EXTRUDER_2_AUTO_FAN_PIN
,
0
);
#endif
#if HAS_AUTO_FAN_3
WRITE
(
EXTRUDER_3_AUTO_FAN_PIN
,
0
);
#endif
}
#endif
#endif
#endif
pwm_count
+=
BIT
(
SOFT_PWM_SCALE
);
pwm_count
+=
BIT
(
SOFT_PWM_SCALE
);
pwm_count
&=
0x7f
;
pwm_count
&=
0x7f
;
#else // SLOW_PWM_HEATERS
#else // SLOW_PWM_HEATERS
/*
/*
* SLOW PWM HEATERS
* SLOW PWM HEATERS
...
@@ -1439,8 +1521,46 @@ ISR(TIMER0_COMPB_vect) {
...
@@ -1439,8 +1521,46 @@ ISR(TIMER0_COMPB_vect) {
if
(
pwm_count
==
0
)
{
if
(
pwm_count
==
0
)
{
soft_pwm_fan
=
fanSpeedSoftPwm
/
2
;
soft_pwm_fan
=
fanSpeedSoftPwm
/
2
;
WRITE_FAN
(
soft_pwm_fan
>
0
?
1
:
0
);
WRITE_FAN
(
soft_pwm_fan
>
0
?
1
:
0
);
#if HAS_CONTROLLERFAN
soft_pwm_fan_controller
=
fanSpeedSoftPwm_controller
/
2
;
WRITE
(
CONTROLLERFAN_PIN
,
soft_pwm_fan_controller
>
0
?
1
:
0
);
#endif
#if HAS_AUTO_FAN
soft_pwm_fan_auto
=
fanSpeedSoftPwm_auto
/
2
;
#endif
#if HAS_AUTO_FAN_0
WRITE
(
EXTRUDER_0_AUTO_FAN_PIN
,
soft_pwm_fan_auto
>
0
?
1
:
0
);
#endif
#if HAS_AUTO_FAN_1
WRITE
(
EXTRUDER_1_AUTO_FAN_PIN
,
soft_pwm_fan_auto
>
0
?
1
:
0
);
#endif
#if HAS_AUTO_FAN_2
WRITE
(
EXTRUDER_2_AUTO_FAN_PIN
,
soft_pwm_fan_auto
>
0
?
1
:
0
);
#endif
#if HAS_AUTO_FAN_3
WRITE
(
EXTRUDER_3_AUTO_FAN_PIN
,
soft_pwm_fan_auto
>
0
?
1
:
0
);
#endif
}
}
if
(
soft_pwm_fan
<
pwm_count
)
WRITE_FAN
(
0
);
if
(
soft_pwm_fan
<
pwm_count
)
WRITE_FAN
(
0
);
#if HAS_CONTROLLERFAN
if
(
soft_pwm_fan_controller
<
pwm_count
)
WRITE
(
CONTROLLERFAN_PIN
,
0
);
#endif
#if HAS_AUTO_FAN
if
(
soft_pwm_fan_auto
<
pwm_count
)
{
#if HAS_AUTO_FAN_0
WRITE
(
EXTRUDER_0_AUTO_FAN_PIN
,
0
);
#endif
#if HAS_AUTO_FAN_1
WRITE
(
EXTRUDER_1_AUTO_FAN_PIN
,
0
);
#endif
#if HAS_AUTO_FAN_2
WRITE
(
EXTRUDER_2_AUTO_FAN_PIN
,
0
);
#endif
#if HAS_AUTO_FAN_3
WRITE
(
EXTRUDER_3_AUTO_FAN_PIN
,
0
);
#endif
}
#endif
#endif // FAN_SOFT_PWM
#endif // FAN_SOFT_PWM
pwm_count
+=
BIT
(
SOFT_PWM_SCALE
);
pwm_count
+=
BIT
(
SOFT_PWM_SCALE
);
...
@@ -1450,7 +1570,7 @@ ISR(TIMER0_COMPB_vect) {
...
@@ -1450,7 +1570,7 @@ ISR(TIMER0_COMPB_vect) {
if
((
pwm_count
%
64
)
==
0
)
{
if
((
pwm_count
%
64
)
==
0
)
{
slow_pwm_count
++
;
slow_pwm_count
++
;
slow_pwm_count
&=
0x7f
;
slow_pwm_count
&=
0x7f
;
// HOTEND 0
// HOTEND 0
if
(
state_timer_heater_0
>
0
)
state_timer_heater_0
--
;
if
(
state_timer_heater_0
>
0
)
state_timer_heater_0
--
;
#if HOTENDS > 1 // HOTEND 1
#if HOTENDS > 1 // HOTEND 1
...
@@ -1466,7 +1586,7 @@ ISR(TIMER0_COMPB_vect) {
...
@@ -1466,7 +1586,7 @@ ISR(TIMER0_COMPB_vect) {
if
(
state_timer_heater_BED
>
0
)
state_timer_heater_BED
--
;
if
(
state_timer_heater_BED
>
0
)
state_timer_heater_BED
--
;
#endif
#endif
}
// (pwm_count % 64) == 0
}
// (pwm_count % 64) == 0
#endif // SLOW_PWM_HEATERS
#endif // SLOW_PWM_HEATERS
#define SET_ADMUX_ADCSRA(pin) ADMUX = BIT(REFS0) | (pin & 0x07); ADCSRA |= BIT(ADSC)
#define SET_ADMUX_ADCSRA(pin) ADMUX = BIT(REFS0) | (pin & 0x07); ADCSRA |= BIT(ADSC)
...
@@ -1478,6 +1598,7 @@ ISR(TIMER0_COMPB_vect) {
...
@@ -1478,6 +1598,7 @@ ISR(TIMER0_COMPB_vect) {
// Prepare or measure a sensor, each one every 14th frame
// Prepare or measure a sensor, each one every 14th frame
switch
(
temp_state
)
{
switch
(
temp_state
)
{
case
PrepareTemp_0
:
case
PrepareTemp_0
:
#if HAS_TEMP_0
#if HAS_TEMP_0
START_ADC
(
TEMP_0_PIN
);
START_ADC
(
TEMP_0_PIN
);
...
...
README.md
View file @
971c0ac5
<img
align=
"right"
src=
"Documentation/Logo/MarlinKimbra%20Logo%20GitHub.png"
/>
<img
align=
"right"
src=
"Documentation/Logo/MarlinKimbra%20Logo%20GitHub.png"
/>
# MarlinKimbra 3D Printer Firmware
# MarlinKimbra 3D Printer Firmware
## Version 4.1.
4
dev
## Version 4.1.
5
dev
*
[
Configuration & Compilation
](
/Documentation/Compilation.md
)
*
[
Configuration & Compilation
](
/Documentation/Compilation.md
)
*
Supported
*
Supported
...
...
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