diff --git a/Grbl_Esp32/grbl.h b/Grbl_Esp32/grbl.h index b7ef650a..a27c4b6f 100644 --- a/Grbl_Esp32/grbl.h +++ b/Grbl_Esp32/grbl.h @@ -20,7 +20,7 @@ // Grbl versioning system #define GRBL_VERSION "1.1f" -#define GRBL_VERSION_BUILD "20200319" +#define GRBL_VERSION_BUILD "20200407" //#include #include diff --git a/Grbl_Esp32/stepper.cpp b/Grbl_Esp32/stepper.cpp index 3c5db1ed..9927292e 100644 --- a/Grbl_Esp32/stepper.cpp +++ b/Grbl_Esp32/stepper.cpp @@ -590,6 +590,17 @@ void initRMT() { rmt_config(&rmtConfig); rmt_fill_tx_items(rmtConfig.channel, &rmtItem[0], rmtConfig.mem_block_num, 0); #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 A_rmt_chan_num = sys_get_next_RMT_chan_num(); 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 + #ifdef Z_STEP_PIN 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.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 + #ifdef A_STEP_PIN if (st.step_outbits & (1 << A_AXIS)) { RMT.conf_ch[A_rmt_chan_num].conf1.mem_rd_rst = 1; diff --git a/doc/csv/setting_codes_en_US.csv b/doc/csv/setting_codes_en_US.csv index 71571e40..c46e640e 100644 --- a/doc/csv/setting_codes_en_US.csv +++ b/doc/csv/setting_codes_en_US.csv @@ -21,10 +21,10 @@ "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." "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)" -"34","Spindle PWM Off Value","16-bit","Spindle PWM Off Value (reboot to take effect)" -"35","Spindle PWM Min Value","16-bit","Spindle PWM Min Value (reboot to take effect)" -"36","Spindle PWM Max Value","16-bit","Spindle PWM Max Value (reboot to take effect)" +"33","Spindle PWM Freq","float (percent)","Spindle PWM Freq (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","float (percent)","Spindle PWM Min 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" "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."