mirror of
https://github.com/bdring/Grbl_Esp32.git
synced 2025-08-27 08:14:31 +02:00
Moved N_AXIS to config.h
- less files to touch for machine definition
This commit is contained in:
@@ -37,9 +37,10 @@ Some features should not be changed. See notes below.
|
|||||||
|
|
||||||
#ifndef config_h
|
#ifndef config_h
|
||||||
#define config_h
|
#define config_h
|
||||||
#include "grbl.h" // For Arduino IDE compatibility.
|
#include <arduino.h>
|
||||||
|
|
||||||
//#define ESP_DEBUG
|
//#define ESP_DEBUG
|
||||||
|
#define N_AXIS 3 // Number of axes defined
|
||||||
|
|
||||||
// Define CPU pin map and default settings.
|
// Define CPU pin map and default settings.
|
||||||
// NOTE: OEMs can avoid the need to maintain/update the defaults.h and cpu_map.h files and use only
|
// NOTE: OEMs can avoid the need to maintain/update the defaults.h and cpu_map.h files and use only
|
||||||
|
@@ -1158,6 +1158,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Be sure to change to N_AXIS 6 in nuts_bolts.h
|
// Be sure to change to N_AXIS 6 in nuts_bolts.h
|
||||||
|
#ifdef N_AXIS
|
||||||
|
#undef N_AXIS
|
||||||
|
#endif
|
||||||
|
#define N_AXIS 6
|
||||||
|
|
||||||
// stepper motors
|
// stepper motors
|
||||||
#define USE_RMT_STEPS
|
#define USE_RMT_STEPS
|
||||||
|
@@ -24,6 +24,8 @@
|
|||||||
#include <WebServer.h>
|
#include <WebServer.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "report.h"
|
||||||
|
|
||||||
#if defined (ENABLE_HTTP) && defined(ENABLE_WIFI)
|
#if defined (ENABLE_HTTP) && defined(ENABLE_WIFI)
|
||||||
ESPResponseStream::ESPResponseStream(WebServer * webserver){
|
ESPResponseStream::ESPResponseStream(WebServer * webserver){
|
||||||
_header_sent=false;
|
_header_sent=false;
|
||||||
|
@@ -21,6 +21,8 @@
|
|||||||
#ifndef nuts_bolts_h
|
#ifndef nuts_bolts_h
|
||||||
#define nuts_bolts_h
|
#define nuts_bolts_h
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
#define false 0
|
#define false 0
|
||||||
#define true 1
|
#define true 1
|
||||||
|
|
||||||
@@ -29,7 +31,6 @@
|
|||||||
// Axis array index values. Must start with 0 and be continuous.
|
// Axis array index values. Must start with 0 and be continuous.
|
||||||
// Note: You set the number of axes used by changing N_AXIS.
|
// Note: You set the number of axes used by changing N_AXIS.
|
||||||
// Be sure to define pins or servos in cpu_map.h
|
// Be sure to define pins or servos in cpu_map.h
|
||||||
#define N_AXIS 3 // Number of axes defined
|
|
||||||
#define X_AXIS 0 // Axis indexing value.
|
#define X_AXIS 0 // Axis indexing value.
|
||||||
#define Y_AXIS 1
|
#define Y_AXIS 1
|
||||||
#define Z_AXIS 2
|
#define Z_AXIS 2
|
||||||
|
@@ -25,8 +25,6 @@
|
|||||||
#ifndef planner_h
|
#ifndef planner_h
|
||||||
#define planner_h
|
#define planner_h
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// The number of linear motions that can be in the plan at any give time
|
// The number of linear motions that can be in the plan at any give time
|
||||||
#ifndef BLOCK_BUFFER_SIZE
|
#ifndef BLOCK_BUFFER_SIZE
|
||||||
#ifdef USE_LINE_NUMBERS
|
#ifdef USE_LINE_NUMBERS
|
||||||
|
@@ -146,7 +146,8 @@ ServoAxis::ServoAxis(uint8_t axis, uint8_t pin_num, uint8_t channel_num) // cons
|
|||||||
_axis = axis;
|
_axis = axis;
|
||||||
_pin_num = pin_num;
|
_pin_num = pin_num;
|
||||||
_channel_num = channel_num;
|
_channel_num = channel_num;
|
||||||
_showError = true; // this will be used to show error only once
|
_showError = true; // this will be used to show calibration error only once
|
||||||
|
_use_mpos = true; // default is to use the machine position rather than work position
|
||||||
}
|
}
|
||||||
|
|
||||||
void ServoAxis::init()
|
void ServoAxis::init()
|
||||||
|
@@ -437,6 +437,8 @@ void stepper_init()
|
|||||||
Trinamic_Init();
|
Trinamic_Init();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
grbl_sendf(CLIENT_SERIAL, "[MSG:Axis count %d]\r\n", N_AXIS);
|
||||||
|
|
||||||
#ifdef USE_RMT_STEPS
|
#ifdef USE_RMT_STEPS
|
||||||
grbl_send(CLIENT_SERIAL, "[MSG:Using RMT Steps]\r\n");
|
grbl_send(CLIENT_SERIAL, "[MSG:Using RMT Steps]\r\n");
|
||||||
initRMT();
|
initRMT();
|
||||||
|
Reference in New Issue
Block a user