Skip to content

Commit

Permalink
Code clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
Schildkroet committed Apr 15, 2020
1 parent f097d18 commit 5800f99
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Src/Print.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
#define MAX_BUFFER_SIZE 128


char buf[512] = {0};
uint16_t buf_idx = 0;
static char buf[512] = {0};
static uint16_t buf_idx = 0;


void Print_Init(void)
Expand Down
3 changes: 3 additions & 0 deletions Src/Print.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
#define PRINT_H_INCLUDED


#include <stdint.h>


#ifdef __cplusplus
extern "C" {
#endif
Expand Down
2 changes: 1 addition & 1 deletion grbl/GCode.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@

// Declare gc extern struct
Parser_State_t gc_state;
Parser_Block_t gc_block;
static Parser_Block_t gc_block;


void GC_Init(void)
Expand Down
4 changes: 2 additions & 2 deletions grbl/Protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@

static char line[LINE_BUFFER_SIZE]; // Line to be executed. Zero-terminated.
static void Protocol_ExecRtSuspend(void);

extern void ProcessReceive(char c);

/*
GRBL PRIMARY LOOP:
Expand Down Expand Up @@ -586,7 +586,7 @@ void Protocol_ExecRtSystem(void)
Spindle_SetState(gc_state.modal.spindle, gc_state.spindle_speed);
}
else {
BIT_TRUE(sys.step_control, STEP_CONTROL_UPDATE_SPINDLE_PWM);
BIT_TRUE(sys.step_control, STEP_CONTROL_UPDATE_SPINDLE_PWM);
}
sys.report_ovr_counter = 0; // Set to report change immediately
}
Expand Down
8 changes: 4 additions & 4 deletions grbl/defaults.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@
#define DEFAULT_X_MAX_RATE 1000.0 // mm/min
#define DEFAULT_Y_MAX_RATE 1000.0 // mm/min
#define DEFAULT_Z_MAX_RATE 1000.0 // mm/min
#define DEFAULT_A_MAX_RATE 1000.0 // °/min
#define DEFAULT_B_MAX_RATE 1000.0 // °/min
#define DEFAULT_A_MAX_RATE 10000.0 // °/min
#define DEFAULT_B_MAX_RATE 10000.0 // °/min
#define DEFAULT_X_ACCELERATION (30.0*60*60) // 30*60*60 mm/min^2 = 30 mm/sec^2
#define DEFAULT_Y_ACCELERATION (30.0*60*60) // 30*60*60 mm/min^2 = 30 mm/sec^2
#define DEFAULT_Z_ACCELERATION (30.0*60*60) // 30*60*60 mm/min^2 = 30 mm/sec^2
#define DEFAULT_A_ACCELERATION (50.0*60*60) // 100*60*60 mm/min^2 = 100 mm/sec^2
#define DEFAULT_B_ACCELERATION (50.0*60*60) // 100*60*60 mm/min^2 = 100 mm/sec^2
#define DEFAULT_A_ACCELERATION (100.0*60*60) // 100*60*60 mm/min^2 = 100 mm/sec^2
#define DEFAULT_B_ACCELERATION (100.0*60*60) // 100*60*60 mm/min^2 = 100 mm/sec^2
#define DEFAULT_X_MAX_TRAVEL 400.0 // mm NOTE: Must be a positive value.
#define DEFAULT_Y_MAX_TRAVEL 300.0 // mm NOTE: Must be a positive value.
#define DEFAULT_Z_MAX_TRAVEL 500.0 // mm NOTE: Must be a positive value.
Expand Down

0 comments on commit 5800f99

Please sign in to comment.