removing a get_value from switch
authorArthur Wolf <wolf.arthur@gmail.com>
Thu, 24 Jan 2013 14:01:43 +0000 (15:01 +0100)
committerArthur Wolf <wolf.arthur@gmail.com>
Thu, 24 Jan 2013 14:01:43 +0000 (15:01 +0100)
src/modules/robot/Planner.cpp
src/modules/tools/switch/Switch.cpp

index b905acc..5327d92 100644 (file)
@@ -46,6 +46,10 @@ void Planner::append_block( int target[], double feed_rate, double distance, dou
     Block* block = this->kernel->player->new_block();
     block->planner = this;
 
+    //Block* test = new Block();
+    //this->kernel->streams->printf("%p queue:%u\r\n", test, this->kernel->player->queue.size());
+    //delete test;
+    //
     // Direction bits
     block->direction_bits = 0;
     for( int stepper=ALPHA_STEPPER; stepper<=GAMMA_STEPPER; stepper++){
index 2b5f37a..a6f805e 100644 (file)
@@ -39,8 +39,8 @@ void Switch::on_config_reload(void* argument){
 // Turn pin on and off
 void Switch::on_gcode_execute(void* argument){
     Gcode* gcode = static_cast<Gcode*>(argument);
-    if( gcode->has_letter('M' )){
-        int code = gcode->get_value('M');
+    if( gcode->has_m){
+        int code = gcode->m;
         if( code == this->on_m_code ){
             if (gcode->has_letter('S'))
             {