2012-11-01 16:37:27 +01:00
|
|
|
/*
|
|
|
|
report.h - reporting and messaging methods
|
|
|
|
Part of Grbl
|
|
|
|
|
|
|
|
Copyright (c) 2012 Sungeun K. Jeon
|
|
|
|
|
|
|
|
Grbl is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
Grbl is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with Grbl. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
#ifndef report_h
|
|
|
|
#define report_h
|
|
|
|
|
|
|
|
|
|
|
|
// Define Grbl status codes.
|
|
|
|
#define STATUS_OK 0
|
|
|
|
#define STATUS_BAD_NUMBER_FORMAT 1
|
|
|
|
#define STATUS_EXPECTED_COMMAND_LETTER 2
|
|
|
|
#define STATUS_UNSUPPORTED_STATEMENT 3
|
|
|
|
#define STATUS_FLOATING_POINT_ERROR 4
|
|
|
|
#define STATUS_MODAL_GROUP_VIOLATION 5
|
|
|
|
#define STATUS_INVALID_STATEMENT 6
|
|
|
|
#define STATUS_HARD_LIMIT 7
|
|
|
|
#define STATUS_SETTING_DISABLED 8
|
|
|
|
#define STATUS_SETTING_VALUE_NEG 9
|
|
|
|
#define STATUS_SETTING_STEP_PULSE_MIN 10
|
|
|
|
#define STATUS_SETTING_READ_FAIL 11
|
New startup script setting. New dry run, check gcode switches. New system state variable. Lots of reorganizing.
(All v0.8 features installed. Still likely buggy, but now thourough
testing will need to start to squash them all. As soon as we're done,
this will be pushed to master and v0.9 development will be started.
Please report ANY issues to us so we can get this rolled out ASAP.)
- User startup script! A user can now save one (up to 5 as compile-time
option) block of g-code in EEPROM memory. This will be run everytime
Grbl resets. Mainly to be used as a way to set your preferences, like
G21, G54, etc.
- New dry run and check g-code switches. Dry run moves ALL motions at
rapids rate ignoring spindle, coolant, and dwell commands. For rapid
physical proofing of your code. The check g-code switch ignores all
motion and provides the user a way to check if there are any errors in
their program that Grbl may not like.
- Program restart! (sort of). Program restart is typically an advanced
feature that allows users to restart a program mid-stream. The check
g-code switch can perform this feature by enabling the switch at the
start of the program, and disabling it at the desired point with some
minimal changes.
- New system state variable. This state variable tracks all of the
different state processes that Grbl performs, i.e. cycle start, feed
hold, homing, etc. This is mainly for making managing of these task
easier and more clear.
- Position lost state variable. Only when homing is enabled, Grbl will
refuse to move until homing is completed and position is known. This is
mainly for safety. Otherwise, it will let users fend for themselves.
- Moved the default settings defines into config.h. The plan is to
eventually create a set of config.h's for particular as-built machines
to help users from doing it themselves.
- Moved around misc defines into .h files. And lots of other little
things.
2012-11-03 18:32:23 +01:00
|
|
|
#define STATUS_HOMING_ERROR 12
|
|
|
|
#define STATUS_ABORT_CYCLE 13
|
2012-11-04 16:44:54 +01:00
|
|
|
#define STATUS_PURGE_CYCLE 14
|
2012-11-01 16:37:27 +01:00
|
|
|
|
|
|
|
// Define Grbl feedback message codes. Less than zero to distinguish message from error.
|
|
|
|
#define MESSAGE_SYSTEM_ALARM -1
|
|
|
|
#define MESSAGE_POSITION_LOST -2
|
|
|
|
#define MESSAGE_HOMING_ENABLE -3
|
2012-11-02 02:48:55 +01:00
|
|
|
#define MESSAGE_SWITCH_ON -4
|
|
|
|
#define MESSAGE_SWITCH_OFF -5
|
2012-11-04 16:44:54 +01:00
|
|
|
#define MESSAGE_PURGE_AXES_LOCK -6
|
2012-11-01 16:37:27 +01:00
|
|
|
|
|
|
|
// Prints system status messages.
|
|
|
|
void report_status_message(uint8_t status_code);
|
|
|
|
|
|
|
|
// Prints miscellaneous feedback messages.
|
|
|
|
void report_feedback_message(int8_t message_code);
|
|
|
|
|
|
|
|
// Prints welcome message
|
|
|
|
void report_init_message();
|
|
|
|
|
|
|
|
// Prints Grbl help and current global settings
|
|
|
|
void report_grbl_help();
|
|
|
|
|
New startup script setting. New dry run, check gcode switches. New system state variable. Lots of reorganizing.
(All v0.8 features installed. Still likely buggy, but now thourough
testing will need to start to squash them all. As soon as we're done,
this will be pushed to master and v0.9 development will be started.
Please report ANY issues to us so we can get this rolled out ASAP.)
- User startup script! A user can now save one (up to 5 as compile-time
option) block of g-code in EEPROM memory. This will be run everytime
Grbl resets. Mainly to be used as a way to set your preferences, like
G21, G54, etc.
- New dry run and check g-code switches. Dry run moves ALL motions at
rapids rate ignoring spindle, coolant, and dwell commands. For rapid
physical proofing of your code. The check g-code switch ignores all
motion and provides the user a way to check if there are any errors in
their program that Grbl may not like.
- Program restart! (sort of). Program restart is typically an advanced
feature that allows users to restart a program mid-stream. The check
g-code switch can perform this feature by enabling the switch at the
start of the program, and disabling it at the desired point with some
minimal changes.
- New system state variable. This state variable tracks all of the
different state processes that Grbl performs, i.e. cycle start, feed
hold, homing, etc. This is mainly for making managing of these task
easier and more clear.
- Position lost state variable. Only when homing is enabled, Grbl will
refuse to move until homing is completed and position is known. This is
mainly for safety. Otherwise, it will let users fend for themselves.
- Moved the default settings defines into config.h. The plan is to
eventually create a set of config.h's for particular as-built machines
to help users from doing it themselves.
- Moved around misc defines into .h files. And lots of other little
things.
2012-11-03 18:32:23 +01:00
|
|
|
// Prints Grbl global settings
|
2012-11-02 02:48:55 +01:00
|
|
|
void report_grbl_settings();
|
|
|
|
|
2012-11-01 16:37:27 +01:00
|
|
|
// Prints realtime status report
|
|
|
|
void report_realtime_status();
|
|
|
|
|
2012-11-02 02:48:55 +01:00
|
|
|
// Prints Grbl persistent coordinate parameters
|
|
|
|
void report_gcode_parameters();
|
|
|
|
|
New startup script setting. New dry run, check gcode switches. New system state variable. Lots of reorganizing.
(All v0.8 features installed. Still likely buggy, but now thourough
testing will need to start to squash them all. As soon as we're done,
this will be pushed to master and v0.9 development will be started.
Please report ANY issues to us so we can get this rolled out ASAP.)
- User startup script! A user can now save one (up to 5 as compile-time
option) block of g-code in EEPROM memory. This will be run everytime
Grbl resets. Mainly to be used as a way to set your preferences, like
G21, G54, etc.
- New dry run and check g-code switches. Dry run moves ALL motions at
rapids rate ignoring spindle, coolant, and dwell commands. For rapid
physical proofing of your code. The check g-code switch ignores all
motion and provides the user a way to check if there are any errors in
their program that Grbl may not like.
- Program restart! (sort of). Program restart is typically an advanced
feature that allows users to restart a program mid-stream. The check
g-code switch can perform this feature by enabling the switch at the
start of the program, and disabling it at the desired point with some
minimal changes.
- New system state variable. This state variable tracks all of the
different state processes that Grbl performs, i.e. cycle start, feed
hold, homing, etc. This is mainly for making managing of these task
easier and more clear.
- Position lost state variable. Only when homing is enabled, Grbl will
refuse to move until homing is completed and position is known. This is
mainly for safety. Otherwise, it will let users fend for themselves.
- Moved the default settings defines into config.h. The plan is to
eventually create a set of config.h's for particular as-built machines
to help users from doing it themselves.
- Moved around misc defines into .h files. And lots of other little
things.
2012-11-03 18:32:23 +01:00
|
|
|
// Prints current g-code parser mode state and active switches
|
2012-11-02 02:48:55 +01:00
|
|
|
void report_gcode_modes();
|
|
|
|
|
New startup script setting. New dry run, check gcode switches. New system state variable. Lots of reorganizing.
(All v0.8 features installed. Still likely buggy, but now thourough
testing will need to start to squash them all. As soon as we're done,
this will be pushed to master and v0.9 development will be started.
Please report ANY issues to us so we can get this rolled out ASAP.)
- User startup script! A user can now save one (up to 5 as compile-time
option) block of g-code in EEPROM memory. This will be run everytime
Grbl resets. Mainly to be used as a way to set your preferences, like
G21, G54, etc.
- New dry run and check g-code switches. Dry run moves ALL motions at
rapids rate ignoring spindle, coolant, and dwell commands. For rapid
physical proofing of your code. The check g-code switch ignores all
motion and provides the user a way to check if there are any errors in
their program that Grbl may not like.
- Program restart! (sort of). Program restart is typically an advanced
feature that allows users to restart a program mid-stream. The check
g-code switch can perform this feature by enabling the switch at the
start of the program, and disabling it at the desired point with some
minimal changes.
- New system state variable. This state variable tracks all of the
different state processes that Grbl performs, i.e. cycle start, feed
hold, homing, etc. This is mainly for making managing of these task
easier and more clear.
- Position lost state variable. Only when homing is enabled, Grbl will
refuse to move until homing is completed and position is known. This is
mainly for safety. Otherwise, it will let users fend for themselves.
- Moved the default settings defines into config.h. The plan is to
eventually create a set of config.h's for particular as-built machines
to help users from doing it themselves.
- Moved around misc defines into .h files. And lots of other little
things.
2012-11-03 18:32:23 +01:00
|
|
|
// Prints startup line
|
|
|
|
void report_startup_line(uint8_t n, char *line);
|
|
|
|
|
2012-11-01 16:37:27 +01:00
|
|
|
#endif
|