grblHAL / core

grblHAL core code and master Wiki
Other
320 stars 84 forks source link

Hi, dear terjeio, where are the default settings of grblhal modified? In source code #228

Closed hanke-cnc closed 1 year ago

hanke-cnc commented 1 year ago

Since the grblhal circuit board I sell is fixed, I want to set the default parameter settings of grblhal in the source code to match my circuit board hardware. I'm sorry I didn't find it, but I remember where it exists?

terjeio commented 1 year ago

Default settings can be overriden on the compiler command line with -D arguments. This is valid both for the core and the driver (overriding my_machine.h competely is done by adding the symbol OVERRIDE_MY_MACHINE). -D arguments can be supplied via CMakeLists.txt if cmake is used for builds (the ESP32 and RP2040 uses this), via platformio.ini if platformio is used for builds, or in Eclipse via adding symbols in the GUI. You may also provide a modified grbl/defaults.h and my_machine.h to your users.

Finally the new Web Builder allows adding both board and machine specific defaults, I have not tested the latter but I see no reason for why that should not work.

hanke-cnc commented 1 year ago

Default settings can be overriden on the compiler command line with -D arguments. This is valid both for the core and the driver (overriding my_machine.h competely is done by adding the symbol OVERRIDE_MY_MACHINE). -D arguments can be supplied via CMakeLists.txt if cmake is used for builds (the ESP32 and RP2040 uses this), via platformio.ini if platformio is used for builds, or in Eclipse via adding symbols in the GUI. You may also provide a modified grbl/defaults.h and my_machine.h to your users.

Finally the new Web Builder allows adding both board and machine specific defaults, I have not tested the latter but I see no reason for why that should not work.

hanke-cnc commented 1 year ago

Default settings can be overriden on the compiler command line with -D arguments. This is valid both for the core and the driver (overriding my_machine.h competely is done by adding the symbol OVERRIDE_MY_MACHINE). -D arguments can be supplied via CMakeLists.txt if cmake is used for builds (the ESP32 and RP2040 uses this), via platformio.ini if platformio is used for builds, or in Eclipse via adding symbols in the GUI. You may also provide a modified grbl/defaults.h and my_machine.h to your users.

Finally the new Web Builder allows adding both board and machine specific defaults, I have not tested the latter but I see no reason for why that should not work.

Default settings can be overriden on the compiler command line with -D arguments. This is valid both for the core and the driver (overriding my_machine.h competely is done by adding the symbol OVERRIDE_MY_MACHINE). -D arguments can be supplied via CMakeLists.txt if cmake is used for builds (the ESP32 and RP2040 uses this), via platformio.ini if platformio is used for builds, or in Eclipse via adding symbols in the GUI. You may also provide a modified grbl/defaults.h and my_machine.h to your users.

Finally the new Web Builder allows adding both board and machine specific defaults, I have not tested the latter but I see no reason for why that should not work.

Sorry, bad translation software. I mean the system parameter settings of grblhal, such as $6=1; After downloading the firmware, it will be the parameter value

terjeio commented 1 year ago

Default values are defined in grbl/defaults.h - and can be overridden as described above. I guess comments to identify the settings ids should be added to the file to make it easier to find the correct values...