Make temperature sensor type TT_NONE obsolete.

The requirement was simply neither obvious nor intuitive. Drawback
is, the indices of temperature sensors can now differ from these
of the heaters. That's easier to recognize for newbies, though.
This commit is contained in:
Markus Hitter 2012-11-30 02:41:08 +01:00
parent ba05d6a0cd
commit 6f2ec09837
14 changed files with 161 additions and 152 deletions

View File

@ -270,25 +270,22 @@
// #define TEMP_AD595
// #define TEMP_PT100
// #define TEMP_INTERCOM
// #define TEMP_NONE
/***************************************************************************\
* *
* Define your temperature sensors here. One line for each sensor, only *
* limited by the number of available ATmega pins. *
* *
* For a GEN3 set temp_type to TT_INTERCOM and temp_pin to 0. *
* *
* Types are same as TEMP_ list above - TT_MAX6675, TT_THERMISTOR, TT_AD595, *
* TT_PT100, TT_INTERCOM, TT_NONE. See list in temp.c. *
* TT_PT100, TT_INTERCOM. See list in temp.c. *
* *
* The "additional" field is used for TT_THERMISTOR only. It defines the *
* name of the table(s) in ThermistorTable.h to use. Typically, this is *
* THERMISTOR_EXTRUDER for the first or only table, or THERMISTOR_BED for *
* the second table. See also early in ThermistorTable.{single|double}.h. *
* *
* TT_INTERCOM and TT_NONE don't use a pin, insert AIO0 anyways to keep *
* the compiler happy. The pin won't be used in this case. *
* For a GEN3 set temp_type to TT_INTERCOM and temp_pin to AIO0. The pin *
* won't be used in this case. *
* *
\***************************************************************************/
@ -319,7 +316,7 @@ DEFINE_TEMP_SENSOR(bed, TT_THERMISTOR, AIO1, THERMISTOR_EXTRUDER)
/***************************************************************************\
* *
* Define your heaters here. *
* Define your heaters and devices here. *
* *
* To attach a heater to a temp sensor above, simply use exactly the same *
* name - copy+paste is your friend. Some common names are 'extruder', *
@ -327,11 +324,16 @@ DEFINE_TEMP_SENSOR(bed, TT_THERMISTOR, AIO1, THERMISTOR_EXTRUDER)
* in gcode_process.c. Currently, these are: *
* HEATER_extruder (M104) *
* HEATER_bed (M140) *
* HEATER_fan (M106/M107) *
* HEATER_fan (M106) *
* *
* A milling spindle can also be defined as a heater. Attach it to a *
* temperature sensor of TT_NONE, then you can control the spindle's rpm *
* via temperature commands. M104 S1..255 for spindle on, M104 S0 for off. *
* Devices don't neccessarily have a temperature sensor, e.g. fans or *
* milling spindles. Operate such devices by setting their power (M106), *
* instead of setting their temperature (M104). *
* *
* Also note, the index of a heater (M106 P#) can differ from the index of *
* its attached temperature sensor (M104 P#) in case sensor-less devices *
* are defined or the order of the definitions differs. The first defined *
* device has the index 0 (zero). *
* *
* Set 'pwm' to ... *
* 1 for using PWM on a PWM-able pin and on/off on other pins. *

View File

@ -275,25 +275,22 @@
// #define TEMP_AD595
// #define TEMP_PT100
#define TEMP_INTERCOM
// #define TEMP_NONE
/***************************************************************************\
* *
* Define your temperature sensors here. One line for each sensor, only *
* limited by the number of available ATmega pins. *
* *
* For a GEN3 set temp_type to TT_INTERCOM and temp_pin to 0. *
* *
* Types are same as TEMP_ list above - TT_MAX6675, TT_THERMISTOR, TT_AD595, *
* TT_PT100, TT_INTERCOM, TT_NONE. See list in temp.c. *
* TT_PT100, TT_INTERCOM. See list in temp.c. *
* *
* The "additional" field is used for TT_THERMISTOR only. It defines the *
* name of the table(s) in ThermistorTable.h to use. Typically, this is *
* THERMISTOR_EXTRUDER for the first or only table, or THERMISTOR_BED for *
* the second table. See also early in ThermistorTable.{single|double}.h. *
* *
* TT_INTERCOM and TT_NONE don't use a pin, insert AIO0 anyways to keep *
* the compiler happy. The pin won't be used in this case. *
* For a GEN3 set temp_type to TT_INTERCOM and temp_pin to AIO0. The pin *
* won't be used in this case. *
* *
\***************************************************************************/
@ -323,7 +320,7 @@ DEFINE_TEMP_SENSOR(bed, TT_INTERCOM, AIO1, 0)
/***************************************************************************\
* *
* Define your heaters here. *
* Define your heaters and devices here. *
* *
* To attach a heater to a temp sensor above, simply use exactly the same *
* name - copy+paste is your friend. Some common names are 'extruder', *
@ -331,11 +328,16 @@ DEFINE_TEMP_SENSOR(bed, TT_INTERCOM, AIO1, 0)
* in gcode_process.c. Currently, these are: *
* HEATER_extruder (M104) *
* HEATER_bed (M140) *
* HEATER_fan (M106/M107) *
* HEATER_fan (M106) *
* *
* A milling spindle can also be defined as a heater. Attach it to a *
* temperature sensor of TT_NONE, then you can control the spindle's rpm *
* via temperature commands. M104 S1..255 for spindle on, M104 S0 for off. *
* Devices don't neccessarily have a temperature sensor, e.g. fans or *
* milling spindles. Operate such devices by setting their power (M106), *
* instead of setting their temperature (M104). *
* *
* Also note, the index of a heater (M106 P#) can differ from the index of *
* its attached temperature sensor (M104 P#) in case sensor-less devices *
* are defined or the order of the definitions differs. The first defined *
* device has the index 0 (zero). *
* *
* Set 'pwm' to ... *
* 1 for using PWM on a PWM-able pin and on/off on other pins. *

View File

@ -270,25 +270,22 @@
// #define TEMP_AD595
// #define TEMP_PT100
// #define TEMP_INTERCOM
// #define TEMP_NONE
/***************************************************************************\
* *
* Define your temperature sensors here. One line for each sensor, only *
* limited by the number of available ATmega pins. *
* *
* For a GEN3 set temp_type to TT_INTERCOM and temp_pin to 0. *
* *
* Types are same as TEMP_ list above - TT_MAX6675, TT_THERMISTOR, TT_AD595, *
* TT_PT100, TT_INTERCOM, TT_NONE. See list in temp.c. *
* TT_PT100, TT_INTERCOM. See list in temp.c. *
* *
* The "additional" field is used for TT_THERMISTOR only. It defines the *
* name of the table(s) in ThermistorTable.h to use. Typically, this is *
* THERMISTOR_EXTRUDER for the first or only table, or THERMISTOR_BED for *
* the second table. See also early in ThermistorTable.{single|double}.h. *
* *
* TT_INTERCOM and TT_NONE don't use a pin, insert AIO0 anyways to keep *
* the compiler happy. The pin won't be used in this case. *
* For a GEN3 set temp_type to TT_INTERCOM and temp_pin to AIO0. The pin *
* won't be used in this case. *
* *
\***************************************************************************/
@ -315,7 +312,7 @@ DEFINE_TEMP_SENSOR(extruder, TT_THERMISTOR, AIO5, THERMISTOR_EXTRUDER)
/***************************************************************************\
* *
* Define your heaters here. *
* Define your heaters and devices here. *
* *
* To attach a heater to a temp sensor above, simply use exactly the same *
* name - copy+paste is your friend. Some common names are 'extruder', *
@ -323,11 +320,16 @@ DEFINE_TEMP_SENSOR(extruder, TT_THERMISTOR, AIO5, THERMISTOR_EXTRUDER)
* in gcode_process.c. Currently, these are: *
* HEATER_extruder (M104) *
* HEATER_bed (M140) *
* HEATER_fan (M106/M107) *
* HEATER_fan (M106) *
* *
* A milling spindle can also be defined as a heater. Attach it to a *
* temperature sensor of TT_NONE, then you can control the spindle's rpm *
* via temperature commands. M104 S1..255 for spindle on, M104 S0 for off. *
* Devices don't neccessarily have a temperature sensor, e.g. fans or *
* milling spindles. Operate such devices by setting their power (M106), *
* instead of setting their temperature (M104). *
* *
* Also note, the index of a heater (M106 P#) can differ from the index of *
* its attached temperature sensor (M104 P#) in case sensor-less devices *
* are defined or the order of the definitions differs. The first defined *
* device has the index 0 (zero). *
* *
* Set 'pwm' to ... *
* 1 for using PWM on a PWM-able pin and on/off on other pins. *

View File

@ -278,25 +278,22 @@
// #define TEMP_AD595
// #define TEMP_PT100
// #define TEMP_INTERCOM
// #define TEMP_NONE
/***************************************************************************\
* *
* Define your temperature sensors here. One line for each sensor, only *
* limited by the number of available ATmega pins. *
* *
* For a GEN3 set temp_type to TT_INTERCOM and temp_pin to 0. *
* *
* Types are same as TEMP_ list above - TT_MAX6675, TT_THERMISTOR, TT_AD595, *
* TT_PT100, TT_INTERCOM, TT_NONE. See list in temp.c. *
* TT_PT100, TT_INTERCOM. See list in temp.c. *
* *
* The "additional" field is used for TT_THERMISTOR only. It defines the *
* name of the table(s) in ThermistorTable.h to use. Typically, this is *
* THERMISTOR_EXTRUDER for the first or only table, or THERMISTOR_BED for *
* the second table. See also early in ThermistorTable.{single|double}.h. *
* *
* TT_INTERCOM and TT_NONE don't use a pin, insert AIO0 anyways to keep *
* the compiler happy. The pin won't be used in this case. *
* For a GEN3 set temp_type to TT_INTERCOM and temp_pin to AIO0. The pin *
* won't be used in this case. *
* *
\***************************************************************************/
@ -324,7 +321,7 @@ DEFINE_TEMP_SENSOR(bed, TT_THERMISTOR, AIO2, THERMISTOR_BED)
/***************************************************************************\
* *
* Define your heaters here. *
* Define your heaters and devices here. *
* *
* To attach a heater to a temp sensor above, simply use exactly the same *
* name - copy+paste is your friend. Some common names are 'extruder', *
@ -332,11 +329,16 @@ DEFINE_TEMP_SENSOR(bed, TT_THERMISTOR, AIO2, THERMISTOR_BED)
* in gcode_process.c. Currently, these are: *
* HEATER_extruder (M104) *
* HEATER_bed (M140) *
* HEATER_fan (M106/M107) *
* HEATER_fan (M106) *
* *
* A milling spindle can also be defined as a heater. Attach it to a *
* temperature sensor of TT_NONE, then you can control the spindle's rpm *
* via temperature commands. M104 S1..255 for spindle on, M104 S0 for off. *
* Devices don't neccessarily have a temperature sensor, e.g. fans or *
* milling spindles. Operate such devices by setting their power (M106), *
* instead of setting their temperature (M104). *
* *
* Also note, the index of a heater (M106 P#) can differ from the index of *
* its attached temperature sensor (M104 P#) in case sensor-less devices *
* are defined or the order of the definitions differs. The first defined *
* device has the index 0 (zero). *
* *
* Set 'pwm' to ... *
* 1 for using PWM on a PWM-able pin and on/off on other pins. *

View File

@ -278,25 +278,22 @@
// #define TEMP_AD595
// #define TEMP_PT100
// #define TEMP_INTERCOM
// #define TEMP_NONE
/***************************************************************************\
* *
* Define your temperature sensors here. One line for each sensor, only *
* limited by the number of available ATmega pins. *
* *
* For a GEN3 set temp_type to TT_INTERCOM and temp_pin to 0. *
* *
* Types are same as TEMP_ list above - TT_MAX6675, TT_THERMISTOR, TT_AD595, *
* TT_PT100, TT_INTERCOM, TT_NONE. See list in temp.c. *
* TT_PT100, TT_INTERCOM. See list in temp.c. *
* *
* The "additional" field is used for TT_THERMISTOR only. It defines the *
* name of the table(s) in ThermistorTable.h to use. Typically, this is *
* THERMISTOR_EXTRUDER for the first or only table, or THERMISTOR_BED for *
* the second table. See also early in ThermistorTable.{single|double}.h. *
* *
* TT_INTERCOM and TT_NONE don't use a pin, insert AIO0 anyways to keep *
* the compiler happy. The pin won't be used in this case. *
* For a GEN3 set temp_type to TT_INTERCOM and temp_pin to AIO0. The pin *
* won't be used in this case. *
* *
\***************************************************************************/
@ -324,7 +321,7 @@ DEFINE_TEMP_SENSOR(bed, TT_THERMISTOR, AIO0, THERMISTOR_BED)
/***************************************************************************\
* *
* Define your heaters here. *
* Define your heaters and devices here. *
* *
* To attach a heater to a temp sensor above, simply use exactly the same *
* name - copy+paste is your friend. Some common names are 'extruder', *
@ -332,11 +329,16 @@ DEFINE_TEMP_SENSOR(bed, TT_THERMISTOR, AIO0, THERMISTOR_BED)
* in gcode_process.c. Currently, these are: *
* HEATER_extruder (M104) *
* HEATER_bed (M140) *
* HEATER_fan (M106/M107) *
* HEATER_fan (M106) *
* *
* A milling spindle can also be defined as a heater. Attach it to a *
* temperature sensor of TT_NONE, then you can control the spindle's rpm *
* via temperature commands. M104 S1..255 for spindle on, M104 S0 for off. *
* Devices don't neccessarily have a temperature sensor, e.g. fans or *
* milling spindles. Operate such devices by setting their power (M106), *
* instead of setting their temperature (M104). *
* *
* Also note, the index of a heater (M106 P#) can differ from the index of *
* its attached temperature sensor (M104 P#) in case sensor-less devices *
* are defined or the order of the definitions differs. The first defined *
* device has the index 0 (zero). *
* *
* Set 'pwm' to ... *
* 1 for using PWM on a PWM-able pin and on/off on other pins. *

View File

@ -273,25 +273,22 @@
// #define TEMP_AD595
// #define TEMP_PT100
// #define TEMP_INTERCOM
// #define TEMP_NONE
/***************************************************************************\
* *
* Define your temperature sensors here. One line for each sensor, only *
* limited by the number of available ATmega pins. *
* *
* For a GEN3 set temp_type to TT_INTERCOM and temp_pin to 0. *
* *
* Types are same as TEMP_ list above - TT_MAX6675, TT_THERMISTOR, TT_AD595, *
* TT_PT100, TT_INTERCOM, TT_NONE. See list in temp.c. *
* TT_PT100, TT_INTERCOM. See list in temp.c. *
* *
* The "additional" field is used for TT_THERMISTOR only. It defines the *
* name of the table(s) in ThermistorTable.h to use. Typically, this is *
* THERMISTOR_EXTRUDER for the first or only table, or THERMISTOR_BED for *
* the second table. See also early in ThermistorTable.{single|double}.h. *
* *
* TT_INTERCOM and TT_NONE don't use a pin, insert AIO0 anyways to keep *
* the compiler happy. The pin won't be used in this case. *
* For a GEN3 set temp_type to TT_INTERCOM and temp_pin to AIO0. The pin *
* won't be used in this case. *
* *
\***************************************************************************/
@ -319,7 +316,7 @@ DEFINE_TEMP_SENSOR(bed, TT_THERMISTOR, AIO1, THERMISTOR_EXTRUDER)
/***************************************************************************\
* *
* Define your heaters here. *
* Define your heaters and devices here. *
* *
* To attach a heater to a temp sensor above, simply use exactly the same *
* name - copy+paste is your friend. Some common names are 'extruder', *
@ -327,11 +324,16 @@ DEFINE_TEMP_SENSOR(bed, TT_THERMISTOR, AIO1, THERMISTOR_EXTRUDER)
* in gcode_process.c. Currently, these are: *
* HEATER_extruder (M104) *
* HEATER_bed (M140) *
* HEATER_fan (M106/M107) *
* HEATER_fan (M106) *
* *
* A milling spindle can also be defined as a heater. Attach it to a *
* temperature sensor of TT_NONE, then you can control the spindle's rpm *
* via temperature commands. M104 S1..255 for spindle on, M104 S0 for off. *
* Devices don't neccessarily have a temperature sensor, e.g. fans or *
* milling spindles. Operate such devices by setting their power (M106), *
* instead of setting their temperature (M104). *
* *
* Also note, the index of a heater (M106 P#) can differ from the index of *
* its attached temperature sensor (M104 P#) in case sensor-less devices *
* are defined or the order of the definitions differs. The first defined *
* device has the index 0 (zero). *
* *
* Set 'pwm' to ... *
* 1 for using PWM on a PWM-able pin and on/off on other pins. *

View File

@ -277,25 +277,22 @@
// #define TEMP_AD595
// #define TEMP_PT100
// #define TEMP_INTERCOM
// #define TEMP_NONE
/***************************************************************************\
* *
* Define your temperature sensors here. One line for each sensor, only *
* limited by the number of available ATmega pins. *
* *
* For a GEN3 set temp_type to TT_INTERCOM and temp_pin to 0. *
* *
* Types are same as TEMP_ list above - TT_MAX6675, TT_THERMISTOR, TT_AD595, *
* TT_PT100, TT_INTERCOM, TT_NONE. See list in temp.c. *
* TT_PT100, TT_INTERCOM. See list in temp.c. *
* *
* The "additional" field is used for TT_THERMISTOR only. It defines the *
* name of the table(s) in ThermistorTable.h to use. Typically, this is *
* THERMISTOR_EXTRUDER for the first or only table, or THERMISTOR_BED for *
* the second table. See also early in ThermistorTable.{single|double}.h. *
* *
* TT_INTERCOM and TT_NONE don't use a pin, insert AIO0 anyways to keep *
* the compiler happy. The pin won't be used in this case. *
* For a GEN3 set temp_type to TT_INTERCOM and temp_pin to AIO0. The pin *
* won't be used in this case. *
* *
\***************************************************************************/
@ -323,7 +320,7 @@ DEFINE_TEMP_SENSOR(extruder, TT_THERMISTOR, AIO13, THERMISTOR_EXTRUDER)
/***************************************************************************\
* *
* Define your heaters here. *
* Define your heaters and devices here. *
* *
* To attach a heater to a temp sensor above, simply use exactly the same *
* name - copy+paste is your friend. Some common names are 'extruder', *
@ -331,11 +328,16 @@ DEFINE_TEMP_SENSOR(extruder, TT_THERMISTOR, AIO13, THERMISTOR_EXTRUDER)
* in gcode_process.c. Currently, these are: *
* HEATER_extruder (M104) *
* HEATER_bed (M140) *
* HEATER_fan (M106/M107) *
* HEATER_fan (M106) *
* *
* A milling spindle can also be defined as a heater. Attach it to a *
* temperature sensor of TT_NONE, then you can control the spindle's rpm *
* via temperature commands. M104 S1..255 for spindle on, M104 S0 for off. *
* Devices don't neccessarily have a temperature sensor, e.g. fans or *
* milling spindles. Operate such devices by setting their power (M106), *
* instead of setting their temperature (M104). *
* *
* Also note, the index of a heater (M106 P#) can differ from the index of *
* its attached temperature sensor (M104 P#) in case sensor-less devices *
* are defined or the order of the definitions differs. The first defined *
* device has the index 0 (zero). *
* *
* Set 'pwm' to ... *
* 1 for using PWM on a PWM-able pin and on/off on other pins. *

View File

@ -274,25 +274,22 @@
// #define TEMP_AD595
// #define TEMP_PT100
// #define TEMP_INTERCOM
// #define TEMP_NONE
/***************************************************************************\
* *
* Define your temperature sensors here. One line for each sensor, only *
* limited by the number of available ATmega pins. *
* *
* For a GEN3 set temp_type to TT_INTERCOM and temp_pin to 0. *
* *
* Types are same as TEMP_ list above - TT_MAX6675, TT_THERMISTOR, TT_AD595, *
* TT_PT100, TT_INTERCOM, TT_NONE. See list in temp.c. *
* TT_PT100, TT_INTERCOM. See list in temp.c. *
* *
* The "additional" field is used for TT_THERMISTOR only. It defines the *
* name of the table(s) in ThermistorTable.h to use. Typically, this is *
* THERMISTOR_EXTRUDER for the first or only table, or THERMISTOR_BED for *
* the second table. See also early in ThermistorTable.{single|double}.h. *
* *
* TT_INTERCOM and TT_NONE don't use a pin, insert AIO0 anyways to keep *
* the compiler happy. The pin won't be used in this case. *
* For a GEN3 set temp_type to TT_INTERCOM and temp_pin to AIO0. The pin *
* won't be used in this case. *
* *
\***************************************************************************/
@ -320,7 +317,7 @@ DEFINE_TEMP_SENSOR(bed, TT_THERMISTOR, AIO6, THERMISTOR_EXTRUDER)
/***************************************************************************\
* *
* Define your heaters here. *
* Define your heaters and devices here. *
* *
* To attach a heater to a temp sensor above, simply use exactly the same *
* name - copy+paste is your friend. Some common names are 'extruder', *
@ -328,11 +325,16 @@ DEFINE_TEMP_SENSOR(bed, TT_THERMISTOR, AIO6, THERMISTOR_EXTRUDER)
* in gcode_process.c. Currently, these are: *
* HEATER_extruder (M104) *
* HEATER_bed (M140) *
* HEATER_fan (M106/M107) *
* HEATER_fan (M106) *
* *
* A milling spindle can also be defined as a heater. Attach it to a *
* temperature sensor of TT_NONE, then you can control the spindle's rpm *
* via temperature commands. M104 S1..255 for spindle on, M104 S0 for off. *
* Devices don't neccessarily have a temperature sensor, e.g. fans or *
* milling spindles. Operate such devices by setting their power (M106), *
* instead of setting their temperature (M104). *
* *
* Also note, the index of a heater (M106 P#) can differ from the index of *
* its attached temperature sensor (M104 P#) in case sensor-less devices *
* are defined or the order of the definitions differs. The first defined *
* device has the index 0 (zero). *
* *
* Set 'pwm' to ... *
* 1 for using PWM on a PWM-able pin and on/off on other pins. *

View File

@ -274,25 +274,22 @@
// #define TEMP_AD595
// #define TEMP_PT100
// #define TEMP_INTERCOM
// #define TEMP_NONE
/***************************************************************************\
* *
* Define your temperature sensors here. One line for each sensor, only *
* limited by the number of available ATmega pins. *
* *
* For a GEN3 set temp_type to TT_INTERCOM and temp_pin to 0. *
* *
* Types are same as TEMP_ list above - TT_MAX6675, TT_THERMISTOR, TT_AD595, *
* TT_PT100, TT_INTERCOM, TT_NONE. See list in temp.c. *
* TT_PT100, TT_INTERCOM. See list in temp.c. *
* *
* The "additional" field is used for TT_THERMISTOR only. It defines the *
* name of the table(s) in ThermistorTable.h to use. Typically, this is *
* THERMISTOR_EXTRUDER for the first or only table, or THERMISTOR_BED for *
* the second table. See also early in ThermistorTable.{single|double}.h. *
* *
* TT_INTERCOM and TT_NONE don't use a pin, insert AIO0 anyways to keep *
* the compiler happy. The pin won't be used in this case. *
* For a GEN3 set temp_type to TT_INTERCOM and temp_pin to AIO0. The pin *
* won't be used in this case. *
* *
\***************************************************************************/
@ -320,7 +317,7 @@ DEFINE_TEMP_SENSOR(bed, TT_THERMISTOR, AIO6, THERMISTOR_BED)
/***************************************************************************\
* *
* Define your heaters here. *
* Define your heaters and devices here. *
* *
* To attach a heater to a temp sensor above, simply use exactly the same *
* name - copy+paste is your friend. Some common names are 'extruder', *
@ -328,11 +325,16 @@ DEFINE_TEMP_SENSOR(bed, TT_THERMISTOR, AIO6, THERMISTOR_BED)
* in gcode_process.c. Currently, these are: *
* HEATER_extruder (M104) *
* HEATER_bed (M140) *
* HEATER_fan (M106/M107) *
* HEATER_fan (M106) *
* *
* A milling spindle can also be defined as a heater. Attach it to a *
* temperature sensor of TT_NONE, then you can control the spindle's rpm *
* via temperature commands. M104 S1..255 for spindle on, M104 S0 for off. *
* Devices don't neccessarily have a temperature sensor, e.g. fans or *
* milling spindles. Operate such devices by setting their power (M106), *
* instead of setting their temperature (M104). *
* *
* Also note, the index of a heater (M106 P#) can differ from the index of *
* its attached temperature sensor (M104 P#) in case sensor-less devices *
* are defined or the order of the definitions differs. The first defined *
* device has the index 0 (zero). *
* *
* Set 'pwm' to ... *
* 1 for using PWM on a PWM-able pin and on/off on other pins. *

View File

@ -324,25 +324,22 @@ to use the other 6 PWMs instead.
// #define TEMP_AD595
// #define TEMP_PT100
// #define TEMP_INTERCOM
// #define TEMP_NONE
/***************************************************************************\
* *
* Define your temperature sensors here. One line for each sensor, only *
* limited by the number of available ATmega pins. *
* *
* For a GEN3 set temp_type to TT_INTERCOM and temp_pin to 0. *
* *
* Types are same as TEMP_ list above - TT_MAX6675, TT_THERMISTOR, TT_AD595, *
* TT_PT100, TT_INTERCOM, TT_NONE. See list in temp.c. *
* TT_PT100, TT_INTERCOM. See list in temp.c. *
* *
* The "additional" field is used for TT_THERMISTOR only. It defines the *
* name of the table(s) in ThermistorTable.h to use. Typically, this is *
* THERMISTOR_EXTRUDER for the first or only table, or THERMISTOR_BED for *
* the second table. See also early in ThermistorTable.{single|double}.h. *
* *
* TT_INTERCOM and TT_NONE don't use a pin, insert AIO0 anyways to keep *
* the compiler happy. The pin won't be used in this case. *
* For a GEN3 set temp_type to TT_INTERCOM and temp_pin to AIO0. The pin *
* won't be used in this case. *
* *
\***************************************************************************/
@ -373,7 +370,7 @@ DEFINE_TEMP_SENSOR(bed, TT_THERMISTOR, AIO1, THERMISTOR_EXTRUDER)
/***************************************************************************\
* *
* Define your heaters here. *
* Define your heaters and devices here. *
* *
* To attach a heater to a temp sensor above, simply use exactly the same *
* name - copy+paste is your friend. Some common names are 'extruder', *
@ -381,11 +378,16 @@ DEFINE_TEMP_SENSOR(bed, TT_THERMISTOR, AIO1, THERMISTOR_EXTRUDER)
* in gcode_process.c. Currently, these are: *
* HEATER_extruder (M104) *
* HEATER_bed (M140) *
* HEATER_fan (M106/M107) *
* HEATER_fan (M106) *
* *
* A milling spindle can also be defined as a heater. Attach it to a *
* temperature sensor of TT_NONE, then you can control the spindle's rpm *
* via temperature commands. M104 S1..255 for spindle on, M104 S0 for off. *
* Devices don't neccessarily have a temperature sensor, e.g. fans or *
* milling spindles. Operate such devices by setting their power (M106), *
* instead of setting their temperature (M104). *
* *
* Also note, the index of a heater (M106 P#) can differ from the index of *
* its attached temperature sensor (M104 P#) in case sensor-less devices *
* are defined or the order of the definitions differs. The first defined *
* device has the index 0 (zero). *
* *
* Set 'pwm' to ... *
* 1 for using PWM on a PWM-able pin and on/off on other pins. *

View File

@ -467,9 +467,15 @@ void process_gcode_command() {
//?
//? Example: M104 S190
//?
//? Set the temperature of the current extruder to 190<sup>o</sup>C and return control to the host immediately (''i.e.'' before that temperature has been reached by the extruder). See also M116.
//? Teacup supports an optional P parameter as a sensor index to address (eg M104 P1 S100 will set the bed temperature rather than the extruder temperature).
//?
//? Set the temperature of the current extruder to 190<sup>o</sup>C
//? and return control to the host immediately (''i.e.'' before that
//? temperature has been reached by the extruder). For waiting, see M116.
//?
//? Teacup supports an optional P parameter as a zero-based temperature
//? sensor index to address (e.g. M104 P1 S100 will set the temperature
//? of the heater connected to the second temperature sensor rather
//? than the extruder temperature).
//?
if ( ! next_target.seen_S)
break;
if ( ! next_target.seen_P)
@ -480,15 +486,18 @@ void process_gcode_command() {
break;
case 105:
//? --- M105: Get Extruder Temperature ---
//? --- M105: Get Temperature(s) ---
//?
//? Example: M105
//?
//? Request the temperature of the current extruder and the build base in degrees Celsius. The temperatures are returned to the host computer. For example, the line sent to the host in response to this command looks like
//? Request the temperature of the current extruder and the build base
//? in degrees Celsius. For example, the line sent to the host in
//? response to this command looks like
//?
//? <tt>ok T:201 B:117</tt>
//?
//? Teacup supports an optional P parameter as a sensor index to address.
//? Teacup supports an optional P parameter as a zero-based temperature
//? sensor index to address.
//?
#ifdef ENFORCE_ORDER
queue_wait();
@ -500,24 +509,32 @@ void process_gcode_command() {
case 7:
case 106:
//? --- M106: Set Fan Speed ---
//? --- M106: Set Fan Speed / Set Device Power ---
//?
//? Example: M106 S120
//?
//? Control the cooling fan (if any).
//?
//? Teacup supports an optional P parameter as a zero-based heater
//? index to address. The heater index can differ from the temperature
//? sensor index, see config.h.
#ifdef ENFORCE_ORDER
// wait for all moves to complete
queue_wait();
#endif
#ifdef HEATER_FAN
if ( ! next_target.seen_S)
break;
temp_set(HEATER_FAN, next_target.S);
if (next_target.S)
power_on();
#endif
#ifdef HEATER_FAN
if ( ! next_target.seen_P)
next_target.P = HEATER_FAN;
#else
if ( ! next_target.seen_P)
break;
#endif
if ( ! next_target.seen_S)
break;
heater_set(next_target.P, next_target.S);
if (next_target.S)
power_on();
break;
case 110:

View File

@ -304,14 +304,6 @@ void heater_tick(heater_t h, temp_type_t type, uint16_t current_temp, uint16_t t
return;
}
#ifdef TEMP_NONE
if (type == TT_NONE) {
// it's something like a milling spindle
heater_set(h, target_temp >> 2);
return;
}
#endif /* TEMP_NONE */
#ifndef BANG_BANG
heaters_runtime[h].temp_history[heaters_runtime[h].temp_history_pointer++] = current_temp;
heaters_runtime[h].temp_history_pointer &= (TH_COUNT - 1);

19
temp.c
View File

@ -33,10 +33,6 @@
#include "analog.h"
#endif
#ifdef TEMP_NONE
// no actual sensor, just store the target temp
#endif
typedef enum {
PRESENT,
TCOPEN
@ -101,12 +97,6 @@ void temp_init() {
break;
#endif
#ifdef TEMP_NONE
case TT_NONE:
// nothing to do
break;
#endif
default: /* prevent compiler warning */
break;
}
@ -263,15 +253,6 @@ void temp_sensor_tick() {
break;
#endif /* TEMP_INTERCOM */
#ifdef TEMP_NONE
case TT_NONE:
temp_sensors_runtime[i].last_read_temp =
temp_sensors_runtime[i].target_temp; // for get_temp()
temp_sensors_runtime[i].next_read_time = 25;
break;
#endif /* TEMP_NONE */
#ifdef TEMP_DUMMY
case TT_DUMMY:
temp = temp_sensors_runtime[i].last_read_temp;

1
temp.h
View File

@ -27,7 +27,6 @@ typedef enum {
TT_AD595,
TT_PT100,
TT_INTERCOM,
TT_NONE,
TT_DUMMY,
} temp_type_t;