Skip to content

Commit c0c5397

Browse files
authored
Merge pull request #795 from bdring/Devt
Devt
2 parents 572fb37 + b966881 commit c0c5397

File tree

12 files changed

+269
-11
lines changed

12 files changed

+269
-11
lines changed

FluidNC/data/index.html.gz

366 Bytes
Binary file not shown.

FluidNC/src/GCode.cpp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ Error gc_execute_line(char* line) {
480480
break;
481481
case 'M':
482482
// Determine 'M' command and its modal group
483-
if (mantissa > 0) {
483+
if (mantissa > 0 && !(int_value == 7 || int_value == 8)) {
484484
FAIL(Error::GcodeCommandValueNotInteger); // [No Mxx.x commands]
485485
}
486486
switch (int_value) {
@@ -533,11 +533,17 @@ Error gc_execute_line(char* line) {
533533
case 9:
534534
switch (int_value) {
535535
case 7:
536+
if (mantissa && mantissa != 10) {
537+
FAIL(Error::GcodeUnsupportedCommand); // M7 and M7.1 are supported
538+
}
536539
if (config->_coolant->hasMist()) {
537540
gc_block.coolant = GCodeCoolant::M7;
538541
}
539542
break;
540543
case 8:
544+
if (mantissa && mantissa != 10) {
545+
FAIL(Error::GcodeUnsupportedCommand); // M8 and M8.1 are supported
546+
}
541547
if (config->_coolant->hasFlood()) {
542548
gc_block.coolant = GCodeCoolant::M8;
543549
}
@@ -1449,10 +1455,10 @@ Error gc_execute_line(char* line) {
14491455
case GCodeCoolant::None:
14501456
break;
14511457
case GCodeCoolant::M7:
1452-
gc_state.modal.coolant.Mist = 1;
1458+
gc_state.modal.coolant.Mist = mantissa == 10 ? 0 : 1;
14531459
break;
14541460
case GCodeCoolant::M8:
1455-
gc_state.modal.coolant.Flood = 1;
1461+
gc_state.modal.coolant.Flood = mantissa == 10 ? 0 : 1;
14561462
break;
14571463
case GCodeCoolant::M9:
14581464
gc_state.modal.coolant = {};

FluidNC/src/Kinematics/WallPlotter.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ namespace Kinematics {
4242
}
4343
}
4444

45+
bool WallPlotter::canHome(AxisMask axisMask) {
46+
log_error("This kinematic system cannot home");
47+
return false;
48+
}
49+
4550
void WallPlotter::transform_cartesian_to_motors(float* cartesian, float* motors) {
4651
log_error("WallPlotter::transform_cartesian_to_motors is broken");
4752
}

FluidNC/src/Kinematics/WallPlotter.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ namespace Kinematics {
2424
// Kinematic Interface
2525

2626
void init() override;
27+
bool canHome(AxisMask axisMask) override;
2728
void init_position() override;
2829
bool cartesian_to_motors(float* target, plan_line_data_t* pl_data, float* position) override;
2930
void motors_to_cartesian(float* cartesian, float* motors, int n_axis) override;

FluidNC/src/Machine/Axis.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ namespace Machine {
3232
_homing = new Homing();
3333
_homing->_cycle = 0;
3434
}
35+
if (_motors[0] == nullptr) {
36+
_motors[0] = new Machine::Motor(_axis, 0);
37+
}
3538
}
3639

3740
void Axis::init() {

FluidNC/src/Machine/Homing.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,8 +420,7 @@ namespace Machine {
420420
// cycle. The protocol loop will then respond to events and advance
421421
// the homing state machine through its phases.
422422
void Homing::run_cycles(AxisMask axisMask) {
423-
if (!config->_kinematics->canHome(axisMask)) {
424-
log_error("This kinematic system cannot do homing");
423+
if (!config->_kinematics->canHome(axisMask)) {
425424
sys.state = State::Alarm;
426425
return;
427426
}

FluidNC/src/Machine/SPIBus.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ namespace Machine {
2929
misoPin = _miso.getNative(Pin::Capabilities::Input | Pin::Capabilities::Native);
3030
} else {
3131
if (sd_fallback_cs->get() == -1) {
32-
log_info("SPI not defined");
32+
log_debug("SPI not defined");
3333
return;
3434
}
3535
log_info("Using default SPI pins");
@@ -42,7 +42,9 @@ namespace Machine {
4242
_defined = true;
4343
}
4444

45-
void SPIBus::deinit() { spi_deinit_bus(); }
45+
void SPIBus::deinit() {
46+
spi_deinit_bus();
47+
}
4648

4749
void SPIBus::group(Configuration::HandlerBase& handler) {
4850
handler.item("miso_pin", _miso);
@@ -63,5 +65,7 @@ namespace Machine {
6365
// }
6466
}
6567

66-
bool SPIBus::defined() { return _defined; }
68+
bool SPIBus::defined() {
69+
return _defined;
70+
}
6771
}

FluidNC/src/Report.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ void report_gcode_modes(Channel& channel) {
365365
msg << " M56";
366366
}
367367

368-
msg << " T" + gc_state.tool;
368+
msg << " T" << gc_state.tool;
369369
int digits = config->_reportInches ? 1 : 0;
370370
msg << " F" << std::fixed << std::setprecision(digits) << gc_state.feed_rate;
371371
msg << " S" << uint32_t(gc_state.spindle_speed);

FluidNC/src/SDCard.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ void SDCard::init() {
3232
csPin = static_cast<pinnum_t>(csFallback);
3333
log_info("Using fallback CS pin " << int(csPin));
3434
} else {
35-
log_info("No SD Card CS Pin");
36-
log_info("See http://wiki.fluidnc.com/en/config/sd_card#sdfallbackcs-access-sd-without-a-config-file");
35+
log_debug("See http://wiki.fluidnc.com/en/config/sd_card#sdfallbackcs-access-sd-without-a-config-file");
3736
return;
3837
}
3938

FluidNC/src/SettingsDefinitions.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ void make_settings() {
4848
make_coordinate(CoordIndex::G59, "G59");
4949
make_coordinate(CoordIndex::G28, "G28");
5050
make_coordinate(CoordIndex::G30, "G30");
51+
make_coordinate(CoordIndex::G92, "G92");
52+
make_coordinate(CoordIndex::TLO, "TLO");
5153

5254
message_level = new EnumSetting("Which Messages", EXTENDED, WG, NULL, "Message/Level", MsgLevelInfo, &messageLevels, NULL);
5355

0 commit comments

Comments
 (0)