moved config commands into Configurator module
authorLogxen <logxen@hotmail.com>
Tue, 19 Jun 2012 16:29:11 +0000 (09:29 -0700)
committerLogxen <logxen@hotmail.com>
Tue, 19 Jun 2012 16:29:11 +0000 (09:29 -0700)
src/libs/Config.cpp
src/libs/Config.h
src/modules/utils/configurator/Configurator.cpp
src/modules/utils/configurator/Configurator.h

index 2bf82ae..eea8c92 100644 (file)
@@ -34,9 +34,6 @@ Config::Config(){
 void Config::on_module_loaded(){}
 
 void Config::on_console_line_received( void* argument ){}
-void Config::config_get_command( string parameter ){}
-void Config::config_set_command( string parameters ){}
-void Config::config_load_command( string parameters ){}
 void Config::set_string( string setting, string value ){}
 void Config::get_module_list(vector<uint16_t>* list, uint16_t family){ }
 
index 5ab63fd..9193424 100644 (file)
@@ -28,9 +28,6 @@ class Config : public Module {
 
         void on_module_loaded();
         void on_console_line_received( void* argument );
-        void config_get_command( string parameters ); 
-        void config_set_command( string parameters ); 
-        void config_load_command(string parameters );
         void config_cache_load();
         void config_cache_clear();
         void set_string( string setting , string value);
index 259d894..a14a6d5 100644 (file)
@@ -30,7 +30,9 @@ void Configurator::on_console_line_received( void* argument ){
 
     // Act depending on command
     switch( check_sum ){
-//        case ls_command_checksum      : this->ls_command(  get_arguments(possible_command), new_message.stream ); break;
+        case config_get_command_checksum: this->config_get_command(  get_arguments(possible_command), new_message.stream ); break;
+        case config_set_command_checksum: this->config_set_command(  get_arguments(possible_command), new_message.stream ); break;
+        case config_load_command_checksum: this->config_load_command(  get_arguments(possible_command), new_message.stream ); break;
     }
 }
 
@@ -51,6 +53,10 @@ void Configurator::on_gcode_execute(void* argument){
 void Configurator::on_main_loop(void* argument){
 }
 
+void Configurator::config_get_command( string parameters, StreamOutput* stream ){}
+void Configurator::config_set_command( string parameters, StreamOutput* stream ){}
+void Configurator::config_load_command( string parameters, StreamOutput* stream ){}
+
 // Write live settings to internal storage
 void Configurator::config_store( Gcode* gcode, StreamOutput* stream ){
 }
index 46b17a7..e0b2db8 100644 (file)
@@ -20,7 +20,9 @@
 #define CONF_SD         2
 #define CONF_EEPROM     3
 
-#define ls_command_checksum      19679
+#define config_get_command_checksum        46310    // "config-get"
+#define config_set_command_checksum        55538    // "config-set"
+#define config_load_command_checksum       3143     // "config-load"
 
 class Configurator : public Module {
     public:
@@ -31,6 +33,10 @@ class Configurator : public Module {
         void on_gcode_execute( void* argument );
         void on_main_loop( void* argument );
 
+        void config_get_command( string parameters, StreamOutput* stream ); 
+        void config_set_command( string parameters, StreamOutput* stream ); 
+        void config_load_command(string parameters, StreamOutput* stream );
+
         void config_store(    Gcode* gcode, StreamOutput* stream );
         void config_read(     Gcode* gcode, StreamOutput* stream );
         void config_defaults( Gcode* gcode, StreamOutput* stream );