optimize readonly
authorJim Morris <morris@wolfman.com>
Thu, 28 Aug 2014 05:12:29 +0000 (22:12 -0700)
committerJim Morris <morris@wolfman.com>
Thu, 28 Aug 2014 05:12:29 +0000 (22:12 -0700)
update configs

ConfigSamples/AzteegX5Mini.delta/config
ConfigSamples/AzteegX5Mini/config
ConfigSamples/Smoothieboard.delta/config
src/modules/tools/temperaturecontrol/TemperatureControl.cpp

index 1501291..4972d48 100644 (file)
@@ -105,14 +105,16 @@ switch.fan.input_on_command                  M106             #
 switch.fan.input_off_command                 M107             #
 switch.fan.output_pin                        2.4              #
 
-# automatically toggle a switch at a specified temperature
+# automatically toggle a switch at a specified temperature. Different ones of these may be defined to monitor different temperatures and switch different swithxes
 # useful to turn on a fan or water pump to cool the hotend
-#temperatureswitch.hotend.enable                 true             #
-#temperatureswitch.hotend.type                misc             # select which MOSFET to use, fan or misc (small MOSFETs)
+#temperatureswitch.hotend.enable                true             #
+#temperatureswitch.hotend.designator          T                # first character of the temperature control designator to use as the temperature sensor to monitor
+#temperatureswitch.hotend.switch              misc             # select which switch to use, matches the name of the defined switch
 #temperatureswitch.hotend.threshold_temp      60.0             # temperature to turn on (if rising) or off the switch
 #temperatureswitch.hotend.heatup_poll         15               # poll heatup at 15 sec intervals
 #temperatureswitch.hotend.cooldown_poll       60               # poll cooldown at 60 sec intervals
 
+
 # switch.psu.enable                            true             # turn atx on/off
 # switch.psu.input_on_command                  M80              #
 # switch.psu.input_off_command                 M81              #
index 6ed0bec..234f4d3 100755 (executable)
@@ -96,14 +96,16 @@ switch.misc.input_on_command                 M42              #
 switch.misc.input_off_command                M43              #
 switch.misc.output_pin                       2.4              #
 
-# automatically toggle a switch at a specified temperature
+# automatically toggle a switch at a specified temperature. Different ones of these may be defined to monitor different temperatures and switch different swithxes
 # useful to turn on a fan or water pump to cool the hotend
-#temperatureswitch.hotend.enable                 true             #
-#temperatureswitch.hotend.type                misc             # select which MOSFET to use, fan or misc (small MOSFETs)
+#temperatureswitch.hotend.enable                true             #
+#temperatureswitch.hotend.designator          T                # first character of the temperature control designator to use as the temperature sensor to monitor
+#temperatureswitch.hotend.switch              misc             # select which switch to use, matches the name of the defined switch
 #temperatureswitch.hotend.threshold_temp      60.0             # temperature to turn on (if rising) or off the switch
 #temperatureswitch.hotend.heatup_poll         15               # poll heatup at 15 sec intervals
 #temperatureswitch.hotend.cooldown_poll       60               # poll cooldown at 60 sec intervals
 
+
 # Switch module for spindle control
 #switch.spindle.enable                        false            #
 
index 1d900ae..8be0ab6 100644 (file)
@@ -182,10 +182,11 @@ switch.fan.output_type                       pwm              # pwm output setta
 #switch.misc.output_pin                       2.4              #
 #switch.misc.output_type                      digital          # just an on or off pin
 
-# automatically toggle a switch at a specified temperature
+# automatically toggle a switch at a specified temperature. Different ones of these may be defined to monitor different temperatures and switch different swithxes
 # useful to turn on a fan or water pump to cool the hotend
-#temperatureswitch.hotend.enable                 true             #
-#temperatureswitch.hotend.type                misc             # select which MOSFET to use, fan or misc (small MOSFETs)
+#temperatureswitch.hotend.enable              true             #
+#temperatureswitch.hotend.designator          T                # first character of the temperature control designator to use as the temperature sensor to monitor
+#temperatureswitch.hotend.switch              misc             # select which switch to use, matches the name of the defined switch
 #temperatureswitch.hotend.threshold_temp      60.0             # temperature to turn on (if rising) or off the switch
 #temperatureswitch.hotend.heatup_poll         15               # poll heatup at 15 sec intervals
 #temperatureswitch.hotend.cooldown_poll       60               # poll cooldown at 60 sec intervals
index 4b8d3a7..96345a7 100644 (file)
@@ -98,8 +98,6 @@ void TemperatureControl::on_module_loaded()
 
 void TemperatureControl::on_halt(void *arg)
 {
-    if(this->readonly) return;
-
     // turn off heater
     this->o = 0;
     this->heater_pin.set(0);
@@ -253,9 +251,6 @@ void TemperatureControl::on_gcode_received(void *argument)
 
 void TemperatureControl::on_gcode_execute(void *argument)
 {
-    // readonly sensors don't handle this
-    if(this->readonly) return;
-
     Gcode *gcode = static_cast<Gcode *>(argument);
     if( gcode->has_m) {
         if (((gcode->m == this->set_m_code) || (gcode->m == this->set_and_wait_m_code))
@@ -309,8 +304,6 @@ void TemperatureControl::on_get_public_data(void *argument)
 
 void TemperatureControl::on_set_public_data(void *argument)
 {
-    if(this->readonly) return;
-
     PublicDataRequest *pdr = static_cast<PublicDataRequest *>(argument);
 
     if(!pdr->starts_with(temperature_control_checksum)) return;
@@ -325,8 +318,6 @@ void TemperatureControl::on_set_public_data(void *argument)
 
 void TemperatureControl::set_desired_temperature(float desired_temperature)
 {
-    if(this->readonly) return;
-
     if (desired_temperature == 1.0)
         desired_temperature = preset1;
     else if (desired_temperature == 2.0)