Allow TABS in config
authorJim Morris <morris@wolfman.com>
Sun, 30 Mar 2014 04:11:22 +0000 (21:11 -0700)
committerJim Morris <morris@wolfman.com>
Sun, 30 Mar 2014 04:11:22 +0000 (21:11 -0700)
Clean up the circular dependencies caused by header fioe including everything
Make Kernel.h only include what it needs
*** ONLY include stuff you need in the cpp file, and header shouild include bare minimum ****

55 files changed:
src/libs/Config.h
src/libs/ConfigSource.h
src/libs/ConfigSources/FileConfigSource.cpp
src/libs/ConfigSources/FirmConfigSource.h
src/libs/ConfigValue.h
src/libs/Kernel.cpp
src/libs/Kernel.h
src/libs/Network/uip/CallbackStream.cpp
src/libs/Network/uip/Network.cpp
src/libs/Network/uip/telnetd/shell.cpp
src/libs/SlowTicker.cpp
src/libs/StepTicker.cpp
src/libs/StepperMotor.cpp
src/libs/USBDevice/USBSerial/USBSerial.cpp
src/libs/utils.cpp
src/main.cpp
src/modules/communication/GcodeDispatch.cpp
src/modules/communication/SerialConsole.cpp
src/modules/robot/Block.cpp
src/modules/robot/Block.h
src/modules/robot/Conveyor.cpp
src/modules/robot/Conveyor.h
src/modules/robot/Planner.cpp
src/modules/robot/Robot.cpp
src/modules/robot/Stepper.cpp
src/modules/tools/endstops/Endstops.cpp
src/modules/tools/extruder/Extruder.cpp
src/modules/tools/extruder/Extruder.h
src/modules/tools/extruder/ExtruderMaker.cpp
src/modules/tools/laser/Laser.cpp
src/modules/tools/switch/Switch.cpp
src/modules/tools/switch/Switch.h
src/modules/tools/switch/SwitchPool.cpp
src/modules/tools/temperaturecontrol/PID_Autotuner.cpp
src/modules/tools/temperaturecontrol/TemperatureControl.cpp
src/modules/tools/temperaturecontrol/TemperatureControlPool.cpp
src/modules/tools/touchprobe/Touchprobe.cpp
src/modules/tools/touchprobe/Touchprobe.h
src/modules/utils/PlayLed/PlayLed.cpp
src/modules/utils/configurator/Configurator.cpp
src/modules/utils/currentcontrol/CurrentControl.cpp
src/modules/utils/panel/Panel.cpp
src/modules/utils/panel/PanelScreen.cpp
src/modules/utils/panel/panels/ST7565.cpp
src/modules/utils/panel/panels/Smoothiepanel.cpp
src/modules/utils/panel/panels/VikiLCD.cpp
src/modules/utils/panel/panels/rrdglcd/RrdGlcd.cpp
src/modules/utils/panel/screens/ControlScreen.cpp
src/modules/utils/panel/screens/CustomScreen.cpp
src/modules/utils/panel/screens/MainMenuScreen.cpp
src/modules/utils/panel/screens/PrepareScreen.cpp
src/modules/utils/panel/screens/WatchScreen.cpp
src/modules/utils/pausebutton/PauseButton.cpp
src/modules/utils/player/Player.cpp
src/modules/utils/simpleshell/SimpleShell.cpp

index f2da3fe..993ba96 100644 (file)
@@ -10,7 +10,6 @@
 #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"
@@ -26,6 +25,7 @@ using namespace std;
 #define LOCAL_CONFIGSOURCE_CHECKSUM     13581
 #define SD_CONFIGSOURCE_CHECKSUM        19415
 
+class ConfigValue;
 
 class Config : public Module {
     public:
dissimilarity index 62%
index d36d271..396d57f 100644 (file)
@@ -1,94 +1,38 @@
-/*
-      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
index d47257f..2718813 100644 (file)
@@ -9,12 +9,14 @@
 #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;
index 0d8c51f..8c2ef1c 100644 (file)
@@ -11,6 +11,7 @@
 #include "ConfigValue.h"
 #include "ConfigSource.h"
 #include "ConfigCache.h"
+#include "checksumm.h"
 
 using namespace std;
 #include <string>
dissimilarity index 75%
index 2d64cd9..99eabc2 100644 (file)
-/*
-      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
index b30dbf8..e61f8d7 100644 (file)
 #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>
index 3c87787..025136a 100644 (file)
@@ -7,31 +7,29 @@
 
 #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:
index 29dd39d..6b3ae04 100644 (file)
@@ -1,7 +1,8 @@
 #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)
 {
index 75eeefe..77e1a99 100644 (file)
@@ -5,6 +5,8 @@
 #include "CommandQueue.h"
 
 #include "Kernel.h"
+#include "Config.h"
+#include "SlowTicker.h"
 
 #include "Network.h"
 #include "PublicDataRequest.h"
index 46b0f93..4baabdf 100644 (file)
@@ -32,6 +32,7 @@
 *
 */
 
+#include "Kernel.h"
 #include "stdlib.h"
 #include "shell.h"
 #include "uip.h"
@@ -42,7 +43,8 @@
 #include "stdlib.h"
 #include "telnetd.h"
 #include "CallbackStream.h"
-#include "Kernel.h"
+#include "StreamOutputPool.h"
+
 
 //#define DEBUG_PRINTF(...)
 #define DEBUG_PRINTF printf
index d7a0be6..a66b313 100644 (file)
@@ -13,6 +13,8 @@ using namespace std;
 #include "SlowTicker.h"
 #include "libs/Hook.h"
 #include "modules/robot/Conveyor.h"
+#include "Pauser.h"
+#include "Gcode.h"
 
 #include <mri.h>
 
index bebb600..1b7cf24 100644 (file)
@@ -17,9 +17,11 @@ using namespace std;
 #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
@@ -86,7 +88,7 @@ inline void StepTicker::tick(){
     _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();
@@ -164,13 +166,13 @@ extern "C" void TIMER0_IRQHandler (void){
         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
index 5954a5d..1bdc4e5 100644 (file)
@@ -8,6 +8,9 @@
 
 #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
@@ -74,7 +77,7 @@ void StepperMotor::step(){
 
     // 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;
index 56c995d..f01c151 100644 (file)
@@ -23,6 +23,7 @@
 \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
index 9fddd23..899933a 100644 (file)
@@ -8,10 +8,13 @@
 #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;
 
index 44b2a14..fbf80eb 100644 (file)
@@ -6,6 +6,7 @@
 */
 
 #include "libs/Kernel.h"
+\
 #include "modules/tools/laser/Laser.h"
 #include "modules/tools/extruder/ExtruderMaker.h"
 #include "modules/tools/temperaturecontrol/TemperatureControlPool.h"
@@ -21,9 +22,9 @@
 #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")
index 5ffa9ec..6e76160 100644 (file)
@@ -16,6 +16,7 @@ using std::string;
 #include "libs/SerialMessage.h"
 #include "libs/StreamOutput.h"
 #include "libs/FileStream.h"
+#include "Config.h"
 
 GcodeDispatch::GcodeDispatch() {}
 
index a6910d1..301937d 100644 (file)
@@ -15,6 +15,7 @@ using std::string;
 #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.
index 7d6f34b..acea78e 100644 (file)
@@ -14,6 +14,8 @@
 #include "Planner.h"
 #include "Conveyor.h"
 #include "Gcode.h"
+#include "libs/StreamOutputPool.h"
+#include "Stepper.h"
 
 #include "mri.h"
 
index 53e8039..63dd144 100644 (file)
@@ -9,14 +9,13 @@
 #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);
 
index d99f7ad..86799d0 100644 (file)
@@ -18,6 +18,9 @@ using namespace std;
 #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")
 
index af6437f..5838a1c 100644 (file)
@@ -17,6 +17,7 @@ using namespace std;
 #include <vector>
 
 class Gcode;
+class Block;
 
 class Conveyor : public Module
 {
index 0baabee..453ad97 100644 (file)
@@ -18,6 +18,12 @@ using namespace std;
 #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")
index 95802f3..f983baf 100644 (file)
@@ -26,6 +26,7 @@ using std::string;
 #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")
index 3ae8968..f39f10e 100644 (file)
 #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;
index ffef33d..e9c9d74 100644 (file)
 #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
index 7105f6b..18f43a2 100644 (file)
 #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>
 
index edbfb57..e941d8c 100644 (file)
@@ -14,6 +14,9 @@
 #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
index 22485e2..f503ae6 100644 (file)
@@ -12,6 +12,10 @@ using namespace std;
 #include <vector>
 #include "ExtruderMaker.h"
 #include "Extruder.h"
+#include "Config.h"
+#include "ToolsManager.h"
+
+
 
 ExtruderMaker::ExtruderMaker(){}
 
@@ -19,39 +23,39 @@ void ExtruderMaker::on_module_loaded(){
 
     // 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 );
 
         }
 
index 16d07a8..ab596a9 100644 (file)
@@ -11,6 +11,9 @@
 #include "modules/robot/Stepper.h"
 #include "Laser.h"
 #include "libs/nuts_bolts.h"
+#include "Config.h"
+#include "StreamOutputPool.h"
+#include "Block.h"
 
 Laser::Laser(){
 }
@@ -25,7 +28,7 @@ void Laser::on_module_loaded() {
     // 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
index 34d0925..8bc2fc3 100644 (file)
@@ -14,6 +14,9 @@
 #include "modules/robot/Conveyor.h"
 #include "PublicDataRequest.h"
 #include "SwitchPublicAccess.h"
+#include "SlowTicker.h"
+#include "Config.h"
+#include "Gcode.h"
 
 
 #include "MRI_Hooks.h"
index 5cab737..71842c9 100644 (file)
 
 #include "libs/Pin.h"
 #include <math.h>
+#include "Pwm.h"
+
+class Gcode;
+class StreamOutput;
 
 class Switch : public Module {
     public:
index ef05993..2db8670 100644 (file)
@@ -12,6 +12,8 @@ using namespace std;
 #include <vector>
 #include "SwitchPool.h"
 #include "Switch.h"
+#include "Config.h"
+#include "checksumm.h"
 
 #define    switch_checksum              CHECKSUM("switch")
 
index 6073d04..368f53e 100644 (file)
@@ -1,6 +1,8 @@
 #include "PID_Autotuner.h"
 #include "Kernel.h"
 #include <cmath>        // std::abs
+#include "SlowTicker.h"
+#include "Gcode.h"
 
 #define DEBUG_PRINTF s->printf
 
index c0d7b39..9d62740 100644 (file)
 #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"
 
index 9b3306b..1f7116d 100644 (file)
@@ -13,6 +13,8 @@ using namespace std;
 #include "TemperatureControlPool.h"
 #include "TemperatureControl.h"
 #include "PID_Autotuner.h"
+#include "Config.h"
+#include "checksumm.h"
 
 TemperatureControlPool::TemperatureControlPool(){}
 
index 67d4921..5da4182 100644 (file)
@@ -9,6 +9,21 @@
 
 #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();
index 19a1947..4fc1f1d 100644 (file)
@@ -9,20 +9,6 @@
 #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:
index 4eeded5..807afb2 100644 (file)
@@ -9,6 +9,9 @@
 
 #include "PauseButton.h"
 #include "modules/robot/Conveyor.h"
+#include "SlowTicker.h"
+#include "Config.h"
+#include "Pauser.h"
 
 PlayLed::PlayLed(){}
 
index 12dfdfd..fb26063 100644 (file)
@@ -12,7 +12,9 @@
 #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);
index a8283d2..a30fdb3 100644 (file)
@@ -4,6 +4,7 @@
 #include "libs/utils.h"
 
 #include "Gcode.h"
+#include "Config.h"
 
 // add new digipot chips here
 #include "mcp4451.h"
index 87a9469..94e7e67 100644 (file)
 #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"
@@ -134,8 +138,8 @@ void Panel::on_module_loaded()
 //    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 );
 
index 47a9ded..1c352c2 100644 (file)
@@ -11,6 +11,8 @@
 #include "libs/nuts_bolts.h"
 #include "libs/utils.h"
 #include "libs/SerialMessage.h"
+#include "Gcode.h"
+
 #include <string>
 #include <vector>
 
index 68e97ee..9a2e9ca 100644 (file)
@@ -9,6 +9,9 @@
 #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
index 18e1027..f35257b 100644 (file)
@@ -8,6 +8,8 @@ You should have received a copy of the GNU General Public License along with Smo
 #include "smoothiepanel/LCDBang.h"
 
 #include "smoothiepanel/Colors.h"
+#include "Config.h"
+#include "checksumm.h"
 
 // commands
 #define LCD_CLEARDISPLAY 0x01
index 8d46a00..5f30bf6 100644 (file)
@@ -7,6 +7,8 @@ You should have received a copy of the GNU General Public License along with Smo
 #include "VikiLCD.h"
 
 #include "Button.h"
+#include "Config.h"
+#include "checksumm.h"
 
 // config settings for Viki LCD
 #define panel_checksum             CHECKSUM("panel")
index aa90a6f..cfa59fe 100644 (file)
@@ -1,6 +1,7 @@
 #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
index 30444bb..facdffb 100644 (file)
 #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()
index ff7a401..68e6c8b 100644 (file)
@@ -6,6 +6,10 @@
 */
 #include "CustomScreen.h"
 #include "libs/Kernel.h"
+#include "Config.h"
+#include "checksumm.h"
+
+#include <string.h>
 
 #include <algorithm>
 
index 8d7c8bb..dec1822 100644 (file)
@@ -16,7 +16,8 @@
 #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;
index a22b66a..f21de56 100644 (file)
@@ -14,6 +14,8 @@
 #include "libs/utils.h"
 #include "PublicDataRequest.h"
 #include "modules/tools/temperaturecontrol/TemperatureControlPublicAccess.h"
+#include "PublicData.h"
+#include "checksumm.h"
 
 #include <string>
 using namespace std;
index 836b201..cc55dc4 100644 (file)
 #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,
index 0121827..ffed26e 100644 (file)
@@ -2,6 +2,10 @@
 #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;
 
index 1db7122..37187e3 100644 (file)
 #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"
index afc7ca0..fdc57b5 100644 (file)
 #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>