Switch and TemperatureControl: 1khz modulation rate
authorMichael Moon <triffid.hunter@gmail.com>
Sun, 30 Dec 2012 09:31:22 +0000 (20:31 +1100)
committerMichael Moon <triffid.hunter@gmail.com>
Wed, 2 Jan 2013 00:50:20 +0000 (11:50 +1100)
src/modules/tools/switch/Switch.cpp
src/modules/tools/temperaturecontrol/TemperatureControl.cpp

index 4b6918a..38cb9f2 100644 (file)
@@ -24,7 +24,7 @@ void Switch::on_module_loaded(){
     this->on_config_reload(this);
 
     // PWM
-    this->kernel->slow_ticker->attach(100, this->output_pin, &Pin::tick);
+    this->kernel->slow_ticker->attach(1000, this->output_pin, &Pin::tick);
 }
 
 
index 5818789..832aa1d 100644 (file)
@@ -95,7 +95,7 @@ void TemperatureControl::on_config_reload(void* argument){
     this->heater_pin->set(0);
 
     // activate SD-DAC timer
-    this->kernel->slow_ticker->attach(100, this->heater_pin, &Pin::tick);
+    this->kernel->slow_ticker->attach(1000, this->heater_pin, &Pin::tick);
 
     // PID
     this->p_factor = this->kernel->config->value(temperature_control_checksum, this->name_checksum, p_factor_checksum)->by_default(10 )->as_number();