#include "libs/Kernel.h"
#include "libs/utils.h"
#include "libs/Pin.h"
-#include "ConfigValue.h"
#include "ConfigCache.h"
#include "ConfigSource.h"
#include "libs/ConfigSources/FileConfigSource.h"
#define LOCAL_CONFIGSOURCE_CHECKSUM 13581
#define SD_CONFIGSOURCE_CHECKSUM 19415
+class ConfigValue;
class Config : public Module {
public:
-/*
- This file is part of Smoothie (http://smoothieware.org/). The motion control part is heavily based on Grbl (https://github.com/simen/grbl).
- 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.
- 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.
- You should have received a copy of the GNU General Public License along with Smoothie. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef CONFIGSOURCE_H
-#define CONFIGSOURCE_H
-
-using namespace std;
-#include <vector>
-#include <string>
-#include "ConfigValue.h"
-#include "ConfigCache.h"
-
-class ConfigValue;
-
-class ConfigSource {
- public:
- ConfigSource(){}
-
- // Read each value, and append it as a ConfigValue to the config_cache we were passed
- virtual void transfer_values_to_cache( ConfigCache* ) = 0;
- virtual bool is_named( uint16_t check_sum ) = 0;
- virtual void write( string setting, string value ) = 0;
- virtual string read( uint16_t check_sums[3] ) = 0;
-
- uint16_t name_checksum;
- protected:
- virtual string process_char_from_ascii_config(int c, ConfigCache* cache) {
- static string buffer;
- if (c == '\n' || c == EOF)
- {
- // We have a new line
- if( buffer[0] == '#' ){ buffer.clear(); return ""; } // Ignore comments
- if( buffer.length() < 3 ){ buffer.clear(); return ""; } //Ignore empty lines
- size_t begin_key = buffer.find_first_not_of(" ");
- size_t begin_value = buffer.find_first_not_of(" ", buffer.find_first_of(" ", begin_key));
-
- uint16_t check_sums[3];
- get_checksums(check_sums, buffer.substr(begin_key, buffer.find_first_of(" ", begin_key) - begin_key).append(" "));
-
- ConfigValue* result = new ConfigValue;
-
- result->found = true;
- result->check_sums[0] = check_sums[0];
- result->check_sums[1] = check_sums[1];
- result->check_sums[2] = check_sums[2];
-
- result->value = buffer.substr(begin_value, buffer.find_first_of("\r\n# ", begin_value+1)-begin_value);
- // Append the newly found value to the cache we were passed
- cache->replace_or_push_back(result);
-
- buffer.clear();
-
- return result->value;
- }
- else
- buffer += c;
-
- return "";
- };
- virtual string process_char_from_ascii_config(int c, uint16_t line_checksums[3]) {
- static string buffer;
- string value;
- if (c == '\n' || c == EOF)
- {
- // We have a new line
- if( buffer[0] == '#' ){ buffer.clear(); return ""; } // Ignore comments
- if( buffer.length() < 3 ){ buffer.clear(); return ""; } //Ignore empty lines
- size_t begin_key = buffer.find_first_not_of(" ");
- size_t begin_value = buffer.find_first_not_of(" ", buffer.find_first_of(" ", begin_key));
-
- uint16_t check_sums[3];
- get_checksums(check_sums, buffer.substr(begin_key, buffer.find_first_of(" ", begin_key) - begin_key).append(" "));
-
- if(check_sums[0] == line_checksums[0] && check_sums[1] == line_checksums[1] && check_sums[2] == line_checksums[2] ){
- value = buffer.substr(begin_value, buffer.find_first_of("\r\n# ", begin_value+1)-begin_value);
- buffer.clear();
- return value;
- }
-
- buffer.clear();
- }
- else
- buffer += c;
- return value;
- };
-};
-
-
-
-#endif
+/*
+ This file is part of Smoothie (http://smoothieware.org/). The motion control part is heavily based on Grbl (https://github.com/simen/grbl).
+ 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.
+ 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.
+ You should have received a copy of the GNU General Public License along with Smoothie. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef CONFIGSOURCE_H
+#define CONFIGSOURCE_H
+
+using namespace std;
+#include <vector>
+#include <string>
+#include "ConfigValue.h"
+#include "ConfigCache.h"
+
+class ConfigValue;
+
+class ConfigSource {
+ public:
+ ConfigSource(){}
+
+ // Read each value, and append it as a ConfigValue to the config_cache we were passed
+ virtual void transfer_values_to_cache( ConfigCache* ) = 0;
+ virtual bool is_named( uint16_t check_sum ) = 0;
+ virtual void write( string setting, string value ) = 0;
+ virtual string read( uint16_t check_sums[3] ) = 0;
+
+ uint16_t name_checksum;
+
+ protected:
+ virtual string process_char_from_ascii_config(int c, ConfigCache* cache);
+ virtual string process_char_from_ascii_config(int c, uint16_t line_checksums[3]);
+};
+
+
+
+#endif
#include "ConfigValue.h"
#include "FileConfigSource.h"
#include "ConfigCache.h"
+#include "utils.h"
#include <malloc.h>
using namespace std;
#include <string>
+#include <stdio.h>
FileConfigSource::FileConfigSource(string config_file, uint16_t name_checksum){
this->name_checksum = name_checksum;
#include "ConfigValue.h"
#include "ConfigSource.h"
#include "ConfigCache.h"
+#include "checksumm.h"
using namespace std;
#include <string>
-/*
- This file is part of Smoothie (http://smoothieware.org/). The motion control part is heavily based on Grbl (https://github.com/simen/grbl).
- 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.
- 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.
- You should have received a copy of the GNU General Public License along with Smoothie. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef CONFIGVALUE_H
-#define CONFIGVALUE_H
-
-#include "libs/Kernel.h"
-#include "libs/utils.h"
-#include "libs/Pin.h"
-#include "Pwm.h"
-
-
-#define error(...) (fprintf(stderr, __VA_ARGS__), exit(1))
-
-using namespace std;
-#include <vector>
-#include <string>
-#include <stdio.h>
-
-
-class ConfigValue{
- public:
- ConfigValue(){
- this->found = false;
- this->default_set = false;
- this->check_sums[0] = 0x0000;
- this->check_sums[1] = 0x0000;
- this->check_sums[2] = 0x0000;
- };
-
- ConfigValue* required(){
- if( this->found == true ){
- return this;
- }else{
- error("could not find config setting, please see http://smoothieware.org/configuring-smoothie\r\n");
- }
- }
-
- float as_number(){
- if( this->found == false && this->default_set == true ){
- return this->default_double;
- }else{
- char* endptr = NULL;
- string str = remove_non_number(this->value);
- float result = strtof(str.c_str(), &endptr);
- if( endptr <= str.c_str() ){
- error("config setting with value '%s' and checksums[%u,%u,%u] is not a valid number, please see http://smoothieware.org/configuring-smoothie\r\n", this->value.c_str(), this->check_sums[0], this->check_sums[1], this->check_sums[2] );
- }
- return result;
- }
- }
-
- int as_int()
- {
- if( this->found == false && this->default_set == true ){
- return this->default_int;
- }else{
- char* endptr = NULL;
- string str = remove_non_number(this->value);
- int result = strtol(str.c_str(), &endptr, 10);
- if( endptr <= str.c_str() ){
- error("config setting with value '%s' and checksums[%u,%u,%u] is not a valid number, please see http://smoothieware.org/configuring-smoothie\r\n", this->value.c_str(), this->check_sums[0], this->check_sums[1], this->check_sums[2] );
- }
- return result;
- }
- }
-
- std::string as_string(){
- return this->value;
- }
-
- bool as_bool(){
- if( this->found == false && this->default_set == true ){
- return this->default_double;
- }else{
- if( this->value.find_first_of("ty1") != string::npos ){
- return true;
- }else{
- return false;
- }
- }
- }
-
- ConfigValue* by_default(int val)
- {
- this->default_set = true;
- this->default_int = val;
- this->default_double = val;
- return this;
- }
-
- ConfigValue* by_default(float val){
- this->default_set = true;
- this->default_double = val;
- return this;
- }
-
- ConfigValue* by_default(std::string val){
- if( this->found ){ return this; }
- this->default_set = true;
- this->value = val;
- return this;
- }
-
- bool has_characters( string mask ){
- if( this->value.find_first_of(mask) != string::npos ){ return true; }else{ return false; }
- }
-
- bool is_inverted(){
- return this->has_characters(string("!"));
- }
-
- int default_int;
- float default_double;
- uint16_t check_sums[3];
- string value;
- bool found;
- bool default_set;
-};
-
-
-
-
-
-
-
-
-#endif
+/*
+ This file is part of Smoothie (http://smoothieware.org/). The motion control part is heavily based on Grbl (https://github.com/simen/grbl).
+ 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.
+ 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.
+ You should have received a copy of the GNU General Public License along with Smoothie. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef CONFIGVALUE_H
+#define CONFIGVALUE_H
+
+#include "libs/Kernel.h"
+
+using namespace std;
+#include <string>
+
+class ConfigValue{
+ public:
+ ConfigValue();
+
+ ConfigValue* required();
+ float as_number();
+ int as_int();
+ string as_string();
+ bool as_bool();
+
+ ConfigValue* by_default(float val);
+ ConfigValue* by_default(string val);
+ ConfigValue* by_default(int val);
+ bool has_characters( string mask );
+ bool is_inverted();
+
+ int default_int;
+ float default_double;
+ uint16_t check_sums[3];
+ string value;
+ bool found;
+ bool default_set;
+};
+
+
+
+
+
+
+
+
+#endif
#include "libs/StreamOutputPool.h"
#include <mri.h>
+
+#include "libs/StepTicker.h"
+#include "libs/PublicData.h"
#include "modules/communication/SerialConsole.h"
#include "modules/communication/GcodeDispatch.h"
+#include "modules/tools/toolsmanager/ToolsManager.h"
#include "modules/robot/Planner.h"
#include "modules/robot/Robot.h"
#include "modules/robot/Stepper.h"
+#include <array>
+
+
+
#include "modules/robot/Conveyor.h"
#include "modules/tools/endstops/Endstops.h"
#include <malloc.h>
#ifndef KERNEL_H
#define KERNEL_H
-#include "libs/Module.h"
-#include "libs/Config.h"
-#include "libs/SlowTicker.h"
-#include "libs/StreamOutputPool.h"
-#include "libs/StepTicker.h"
-#include "libs/Adc.h"
-#include "libs/Pauser.h"
-#include "libs/PublicData.h"
-#include "modules/communication/SerialConsole.h"
-#include "modules/communication/GcodeDispatch.h"
-#include "modules/tools/toolsmanager/ToolsManager.h"
-#include "modules/robot/Planner.h"
-#include "modules/robot/Robot.h"
-#include "modules/robot/Stepper.h"
-#include "mri.h"
-#include <array>
#define THEKERNEL Kernel::instance
+#include "Module.h"
+#include <array>
+#include <vector>
+
//Module manager
class Config;
class Module;
class Conveyor;
class SlowTicker;
class Pauser;
+class SerialConsole;
+class StreamOutputPool;
+class GcodeDispatch;
+class Robot;
+class Stepper;
+class Planner;
+class ToolsManager;
+class StepTicker;
+class Adc;
+class PublicData;
class Kernel {
public:
#include "CallbackStream.h"
#include "Kernel.h"
+#include <stdio.h>
-#define DEBUG_PRINTF std::printf
+#define DEBUG_PRINTF printf
CallbackStream::CallbackStream(cb_t cb, void *u)
{
#include "CommandQueue.h"
#include "Kernel.h"
+#include "Config.h"
+#include "SlowTicker.h"
#include "Network.h"
#include "PublicDataRequest.h"
*
*/
+#include "Kernel.h"
#include "stdlib.h"
#include "shell.h"
#include "uip.h"
#include "stdlib.h"
#include "telnetd.h"
#include "CallbackStream.h"
-#include "Kernel.h"
+#include "StreamOutputPool.h"
+
//#define DEBUG_PRINTF(...)
#define DEBUG_PRINTF printf
#include "SlowTicker.h"
#include "libs/Hook.h"
#include "modules/robot/Conveyor.h"
+#include "Pauser.h"
+#include "Gcode.h"
#include <mri.h>
#include "StepperMotor.h"
#include "system_LPC17xx.h" // mbed.h lib
-
+#include <math.h>
#include <mri.h>
+extern bool _isr_context;
+
// StepTicker handles the base frequency ticking for the Stepper Motors / Actuators
// It has a list of those, and calls their tick() functions at regular intervals
// They then do Bresenham stuff themselves
_isr_context = true;
int i;
uint32_t bm = 1;
- // We iterate over each active motor
+ // We iterate over each active motor
for (i = 0; i < 12; i++, bm <<= 1){
if (this->active_motor_bm & bm){
this->active_motors[i]->tick();
LPC_TIM0->MR0 = global_step_ticker->period;
return;
}
-
+
// If a move finished in this tick, we have to tell the actuator to act accordingly
- if( global_step_ticker->moves_finished ){
-
+ if( global_step_ticker->moves_finished ){
+
// Do not get out of here before everything is nice and tidy
LPC_TIM0->MR0 = 20000000;
-
+
global_step_ticker->signal_moves_finished();
// If we went over the duration an interrupt is supposed to last, we have a problem
#include "Kernel.h"
#include "MRI_Hooks.h"
+#include "StepTicker.h"
+
+#include <math.h>
// A StepperMotor represents an actual stepper motor. It is used to generate steps that move the actual motor at a given speed
// TODO : Abstract this into Actuator
// Is this move finished ?
if( this->stepped == this->steps_to_move ){
- // Mark it as finished, then StepTicker will call signal_mode_finished()
+ // Mark it as finished, then StepTicker will call signal_mode_finished()
// This is so we don't call that before all the steps have been generated for this tick()
this->is_move_finished = true;
this->step_ticker->moves_finished = true;
\r
#include "libs/Kernel.h"\r
#include "libs/SerialMessage.h"\r
+#include "StreamOutputPool.h"\r
\r
// extern void setled(int, bool);\r
#define setled(a, b) do {} while (0)\r
#include "libs/Kernel.h"
#include "libs/utils.h"
#include "system_LPC17xx.h"
+#include "LPC17xx.h"
+#include "utils.h"
using namespace std;
#include <string>
using std::string;
#include <cstring>
+#include <stdio.h>
volatile bool _isr_context = false;
*/
#include "libs/Kernel.h"
+\
#include "modules/tools/laser/Laser.h"
#include "modules/tools/extruder/ExtruderMaker.h"
#include "modules/tools/temperaturecontrol/TemperatureControlPool.h"
#include "modules/utils/PlayLed/PlayLed.h"
#include "modules/utils/panel/Panel.h"
#include "libs/Network/uip/Network.h"
+#include "Config.h"
// #include "libs/ChaNFSSD/SDFileSystem.h"
-#include "libs/Config.h"
#include "libs/nuts_bolts.h"
#include "libs/utils.h"
#include "libs/USBDevice/USBSerial/USBSerial.h"
#include "libs/USBDevice/DFU.h"
#include "libs/SDFAT.h"
+#include "StreamOutputPool.h"
#include "libs/Watchdog.h"
#include "version.h"
+#include "system_LPC17xx.h"
#define second_usb_serial_enable_checksum CHECKSUM("second_usb_serial_enable")
#define disable_msd_checksum CHECKSUM("msd_disable")
#include "libs/SerialMessage.h"
#include "libs/StreamOutput.h"
#include "libs/FileStream.h"
+#include "Config.h"
GcodeDispatch::GcodeDispatch() {}
#include "libs/RingBuffer.h"
#include "libs/SerialMessage.h"
#include "libs/StreamOutput.h"
+#include "libs/StreamOutputPool.h"
// Serial reading module
// Treats every received line as a command and passes it ( via event call ) to the command dispatcher.
#include "Planner.h"
#include "Conveyor.h"
#include "Gcode.h"
+#include "libs/StreamOutputPool.h"
+#include "Stepper.h"
#include "mri.h"
#define BLOCK_H
#include "libs/Module.h"
#include "libs/Kernel.h"
+#include "Gcode.h"
+
using namespace std;
#include <string>
#include <vector>
-#include "../communication/utils/Gcode.h"
-#include "Planner.h"
-class Planner;
-class Conveyor;
+
float max_allowable_speed( float acceleration, float target_velocity, float distance);
#include "Conveyor.h"
#include "Planner.h"
#include "mri.h"
+#include "checksumm.h"
+#include "Config.h"
+#include "libs/StreamOutputPool.h"
#define planner_queue_size_checksum CHECKSUM("planner_queue_size")
#include <vector>
class Gcode;
+class Block;
class Conveyor : public Module
{
#include "Planner.h"
#include "Conveyor.h"
#include "StepperMotor.h"
+#include "Config.h"
+#include "checksumm.h"
+#include "Robot.h"
+#include "Stepper.h"
+
+#include <math.h>
#define acceleration_checksum CHECKSUM("acceleration")
#define max_jerk_checksum CHECKSUM("max_jerk")
#include "arm_solutions/RostockSolution.h"
#include "arm_solutions/JohannKosselSolution.h"
#include "arm_solutions/HBotSolution.h"
+#include "StepTicker.h"
#define default_seek_rate_checksum CHECKSUM("default_seek_rate")
#define default_feed_rate_checksum CHECKSUM("default_feed_rate")
#include "Planner.h"
#include "Conveyor.h"
#include "StepperMotor.h"
+#include "Robot.h"
+#include "checksumm.h"
+#include "SlowTicker.h"
+#include "Config.h"
#include <vector>
using namespace std;
#include "libs/Pin.h"
#include "libs/StepperMotor.h"
#include "wait_api.h" // mbed.h lib
+#include "Robot.h"
+#include "Stepper.h"
+#include "Config.h"
+#include "SlowTicker.h"
+#include "Planner.h"
+
#define ALPHA_AXIS 0
#define BETA_AXIS 1
#include "modules/robot/Conveyor.h"
#include "modules/robot/Block.h"
#include "StepperMotor.h"
+#include "SlowTicker.h"
+#include "Stepper.h"
+#include "StepTicker.h"
+#include "Config.h"
+#include "StepperMotor.h"
+#include "Robot.h"
#include <mri.h>
#include "libs/Kernel.h"
#include "modules/robot/Block.h"
#include "modules/tools/toolsmanager/Tool.h"
+#include "Pin.h"
+
+class StepperMotor;
#define OFF 0
#define SOLO 1
#include <vector>
#include "ExtruderMaker.h"
#include "Extruder.h"
+#include "Config.h"
+#include "ToolsManager.h"
+
+
ExtruderMaker::ExtruderMaker(){}
// If there is a "single" extruder configured ( old config syntax from when there was only one extruder module, no pool/maker
if( THEKERNEL->config->value( extruder_module_enable_checksum )->by_default(false)->as_bool() == true ){
-
+
// Make a new extruder module
- Extruder* extruder = new Extruder(0);
+ Extruder* extruder = new Extruder(0);
// Signal the extruder it will have to read config as an alone extruder
- extruder->single_config = true;
-
+ extruder->single_config = true;
+
// Add the module to the kernel
- THEKERNEL->add_module( extruder );
-
+ THEKERNEL->add_module( extruder );
+
// Add the module to the ToolsManager
- THEKERNEL->toolsmanager->add_tool( extruder );
+ THEKERNEL->toolsmanager->add_tool( extruder );
}
// Get every "declared" extruder module ( new, multiextruder syntax )
vector<uint16_t> modules;
THEKERNEL->config->get_module_list( &modules, extruder_checksum );
-
- // For every extruder found
+
+ // For every extruder found
for( unsigned int i = 0; i < modules.size(); i++ ){
// If module is enabled
if( THEKERNEL->config->value(extruder_checksum, modules[i], enable_checksum )->as_bool() == true ){
-
+
// Make a new extruder module
- Extruder* extruder = new Extruder(modules[i]);
+ Extruder* extruder = new Extruder(modules[i]);
// Add the module to the kernel
- THEKERNEL->add_module( extruder );
-
+ THEKERNEL->add_module( extruder );
+
// Add the module to the ToolsManager
- THEKERNEL->toolsmanager->add_tool( extruder );
+ THEKERNEL->toolsmanager->add_tool( extruder );
}
#include "modules/robot/Stepper.h"
#include "Laser.h"
#include "libs/nuts_bolts.h"
+#include "Config.h"
+#include "StreamOutputPool.h"
+#include "Block.h"
Laser::Laser(){
}
// Get smoothie-style pin from config
Pin* dummy_pin = new Pin();
dummy_pin->from_string(THEKERNEL->config->value(laser_module_pin_checksum)->by_default("nc")->as_string())->as_output();
-
+
laser_pin = NULL;
// Get mBed-style pin from smoothie-style pin
#include "modules/robot/Conveyor.h"
#include "PublicDataRequest.h"
#include "SwitchPublicAccess.h"
+#include "SlowTicker.h"
+#include "Config.h"
+#include "Gcode.h"
#include "MRI_Hooks.h"
#include "libs/Pin.h"
#include <math.h>
+#include "Pwm.h"
+
+class Gcode;
+class StreamOutput;
class Switch : public Module {
public:
#include <vector>
#include "SwitchPool.h"
#include "Switch.h"
+#include "Config.h"
+#include "checksumm.h"
#define switch_checksum CHECKSUM("switch")
#include "PID_Autotuner.h"
#include "Kernel.h"
#include <cmath> // std::abs
+#include "SlowTicker.h"
+#include "Gcode.h"
#define DEBUG_PRINTF s->printf
#include "modules/robot/Conveyor.h"
#include "PublicDataRequest.h"
#include "TemperatureControlPublicAccess.h"
+#include "StreamOutputPool.h"
+#include "Config.h"
+#include "checksumm.h"
+#include "Gcode.h"
+#include "Adc.h"
+#include "SlowTicker.h"
+#include "Pauser.h"
#include "MRI_Hooks.h"
#include "TemperatureControlPool.h"
#include "TemperatureControl.h"
#include "PID_Autotuner.h"
+#include "Config.h"
+#include "checksumm.h"
TemperatureControlPool::TemperatureControlPool(){}
#include "BaseSolution.h"
+#define touchprobe_enable_checksum CHECKSUM("touchprobe_enable")
+#define touchprobe_log_enable_checksum CHECKSUM("touchprobe_log_enable")
+#define touchprobe_logfile_name_checksum CHECKSUM("touchprobe_logfile_name")
+#define touchprobe_log_rotate_mcode_checksum CHECKSUM("touchprobe_log_rotate_mcode")
+#define touchprobe_pin_checksum CHECKSUM("touchprobe_pin")
+#define touchprobe_debounce_count_checksum CHECKSUM("touchprobe_debounce_count")
+
+#define touchprobe_enable_checksum CHECKSUM("touchprobe_enable")
+#define touchprobe_log_enable_checksum CHECKSUM("touchprobe_log_enable")
+#define touchprobe_logfile_name_checksum CHECKSUM("touchprobe_logfile_name")
+#define touchprobe_log_rotate_mcode_checksum CHECKSUM("touchprobe_log_rotate_mcode")
+#define touchprobe_pin_checksum CHECKSUM("touchprobe_pin")
+#define touchprobe_debounce_count_checksum CHECKSUM("touchprobe_debounce_count")
+
+
void Touchprobe::on_module_loaded() {
// if the module is disabled -> do nothing
this->enabled = THEKERNEL->config->value( touchprobe_enable_checksum )->by_default(false)->as_bool();
#define TOUCHPROBE_H_
#include "libs/Module.h"
-#include "libs/SDFAT.h"
-#include "modules/robot/Conveyor.h"
-#include "libs/Kernel.h"
-#include "modules/communication/utils/Gcode.h"
-#include "libs/StepperMotor.h"
-#include "libs/Pin.h"
-
-#define touchprobe_enable_checksum CHECKSUM("touchprobe_enable")
-#define touchprobe_log_enable_checksum CHECKSUM("touchprobe_log_enable")
-#define touchprobe_logfile_name_checksum CHECKSUM("touchprobe_logfile_name")
-#define touchprobe_log_rotate_mcode_checksum CHECKSUM("touchprobe_log_rotate_mcode")
-#define touchprobe_pin_checksum CHECKSUM("touchprobe_pin")
-#define touchprobe_debounce_count_checksum CHECKSUM("touchprobe_debounce_count")
-
class Touchprobe: public Module {
private:
#include "PauseButton.h"
#include "modules/robot/Conveyor.h"
+#include "SlowTicker.h"
+#include "Config.h"
+#include "Pauser.h"
PlayLed::PlayLed(){}
#include "libs/utils.h"
#include "libs/SerialMessage.h"
#include "libs/StreamOutput.h"
-
+#include "checksumm.h"
+#include "Config.h"
+#include "Gcode.h"
void Configurator::on_module_loaded(){
this->register_for_event(ON_CONSOLE_LINE_RECEIVED);
#include "libs/utils.h"
#include "Gcode.h"
+#include "Config.h"
// add new digipot chips here
#include "mcp4451.h"
#include "modules/utils/player/PlayerPublicAccess.h"
#include "screens/CustomScreen.h"
#include "screens/MainMenuScreen.h"
+#include "SlowTicker.h"
+#include "Gcode.h"
+#include "Pauser.h"
+#include "PublicData.h"
#include "panels/I2CLCD.h"
#include "panels/VikiLCD.h"
// this->click_button.set_longpress_delay(longpress_delay);
// this->back_button.set_longpress_delay(longpress_delay);
// this->pause_button.set_longpress_delay(longpress_delay);
-
-
+
+
THEKERNEL->slow_ticker->attach( 100, this, &Panel::button_tick );
THEKERNEL->slow_ticker->attach( 1000, this, &Panel::encoder_check );
#include "libs/nuts_bolts.h"
#include "libs/utils.h"
#include "libs/SerialMessage.h"
+#include "Gcode.h"
+
#include <string>
#include <vector>
#include "ST7565/glcdfont.h"
#include "Kernel.h"
#include "platform_memory.h"
+#include "Config.h"
+#include "checksumm.h"
+#include "StreamOutputPool.h"
//definitions for lcd
#define LCDWIDTH 128
#include "smoothiepanel/LCDBang.h"
#include "smoothiepanel/Colors.h"
+#include "Config.h"
+#include "checksumm.h"
// commands
#define LCD_CLEARDISPLAY 0x01
#include "VikiLCD.h"
#include "Button.h"
+#include "Config.h"
+#include "checksumm.h"
// config settings for Viki LCD
#define panel_checksum CHECKSUM("panel")
#include "RrdGlcd.h"
#include "platform_memory.h"
+#include "StreamOutputPool.h"
static const uint8_t font5x8[] = {
// 5x8 font each byte is consecutive x bits left aligned then each subsequent byte is Y 8 bytes per character
#include "libs/utils.h"
#include <string>
#include "modules/robot/RobotPublicAccess.h"
+#include "PublicData.h"
+#include "checksumm.h"
+
+#include <math.h>
+
using namespace std;
ControlScreen::ControlScreen()
*/
#include "CustomScreen.h"
#include "libs/Kernel.h"
+#include "Config.h"
+#include "checksumm.h"
+
+#include <string.h>
#include <algorithm>
#include "libs/nuts_bolts.h"
#include "libs/utils.h"
#include "modules/utils/player/PlayerPublicAccess.h"
-
+#include "PublicData.h"
+#include "checksumm.h"
#include <string>
using namespace std;
#include "libs/utils.h"
#include "PublicDataRequest.h"
#include "modules/tools/temperaturecontrol/TemperatureControlPublicAccess.h"
+#include "PublicData.h"
+#include "checksumm.h"
#include <string>
using namespace std;
#include "modules/robot/Conveyor.h"
#include "modules/utils/player/PlayerPublicAccess.h"
#include "NetworkPublicAccess.h"
+#include "PublicData.h"
+#include "checksumm.h"
+#include "Pauser.h"
+#include <math.h>
+#include <string.h>
#include <string>
+
using namespace std;
static const uint8_t icons[] = { // 115x19 - 3 bytes each: he1, he2, he3, bed, fan
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0,
#include "PauseButton.h"
#include "libs/nuts_bolts.h"
#include "libs/utils.h"
+#include "Config.h"
+#include "SlowTicker.h"
+#include "Pauser.h"
+
#include <string>
using namespace std;
#include "Player.h"
#include "libs/nuts_bolts.h"
#include "libs/utils.h"
+#include "SerialConsole.h"
#include "libs/SerialMessage.h"
+#include "libs/StreamOutputPool.h"
#include "libs/StreamOutput.h"
+#include "Gcode.h"
+#include "checksumm.h"
+#include "Pauser.h"
+#include "Config.h"
+
#include "modules/robot/Conveyor.h"
#include "DirHandle.h"
#include "PublicDataRequest.h"
#include "version.h"
#include "PublicDataRequest.h"
#include "FileStream.h"
+#include "checksumm.h"
+#include "PublicData.h"
+#include "Gcode.h"
+
+#include "SimpleShell.h"
#include "modules/tools/temperaturecontrol/TemperatureControlPublicAccess.h"
#include "modules/robot/RobotPublicAccess.h"
#include "NetworkPublicAccess.h"
#include "platform_memory.h"
+#include "system_LPC17xx.h"
+#include "LPC17xx.h"
+
extern unsigned int g_maximumHeapAddress;
#include <malloc.h>