mirror of
https://github.com/bdring/Grbl_Esp32.git
synced 2025-08-26 15:54:29 +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
|
||||
#define config_h
|
||||
#include "grbl.h" // For Arduino IDE compatibility.
|
||||
#include <arduino.h>
|
||||
|
||||
//#define ESP_DEBUG
|
||||
#define N_AXIS 3 // Number of axes defined
|
||||
|
||||
// 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
|
||||
|
@@ -1158,6 +1158,10 @@
|
||||
*/
|
||||
|
||||
// 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
|
||||
#define USE_RMT_STEPS
|
||||
|
@@ -24,6 +24,8 @@
|
||||
#include <WebServer.h>
|
||||
#endif
|
||||
|
||||
#include "report.h"
|
||||
|
||||
#if defined (ENABLE_HTTP) && defined(ENABLE_WIFI)
|
||||
ESPResponseStream::ESPResponseStream(WebServer * webserver){
|
||||
_header_sent=false;
|
||||
|
@@ -21,6 +21,8 @@
|
||||
#ifndef nuts_bolts_h
|
||||
#define nuts_bolts_h
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#define false 0
|
||||
#define true 1
|
||||
|
||||
@@ -29,7 +31,6 @@
|
||||
// Axis array index values. Must start with 0 and be continuous.
|
||||
// Note: You set the number of axes used by changing N_AXIS.
|
||||
// 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 Y_AXIS 1
|
||||
#define Z_AXIS 2
|
||||
|
@@ -24,9 +24,7 @@
|
||||
|
||||
#ifndef planner_h
|
||||
#define planner_h
|
||||
|
||||
|
||||
|
||||
|
||||
// The number of linear motions that can be in the plan at any give time
|
||||
#ifndef BLOCK_BUFFER_SIZE
|
||||
#ifdef USE_LINE_NUMBERS
|
||||
|
@@ -143,10 +143,11 @@ void servosSyncTask(void *pvParameters)
|
||||
|
||||
ServoAxis::ServoAxis(uint8_t axis, uint8_t pin_num, uint8_t channel_num) // constructor
|
||||
{
|
||||
_axis = axis;
|
||||
_axis = axis;
|
||||
_pin_num = pin_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()
|
||||
|
@@ -437,6 +437,8 @@ void stepper_init()
|
||||
Trinamic_Init();
|
||||
#endif
|
||||
|
||||
grbl_sendf(CLIENT_SERIAL, "[MSG:Axis count %d]\r\n", N_AXIS);
|
||||
|
||||
#ifdef USE_RMT_STEPS
|
||||
grbl_send(CLIENT_SERIAL, "[MSG:Using RMT Steps]\r\n");
|
||||
initRMT();
|
||||
|
Reference in New Issue
Block a user