<font face="Arial, Verdana">Short answer is, yes you can.</font>
Long answer is to use your cool event system to add your own code. There are 2 events to overwrite default behaviour. If you use dev version it is run before original code and returning true prevents original code from boing run.
// Allow adding new G and M codes. To implement it create a function
// bool eventUnhandledGCode(GCode *com)
// that returns true if it handled the code, otherwise false.
// Event define would then be
// #define EVENT_UNHANDLED_G_CODE(c) eventUnhandledGCode(c)
#define EVENT_UNHANDLED_G_CODE(c) false
#define EVENT_UNHANDLED_M_CODE(c) false
Here you need to overwrite
#define EVENT_UNHANDLED_G_CODE(c) false
to call the following function
<font face="Arial, Verdana">bool customGCode(GCode *com) {</font>
<font face="Arial, Verdana"> switch(com->G) {</font>
<font face="Arial, Verdana"> case 28: // send calibration gcode</font>
<font face="Arial, Verdana"> // yout homing here</font>
<font face="Arial, Verdana"> break;</font>
default:
<font face="Arial, Verdana"> return false;</font>
<font face="Arial, Verdana"> }</font>
<font face="Arial, Verdana"> return true;</font>
<font face="Arial, Verdana">}</font>
<font face="Arial, Verdana">
</font>
<font face="Arial, Verdana">for more informations read the header of Events.h on how to add the events or check on github the sample customevent implementations. This allows you to modify the firmware a great way without needing to change our sources, so it stays easy to update later without to redo all changes.</font>