diff --git a/gcode.c b/gcode.c index 601eef207..2b4ad3cef 100644 --- a/gcode.c +++ b/gcode.c @@ -43,8 +43,8 @@ #define NEXT_ACTION_AIRGAS_DISABLE 6 #define NEXT_ACTION_AIR_ENABLE 7 #define NEXT_ACTION_GAS_ENABLE 8 -#define NEXT_ACTION_LASER_ON 9 -#define NEXT_ACTION_LASER_OFF 10 +#define NEXT_ACTION_LASER_ENABLE 9 +#define NEXT_ACTION_LASER_DISABLE 10 #define STATUS_OK 0 #define STATUS_BAD_NUMBER_FORMAT 1 @@ -235,8 +235,8 @@ uint8_t gcode_execute_line(char *line) { case 7: next_action = NEXT_ACTION_AIR_ENABLE;break; case 8: next_action = NEXT_ACTION_GAS_ENABLE;break; case 9: next_action = NEXT_ACTION_AIRGAS_DISABLE;break; - case 140: next_action = NEXT_ACTION_LASER_ON;break; - case 141: next_action = NEXT_ACTION_LASER_OFF;break; + case 140: next_action = NEXT_ACTION_LASER_ENABLE;break; + case 141: next_action = NEXT_ACTION_LASER_DISABLE;break; default: FAIL(STATUS_UNSUPPORTED_STATEMENT); } break; @@ -367,11 +367,11 @@ uint8_t gcode_execute_line(char *line) { case NEXT_ACTION_GAS_ENABLE: planner_control_gas_enable(); break; - case NEXT_ACTION_LASER_ON: - planner_control_laser_on(); + case NEXT_ACTION_LASER_ENABLE: + planner_control_laser_enable(); break; - case NEXT_ACTION_LASER_OFF: - planner_control_laser_off(); + case NEXT_ACTION_LASER_DISABLE: + planner_control_laser_disable(); break; } diff --git a/planner.h b/planner.h index c8ea73d5d..fdf2f40be 100644 --- a/planner.h +++ b/planner.h @@ -29,14 +29,14 @@ #define TYPE_AIRGAS_DISABLE 1 #define TYPE_AIR_ENABLE 2 #define TYPE_GAS_ENABLE 3 -#define TYPE_LASER_ON 4 -#define TYPE_LASER_OFF 5 +#define TYPE_LASER_ENABLE 4 +#define TYPE_LASER_DISABLE 5 #define planner_control_airgas_disable() planner_command(TYPE_AIRGAS_DISABLE) #define planner_control_air_enable() planner_command(TYPE_AIR_ENABLE) #define planner_control_gas_enable() planner_command(TYPE_GAS_ENABLE) -#define planner_control_laser_on() planner_command(TYPE_LASER_ON) -#define planner_control_laser_off() planner_command(TYPE_LASER_OFF) +#define planner_control_laser_enable() planner_command(TYPE_LASER_ENABLE) +#define planner_control_laser_disable() planner_command(TYPE_LASER_DISABLE) // This struct is used when buffering the setup for each linear movement "nominal" values are as specified in diff --git a/sense_control.c b/sense_control.c index 50671eb02..cec09c5ca 100644 --- a/sense_control.c +++ b/sense_control.c @@ -49,9 +49,9 @@ void control_init() { TCCR0A |= (1 << WGM00); // set phase correct PWM mode, has half the freq of fast PWM TCCR0B |= (1 << CS00); // prescaler to 1, PWMfreq = 16000/(2*256*1) = 31.25kH - //// laser on/off pin + //// laser enable/disable pin LASER_DDR |= (1 << LASER_ENABLE_BIT); // set as output pin - control_laser(false); + control_laser_enable(false); //// air and gas assist control AIRGAS_DDR |= (1 << AIR_BIT); // set as output pin @@ -65,7 +65,7 @@ void control_init() { } -void control_laser(bool enable) { +void control_laser_enable(bool enable) { if (enable) { LASER_PORT &= ~(1 << LASER_ENABLE_BIT); } else { diff --git a/sense_control.h b/sense_control.h index 1ee61e564..8d5ceaefc 100644 --- a/sense_control.h +++ b/sense_control.h @@ -35,7 +35,7 @@ void sense_init(); void control_init(); -void control_laser(bool enable); +void control_laser_enable(bool enable); void control_laser_intensity(uint8_t intensity); //0-255 is 0-100% void control_air(bool enable); diff --git a/stepper.c b/stepper.c index f3f10bede..4a43ecfb3 100644 --- a/stepper.c +++ b/stepper.c @@ -367,14 +367,14 @@ ISR(TIMER1_COMPA_vect) { planner_discard_current_block(); break; - case TYPE_LASER_ON: - control_laser(true); + case TYPE_LASER_ENABLE: + control_laser_enable(true); current_block = NULL; planner_discard_current_block(); break; - case TYPE_LASER_OFF: - control_laser(false); + case TYPE_LASER_DISABLE: + control_laser_enable(false); current_block = NULL; planner_discard_current_block(); break;