Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
report.h
00001 /* 00002 report.h - reporting and messaging methods 00003 Part of Grbl 00004 00005 Copyright (c) 2012-2016 Sungeun K. Jeon for Gnea Research LLC 00006 00007 Grbl is free software: you can redistribute it and/or modify 00008 it under the terms of the GNU General Public License as published by 00009 the Free Software Foundation, either version 3 of the License, or 00010 (at your option) any later version. 00011 00012 Grbl is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 GNU General Public License for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with Grbl. If not, see <http://www.gnu.org/licenses/>. 00019 */ 00020 #ifndef report_h 00021 #define report_h 00022 00023 // Define Grbl status codes. Valid values (0-255) 00024 #define STATUS_OK 0 00025 #define STATUS_EXPECTED_COMMAND_LETTER 1 00026 #define STATUS_BAD_NUMBER_FORMAT 2 00027 #define STATUS_INVALID_STATEMENT 3 00028 #define STATUS_NEGATIVE_VALUE 4 00029 #define STATUS_SETTING_DISABLED 5 00030 #define STATUS_SETTING_STEP_PULSE_MIN 6 00031 #define STATUS_SETTING_READ_FAIL 7 00032 #define STATUS_IDLE_ERROR 8 00033 #define STATUS_SYSTEM_GC_LOCK 9 00034 #define STATUS_SOFT_LIMIT_ERROR 10 00035 #define STATUS_OVERFLOW 11 00036 #define STATUS_MAX_STEP_RATE_EXCEEDED 12 00037 #define STATUS_CHECK_DOOR 13 00038 #define STATUS_LINE_LENGTH_EXCEEDED 14 00039 #define STATUS_TRAVEL_EXCEEDED 15 00040 #define STATUS_INVALID_JOG_COMMAND 16 00041 #define STATUS_SETTING_DISABLED_LASER 17 00042 00043 #define STATUS_GCODE_UNSUPPORTED_COMMAND 20 00044 #define STATUS_GCODE_MODAL_GROUP_VIOLATION 21 00045 #define STATUS_GCODE_UNDEFINED_FEED_RATE 22 00046 #define STATUS_GCODE_COMMAND_VALUE_NOT_INTEGER 23 00047 #define STATUS_GCODE_AXIS_COMMAND_CONFLICT 24 00048 #define STATUS_GCODE_WORD_REPEATED 25 00049 #define STATUS_GCODE_NO_AXIS_WORDS 26 00050 #define STATUS_GCODE_INVALID_LINE_NUMBER 27 00051 #define STATUS_GCODE_VALUE_WORD_MISSING 28 00052 #define STATUS_GCODE_UNSUPPORTED_COORD_SYS 29 00053 #define STATUS_GCODE_G53_INVALID_MOTION_MODE 30 00054 #define STATUS_GCODE_AXIS_WORDS_EXIST 31 00055 #define STATUS_GCODE_NO_AXIS_WORDS_IN_PLANE 32 00056 #define STATUS_GCODE_INVALID_TARGET 33 00057 #define STATUS_GCODE_ARC_RADIUS_ERROR 34 00058 #define STATUS_GCODE_NO_OFFSETS_IN_PLANE 35 00059 #define STATUS_GCODE_UNUSED_WORDS 36 00060 #define STATUS_GCODE_G43_DYNAMIC_AXIS_ERROR 37 00061 #define STATUS_GCODE_MAX_VALUE_EXCEEDED 38 00062 00063 // Define Grbl alarm codes. Valid values (1-255). 0 is reserved. 00064 #define ALARM_HARD_LIMIT_ERROR EXEC_ALARM_HARD_LIMIT 00065 #define ALARM_SOFT_LIMIT_ERROR EXEC_ALARM_SOFT_LIMIT 00066 #define ALARM_ABORT_CYCLE EXEC_ALARM_ABORT_CYCLE 00067 #define ALARM_PROBE_FAIL_INITIAL EXEC_ALARM_PROBE_FAIL_INITIAL 00068 #define ALARM_PROBE_FAIL_CONTACT EXEC_ALARM_PROBE_FAIL_CONTACT 00069 #define ALARM_HOMING_FAIL_RESET EXEC_ALARM_HOMING_FAIL_RESET 00070 #define ALARM_HOMING_FAIL_DOOR EXEC_ALARM_HOMING_FAIL_DOOR 00071 #define ALARM_HOMING_FAIL_PULLOFF EXEC_ALARM_HOMING_FAIL_PULLOFF 00072 #define ALARM_HOMING_FAIL_APPROACH EXEC_ALARM_HOMING_FAIL_APPROACH 00073 00074 // Define Grbl feedback message codes. Valid values (0-255). 00075 #define MESSAGE_CRITICAL_EVENT 1 00076 #define MESSAGE_ALARM_LOCK 2 00077 #define MESSAGE_ALARM_UNLOCK 3 00078 #define MESSAGE_ENABLED 4 00079 #define MESSAGE_DISABLED 5 00080 #define MESSAGE_SAFETY_DOOR_AJAR 6 00081 #define MESSAGE_CHECK_LIMITS 7 00082 #define MESSAGE_PROGRAM_END 8 00083 #define MESSAGE_RESTORE_DEFAULTS 9 00084 #define MESSAGE_SPINDLE_RESTORE 10 00085 #define MESSAGE_SLEEP_MODE 11 00086 00087 // Prints system status messages. 00088 void report_status_message(uint8_t status_code); 00089 00090 // Prints system alarm messages. 00091 void report_alarm_message(uint8_t alarm_code); 00092 00093 // Prints miscellaneous feedback messages. 00094 void report_feedback_message(uint8_t message_code); 00095 00096 // Prints welcome message 00097 void report_init_message(); 00098 00099 // Prints Grbl help and current global settings 00100 void report_grbl_help(); 00101 00102 // Prints Grbl global settings 00103 void report_grbl_settings(); 00104 00105 // Prints an echo of the pre-parsed line received right before execution. 00106 void report_echo_line_received(char *line); 00107 00108 // Prints realtime status report 00109 void report_realtime_status(); 00110 00111 // Prints recorded probe position 00112 void report_probe_parameters(); 00113 00114 // Prints Grbl NGC parameters (coordinate offsets, probe) 00115 void report_ngc_parameters(); 00116 00117 // Prints current g-code parser mode state 00118 void report_gcode_modes(); 00119 00120 // Prints startup line when requested and executed. 00121 void report_startup_line(uint8_t n, char *line); 00122 void report_execute_startup_message(char *line, uint8_t status_code); 00123 00124 // Prints build info and user info 00125 void report_build_info(char *line); 00126 00127 #ifdef DEBUG 00128 void report_realtime_debug(); 00129 #endif 00130 00131 #endif
Generated on Tue Jul 12 2022 20:45:31 by
 1.7.2
 1.7.2