mirror of
https://github.com/bdring/Grbl_Esp32.git
synced 2025-09-01 10:23:19 +02:00
Merge pull request #617 from bdring/NoHomingCycleAlarm
Tweak memory fix and add $H check for $Homing/Cycles
This commit is contained in:
@@ -40,6 +40,7 @@ std::map<Error, const char*> ErrorCodes = {
|
||||
{ Error::TravelExceeded, "Max travel exceeded during jog" },
|
||||
{ Error::InvalidJogCommand, "Invalid jog command" },
|
||||
{ Error::SettingDisabledLaser, "Laser mode requires PWM output" },
|
||||
{ Error::HomingNoCycles, "No Homing/Cycle defined in settings" },
|
||||
{ Error::GcodeUnsupportedCommand, "Unsupported GCode command" },
|
||||
{ Error::GcodeModalGroupViolation, "Gcode modal group violation" },
|
||||
{ Error::GcodeUndefinedFeedRate, "Gcode undefined feed rate" },
|
||||
|
@@ -43,6 +43,7 @@ enum class Error : uint8_t {
|
||||
TravelExceeded = 15,
|
||||
InvalidJogCommand = 16,
|
||||
SettingDisabledLaser = 17,
|
||||
HomingNoCycles = 18,
|
||||
GcodeUnsupportedCommand = 20,
|
||||
GcodeModalGroupViolation = 21,
|
||||
GcodeUndefinedFeedRate = 22,
|
||||
|
@@ -23,7 +23,7 @@
|
||||
// Grbl versioning system
|
||||
|
||||
const char* const GRBL_VERSION = "1.3a";
|
||||
const char* const GRBL_VERSION_BUILD = "20200927";
|
||||
const char* const GRBL_VERSION_BUILD = "20200928";
|
||||
|
||||
//#include <sdkconfig.h>
|
||||
#include <Arduino.h>
|
||||
|
@@ -264,6 +264,7 @@ static bool axis_is_squared(uint8_t axis_mask) {
|
||||
// NOTE: There should be no motions in the buffer and Grbl must be in an idle state before
|
||||
// executing the homing cycle. This prevents incorrect buffered plans after homing.
|
||||
void mc_homing_cycle(uint8_t cycle_mask) {
|
||||
bool no_cycles_defined = true;
|
||||
#ifdef USE_CUSTOM_HOMING
|
||||
if (user_defined_homing()) {
|
||||
return;
|
||||
@@ -316,6 +317,7 @@ void mc_homing_cycle(uint8_t cycle_mask) {
|
||||
for (int cycle = 0; cycle < MAX_N_AXIS; cycle++) {
|
||||
auto homing_mask = homing_cycle[cycle]->get();
|
||||
if (homing_mask) { // if there are some axes in this cycle
|
||||
no_cycles_defined = false;
|
||||
if (!axis_is_squared(homing_mask)) {
|
||||
limits_go_home(homing_mask); // Homing cycle 0
|
||||
} else {
|
||||
@@ -331,6 +333,10 @@ void mc_homing_cycle(uint8_t cycle_mask) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (no_cycles_defined) {
|
||||
report_status_message(Error::HomingNoCycles, CLIENT_ALL);
|
||||
}
|
||||
}
|
||||
protocol_execute_realtime(); // Check for reset and set system abort.
|
||||
if (sys.abort) {
|
||||
|
@@ -558,10 +558,8 @@ Error system_execute_line(char* line, WebUI::ESPResponseStream* out, WebUI::Auth
|
||||
}
|
||||
|
||||
Error system_execute_line(char* line, uint8_t client, WebUI::AuthenticationLevel auth_level) {
|
||||
auto resp = new WebUI::ESPResponseStream(client, true);
|
||||
auto ret = system_execute_line(line, resp, auth_level);
|
||||
delete resp;
|
||||
return ret;
|
||||
WebUI::ESPResponseStream stream(client, true);
|
||||
return system_execute_line(line, &stream, auth_level);
|
||||
}
|
||||
|
||||
void system_execute_startup(char* line) {
|
||||
|
Reference in New Issue
Block a user