From 0854d371bb07dbbba0e75bbff668e0aee0e027b2 Mon Sep 17 00:00:00 2001 From: Arthur Wolf Date: Tue, 16 Apr 2013 15:49:36 +0200 Subject: [PATCH] removing more debug pins --- src/libs/SlowTicker.cpp | 9 ++------- src/libs/StepperMotor.h | 4 ---- src/modules/robot/Stepper.cpp | 10 ---------- 3 files changed, 2 insertions(+), 21 deletions(-) diff --git a/src/libs/SlowTicker.cpp b/src/libs/SlowTicker.cpp index a26475fe..721a5a89 100644 --- a/src/libs/SlowTicker.cpp +++ b/src/libs/SlowTicker.cpp @@ -36,8 +36,7 @@ SlowTicker::SlowTicker(){ g4_pause = false; } -void SlowTicker::on_module_loaded() -{ +void SlowTicker::on_module_loaded(){ register_for_event(ON_IDLE); register_for_event(ON_GCODE_RECEIVED); register_for_event(ON_GCODE_EXECUTE); @@ -50,13 +49,9 @@ void SlowTicker::set_frequency( int frequency ){ LPC_TIM2->TCR = 1; // Reset } -void SlowTicker::tick() -{ +void SlowTicker::tick(){ _isr_context = true; - LPC_GPIO1->FIODIR |= 1<<20; - LPC_GPIO1->FIOSET = 1<<20; - for (uint32_t i=0; ihooks.size(); i++){ Hook* hook = this->hooks.at(i); hook->countdown -= this->interval; diff --git a/src/libs/StepperMotor.h b/src/libs/StepperMotor.h index 639ffd0c..bdaf2fbb 100644 --- a/src/libs/StepperMotor.h +++ b/src/libs/StepperMotor.h @@ -75,16 +75,12 @@ class StepperMotor { // Called a great many times per second, to step if we have to now inline void StepperMotor::tick(){ - LPC_GPIO1->FIOSET = 1<<23; - // increase the ( fixed point ) counter by one tick 11t this->fx_counter += (uint32_t)(1<<16); // if we are to step now 10t if( this->fx_counter >= this->fx_ticks_per_step ){ this->step(); } - LPC_GPIO1->FIOCLR = 1<<23; - } diff --git a/src/modules/robot/Stepper.cpp b/src/modules/robot/Stepper.cpp index e53c4ea7..246f77a2 100644 --- a/src/modules/robot/Stepper.cpp +++ b/src/modules/robot/Stepper.cpp @@ -178,15 +178,12 @@ uint32_t Stepper::stepper_motor_finished_move(uint32_t dummy){ // current_block stays untouched by outside handlers for the duration of this function call. uint32_t Stepper::trapezoid_generator_tick( uint32_t dummy ) { - LPC_GPIO1->FIOSET = 1<<31; - if(this->current_block && !this->paused && this->main_stepper->moving ) { uint32_t current_steps_completed = this->main_stepper->stepped; if( this->force_speed_update ){ this->force_speed_update = false; this->set_step_events_per_minute(this->trapezoid_adjusted_rate); - LPC_GPIO1->FIOCLR = 1<<31; return 0; } @@ -218,7 +215,6 @@ uint32_t Stepper::trapezoid_generator_tick( uint32_t dummy ) { } } - LPC_GPIO1->FIOCLR = 1<<31; return 0; } @@ -260,10 +256,6 @@ void Stepper::set_step_events_per_minute( double steps_per_minute ){ // All we do is reset the other timer so that it does what we want uint32_t Stepper::synchronize_acceleration(uint32_t dummy){ - LPC_GPIO1->FIODIR |= 1<<21; - LPC_GPIO1->FIOSET = 1<<21; - - // No move was done, this is called from on_block_begin // This means we setup the accel timer in a way where it gets called right after // we exit this step interrupt, and so that it is then in synch with @@ -289,8 +281,6 @@ uint32_t Stepper::synchronize_acceleration(uint32_t dummy){ LPC_TIM2->TC = LPC_TIM0->TC; } - LPC_GPIO1->FIOCLR = 1<<21; - return 0; } -- 2.20.1