break;
case 'H':
- THEKERNEL->call_event(ON_HALT, (void *)1); // clears on_halt
+ if(THEKERNEL->is_halted()) THEKERNEL->call_event(ON_HALT, (void *)1); // clears on_halt
if(THEKERNEL->is_grbl_mode()) {
// issue G28.2 which is force homing cycle
Gcode gcode("G28.2", new_message.stream);
AHB1.debug(stream);
}
- stream->printf("Block size: %u bytes\n", sizeof(Block));
+ stream->printf("Block size: %u bytes, Tickinfo size: %u bytes\n", sizeof(Block), sizeof(Block::tickinfo_t) * Block::n_actuators);
}
static uint32_t getDeviceType()
const char *mcu = (dev & 0x00100000) ? "LPC1769" : "LPC1768";
stream->printf("Build version: %s, Build date: %s, MCU: %s, System Clock: %ldMHz\r\n", vers.get_build(), vers.get_build_date(), mcu, SystemCoreClock / 1000000);
#ifdef CNC
- stream->printf(" CNC Build\r\n");
+ stream->printf(" CNC Build ");
#endif
+ #ifdef DISABLEMSD
+ stream->printf(" NOMSD Build\r\n");
+ #endif
+ stream->printf("%d axis\n", MAX_ROBOT_ACTUATORS);
}
// Reset the system
}
} else if (what == "pos") {
- // convenience to call all the various M114 variants
- char buf[64];
- THEROBOT->print_position(0, buf, sizeof buf); stream->printf("last %s\n", buf);
- THEROBOT->print_position(1, buf, sizeof buf); stream->printf("realtime %s\n", buf);
- THEROBOT->print_position(2, buf, sizeof buf); stream->printf("%s\n", buf);
- THEROBOT->print_position(3, buf, sizeof buf); stream->printf("%s\n", buf);
- THEROBOT->print_position(4, buf, sizeof buf); stream->printf("%s\n", buf);
- THEROBOT->print_position(5, buf, sizeof buf); stream->printf("%s\n", buf);
+ // convenience to call all the various M114 variants, shows ABC axis where relevant
+ std::string buf;
+ THEROBOT->print_position(0, buf); stream->printf("last %s\n", buf.c_str()); buf.clear();
+ THEROBOT->print_position(1, buf); stream->printf("realtime %s\n", buf.c_str()); buf.clear();
+ THEROBOT->print_position(2, buf); stream->printf("%s\n", buf.c_str()); buf.clear();
+ THEROBOT->print_position(3, buf); stream->printf("%s\n", buf.c_str()); buf.clear();
+ THEROBOT->print_position(4, buf); stream->printf("%s\n", buf.c_str()); buf.clear();
+ THEROBOT->print_position(5, buf); stream->printf("%s\n", buf.c_str()); buf.clear();
} else if (what == "wcs") {
// print the wcs state
struct SerialMessage message{&StreamOutput::NullStream, cmd};
THEKERNEL->call_event(ON_CONSOLE_LINE_RECEIVED, &message );
if(THEKERNEL->is_halted()) break;
- THECONVEYOR->wait_for_idle();
toggle= !toggle;
}
stream->printf("done\n");
stream->printf("%s\n", cmd);
message.message= cmd;
THEKERNEL->call_event(ON_CONSOLE_LINE_RECEIVED, &message );
- THECONVEYOR->wait_for_idle();
}
// leave it where it started
THEKERNEL->call_event(ON_CONSOLE_LINE_RECEIVED, &message );
}
- THEROBOT->pop_state();
+ THEROBOT->pop_state();
stream->printf("done\n");
}else if (what == "square") {
THEKERNEL->call_event(ON_CONSOLE_LINE_RECEIVED, &message );
}
if(THEKERNEL->is_halted()) break;
- THECONVEYOR->wait_for_idle();
- }
+ }
stream->printf("done\n");
}else if (what == "raw") {
return;
}
- uint8_t a= toupper(axis[0]) - 'X';
+ char ax= toupper(axis[0]);
+ uint8_t a= ax >= 'X' ? ax - 'X' : ax - 'A' + 3;
int steps= strtol(stepstr.c_str(), NULL, 10);
bool dir= steps >= 0;
steps= std::abs(steps);
- if(a > Z_AXIS) {
- stream->printf("error: axis must be x y or z\n");
+ if(a > C_AXIS) {
+ stream->printf("error: axis must be x, y, z, a, b, c\n");
+ return;
+ }
+
+ if(a >= THEROBOT->get_number_registered_motors()) {
+ stream->printf("error: axis is out of range\n");
return;
}