Stéphane Cachat
/
Smoothie
smoothie port to mbed online compiler (smoothieware.org)
Embed:
(wiki syntax)
Show/hide line numbers
TemperatureControlPool.cpp
00001 /* 00002 This file is part of Smoothie (http://smoothieware.org/). The motion control part is heavily based on Grbl (https://github.com/simen/grbl). 00003 Smoothie is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 00004 Smoothie is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 00005 You should have received a copy of the GNU General Public License along with Smoothie. If not, see <http://www.gnu.org/licenses/>. 00006 */ 00007 00008 #include "libs/Module.h" 00009 #include "libs/Kernel.h" 00010 #include <math.h> 00011 using namespace std; 00012 #include <vector> 00013 #include "TemperatureControlPool.h" 00014 #include "TemperatureControl.h" 00015 00016 TemperatureControlPool::TemperatureControlPool(){} 00017 00018 void TemperatureControlPool::on_module_loaded(){ 00019 00020 vector<uint16_t> modules; 00021 this->kernel->config->get_module_list( &modules, temperature_control_checksum ); 00022 00023 for( int i = 0; i < modules.size(); i++ ){ 00024 // If module is enabled 00025 if( this->kernel->config->value(temperature_control_checksum, modules[i], enable_checksum )->as_bool() == true ){ 00026 TemperatureControl* controller = new TemperatureControl(modules[i]); 00027 this->kernel->add_module(controller); 00028 this->controllers.push_back( controller ); 00029 } 00030 } 00031 00032 } 00033 00034 00035 00036 00037
Generated on Tue Jul 12 2022 14:14:42 by 1.7.2