1
0
mirror of https://github.com/bdring/Grbl_Esp32.git synced 2025-09-02 10:53:01 +02:00

Merge pull request #374 from bdring/master

Sync with master
This commit is contained in:
bdring
2020-04-07 13:24:56 -05:00
committed by GitHub
3 changed files with 29 additions and 5 deletions

View File

@@ -20,7 +20,7 @@
// Grbl versioning system // Grbl versioning system
#define GRBL_VERSION "1.1f" #define GRBL_VERSION "1.1f"
#define GRBL_VERSION_BUILD "20200319" #define GRBL_VERSION_BUILD "20200407"
//#include <sdkconfig.h> //#include <sdkconfig.h>
#include <Arduino.h> #include <Arduino.h>

View File

@@ -590,6 +590,17 @@ void initRMT() {
rmt_config(&rmtConfig); rmt_config(&rmtConfig);
rmt_fill_tx_items(rmtConfig.channel, &rmtItem[0], rmtConfig.mem_block_num, 0); rmt_fill_tx_items(rmtConfig.channel, &rmtItem[0], rmtConfig.mem_block_num, 0);
#endif #endif
#ifdef Z2_STEP_PIN
Z2_rmt_chan_num = sys_get_next_RMT_chan_num();
rmt_set_source_clk((rmt_channel_t)Z2_rmt_chan_num, RMT_BASECLK_APB);
rmtConfig.channel = (rmt_channel_t)Z2_rmt_chan_num;
rmtConfig.tx_config.idle_level = bit_istrue(settings.step_invert_mask, Z_AXIS) ? RMT_IDLE_LEVEL_HIGH : RMT_IDLE_LEVEL_LOW;
rmtConfig.gpio_num = Z2_STEP_PIN;
rmtItem[0].level0 = rmtConfig.tx_config.idle_level;
rmtItem[0].level1 = !rmtConfig.tx_config.idle_level;
rmt_config(&rmtConfig);
rmt_fill_tx_items(rmtConfig.channel, &rmtItem[0], rmtConfig.mem_block_num, 0);
#endif
#ifdef A_STEP_PIN #ifdef A_STEP_PIN
A_rmt_chan_num = sys_get_next_RMT_chan_num(); A_rmt_chan_num = sys_get_next_RMT_chan_num();
rmt_set_source_clk((rmt_channel_t)A_rmt_chan_num, RMT_BASECLK_APB); rmt_set_source_clk((rmt_channel_t)A_rmt_chan_num, RMT_BASECLK_APB);
@@ -802,12 +813,25 @@ inline IRAM_ATTR static void stepperRMT_Outputs() {
#endif #endif
} }
#endif #endif
#ifdef Z_STEP_PIN #ifdef Z_STEP_PIN
if (st.step_outbits & (1 << Z_AXIS)) { if (st.step_outbits & (1 << Z_AXIS)) {
#ifndef Z2_STEP_PIN // if not a ganged axis
RMT.conf_ch[Z_rmt_chan_num].conf1.mem_rd_rst = 1; RMT.conf_ch[Z_rmt_chan_num].conf1.mem_rd_rst = 1;
RMT.conf_ch[Z_rmt_chan_num].conf1.tx_start = 1; RMT.conf_ch[Z_rmt_chan_num].conf1.tx_start = 1;
#else // it is a ganged axis
if ((ganged_mode == SQUARING_MODE_DUAL) || (ganged_mode == SQUARING_MODE_A)) {
RMT.conf_ch[Z_rmt_chan_num].conf1.mem_rd_rst = 1;
RMT.conf_ch[Z_rmt_chan_num].conf1.tx_start = 1;
}
if ((ganged_mode == SQUARING_MODE_DUAL) || (ganged_mode == SQUARING_MODE_B)) {
RMT.conf_ch[Z2_rmt_chan_num].conf1.mem_rd_rst = 1;
RMT.conf_ch[Z2_rmt_chan_num].conf1.tx_start = 1;
}
#endif
} }
#endif #endif
#ifdef A_STEP_PIN #ifdef A_STEP_PIN
if (st.step_outbits & (1 << A_AXIS)) { if (st.step_outbits & (1 << A_AXIS)) {
RMT.conf_ch[A_rmt_chan_num].conf1.mem_rd_rst = 1; RMT.conf_ch[A_rmt_chan_num].conf1.mem_rd_rst = 1;

View File

@@ -21,10 +21,10 @@
"30","Maximum spindle speed","RPM","Maximum spindle speed. Sets PWM to 100% duty cycle." "30","Maximum spindle speed","RPM","Maximum spindle speed. Sets PWM to 100% duty cycle."
"31","Minimum spindle speed","RPM","Minimum spindle speed. Sets PWM to 0.4% or lowest duty cycle." "31","Minimum spindle speed","RPM","Minimum spindle speed. Sets PWM to 0.4% or lowest duty cycle."
"32","Laser-mode enable","boolean","Enables laser mode. Consecutive G1/2/3 commands will not halt when spindle speed is changed." "32","Laser-mode enable","boolean","Enables laser mode. Consecutive G1/2/3 commands will not halt when spindle speed is changed."
"33","Spindle PWM Freq","16-bit","Spindle PWM Freq (reboot to take effect)" "33","Spindle PWM Freq","float (percent)","Spindle PWM Freq (reboot to take effect)"
"34","Spindle PWM Off Value","16-bit","Spindle PWM Off Value (reboot to take effect)" "34","Spindle PWM Off Value","float (percent)","Spindle PWM Off Value (reboot to take effect) Example 46.9 = 46.9%"
"35","Spindle PWM Min Value","16-bit","Spindle PWM Min Value (reboot to take effect)" "35","Spindle PWM Min Value","float (percent)","Spindle PWM Min Value (reboot to take effect)"
"36","Spindle PWM Max Value","16-bit","Spindle PWM Max Value (reboot to take effect)" "36","Spindle PWM Max Value","float (percent)","Spindle PWM Max Value (reboot to take effect)"
"80-84","User integer Values","unsigned 16-bit","Reserved for custom machine use" "80-84","User integer Values","unsigned 16-bit","Reserved for custom machine use"
"90-94","User Floating point value","float","Reserved for custom machine use" "90-94","User Floating point value","float","Reserved for custom machine use"
"100","X-axis travel resolution","step/mm","X-axis travel resolution in steps per millimeter." "100","X-axis travel resolution","step/mm","X-axis travel resolution in steps per millimeter."
1 $-Code Setting Units Setting Description
21 30 Maximum spindle speed RPM Maximum spindle speed. Sets PWM to 100% duty cycle.
22 31 Minimum spindle speed RPM Minimum spindle speed. Sets PWM to 0.4% or lowest duty cycle.
23 32 Laser-mode enable boolean Enables laser mode. Consecutive G1/2/3 commands will not halt when spindle speed is changed.
24 33 Spindle PWM Freq 16-bit float (percent) Spindle PWM Freq (reboot to take effect)
25 34 Spindle PWM Off Value 16-bit float (percent) Spindle PWM Off Value (reboot to take effect) Spindle PWM Off Value (reboot to take effect) Example 46.9 = 46.9%
26 35 Spindle PWM Min Value 16-bit float (percent) Spindle PWM Min Value (reboot to take effect)
27 36 Spindle PWM Max Value 16-bit float (percent) Spindle PWM Max Value (reboot to take effect)
28 80-84 User integer Values unsigned 16-bit Reserved for custom machine use
29 90-94 User Floating point value float Reserved for custom machine use
30 100 X-axis travel resolution step/mm X-axis travel resolution in steps per millimeter.