1
0
mirror of https://github.com/bdring/Grbl_Esp32.git synced 2025-09-01 10:23:19 +02:00

Squashed a few more defines.

This commit is contained in:
Stefan de Bruijn
2021-06-23 08:49:28 +02:00
parent 56483804bd
commit 258e619564
5 changed files with 22 additions and 21 deletions

View File

@@ -47,7 +47,7 @@ Some features should not be changed. See notes below.
// that the machine file might choose to undefine.
// Note: HOMING_CYCLES are now settings
#define SUPPORT_TASK_CORE 1 // Reference: CONFIG_ARDUINO_RUNNING_CORE = 1
const int SUPPORT_TASK_CORE = 1; // Reference: CONFIG_ARDUINO_RUNNING_CORE = 1
// #define ENABLE_CONTROL_SW_DEBOUNCE // Default disabled. Uncomment to enable.
#define CONTROL_SW_DEBOUNCE_PERIOD 32 // in milliseconds default 32 microseconds

View File

@@ -30,7 +30,7 @@
const int HOMING_CYCLE_LINE_NUMBER = 0;
const int PARKING_MOTION_LINE_NUMBER = 0;
#define HOMING_CYCLE_ALL 0 // Must be zero.
const int HOMING_CYCLE_ALL = 0; // Must be zero.
// Execute linear motion in absolute millimeter coordinates. Feed rate given in millimeters/second
// unless invert_feed_rate is true. Then the feed_rate means that the motion should be completed in

View File

@@ -23,8 +23,6 @@
// #define false 0
// #define true 1
#define UNDEFINED_PIN ""
enum class DwellMode : uint8_t {
Dwell = 0, // (Default: Must be zero)
SysSuspend = 1, //G92.1 (Do not alter value)
@@ -38,9 +36,9 @@ const double SOME_LARGE_VALUE = 1.0E+38;
const int X_AXIS = 0; // Axis indexing value.
const int Y_AXIS = 1;
const int Z_AXIS = 2;
#define A_AXIS 3
#define B_AXIS 4
#define C_AXIS 5
const int A_AXIS = 3;
const int B_AXIS = 4;
const int C_AXIS = 5;
const int MAX_AXES = 6;
const int MAX_GANGED = 2;
@@ -48,12 +46,12 @@ const int MAX_GANGED = 2;
const int PRIMARY_MOTOR = 0;
const int GANGED_MOTOR = 1;
#define X2_AXIS (X_AXIS + MAX_AXES)
#define Y2_AXIS (Y_AXIS + MAX_AXES)
#define Z2_AXIS (Z_AXIS + MAX_AXES)
#define A2_AXIS (A_AXIS + MAX_AXES)
#define B2_AXIS (B_AXIS + MAX_AXES)
#define C2_AXIS (C_AXIS + MAX_AXES)
const int X2_AXIS = (X_AXIS + MAX_AXES);
const int Y2_AXIS = (Y_AXIS + MAX_AXES);
const int Z2_AXIS = (Z_AXIS + MAX_AXES);
const int A2_AXIS = (A_AXIS + MAX_AXES);
const int B2_AXIS = (B_AXIS + MAX_AXES);
const int C2_AXIS = (C_AXIS + MAX_AXES);
static inline int toMotor2(int axis) {
return axis + MAX_AXES;
}

View File

@@ -181,7 +181,7 @@ Error list_pins(const char* value, WebUI::AuthenticationLevel auth_level, WebUI:
Error list_changed_pins(const char* value, WebUI::AuthenticationLevel auth_level, WebUI::ESPResponseStream* out) {
for (Setting* s = Setting::List; s; s = s->next()) {
const char* value = s->getStringValue();
if (s->getType() == PIN && strcmp(value, UNDEFINED_PIN)) {
if (s->getType() == PIN && strcmp(value, "")) { // Not undefined pin
show_setting(s->getName(), value, NULL, out);
}
}

View File

@@ -22,13 +22,16 @@
#include "stdint.h"
#define CLIENT_SERIAL 0
#define CLIENT_BT 1
#define CLIENT_WEBUI 2
#define CLIENT_TELNET 3
#define CLIENT_INPUT 4
#define CLIENT_ALL 0xFF
#define CLIENT_COUNT 5 // total number of client types regardless if they are used
// TODO: Change to enum class, and instead of 'uint8_t client' everywhere, change to ClientType client.
enum ClientType : uint8_t {
CLIENT_SERIAL = 0,
CLIENT_BT = 1,
CLIENT_WEBUI = 2,
CLIENT_TELNET = 3,
CLIENT_INPUT = 4,
CLIENT_ALL = 0xFF,
CLIENT_COUNT = 5, // total number of client types regardless if they are used
};
// a task to read for incoming data from serial port
void clientCheckTask(void* pvParameters);