remap increment decremt axis speed thorugh .axisrc
- apfelschorle
- Offline
- New Member
Less
More
- Posts: 13
- Thank you received: 0
05 Apr 2022 12:59 #239332
by apfelschorle
remap increment decremt axis speed thorugh .axisrc was created by apfelschorle
Hi guy's,
I want to remap the "," and "." for inc/dec of axis speed to Control-Button + Up Button for incrementing axis speed and Control Button + Down Button for decrementing.
What are the command for incrementing? I didn't find the correct name in the axis.py
( (_(", and ."), _("Select jog speed")),)
Thats want I didnt want..
root_window.bin("<Control-Up>", lambda e:jogspeed_incremental())
root_window.bin("<Control-Down>", lambda e:jogspeed_incremental(-1))
Does somebody know the command for inc/dec of axis speed??
I want to remap the "," and "." for inc/dec of axis speed to Control-Button + Up Button for incrementing axis speed and Control Button + Down Button for decrementing.
What are the command for incrementing? I didn't find the correct name in the axis.py
( (_(", and ."), _("Select jog speed")),)
Thats want I didnt want..
root_window.bin("<Control-Up>", lambda e:jogspeed_incremental())
root_window.bin("<Control-Down>", lambda e:jogspeed_incremental(-1))
Does somebody know the command for inc/dec of axis speed??
Please Log in or Create an account to join the conversation.
05 Apr 2022 23:51 #239403
by cakeslob
Replied by cakeslob on topic remap increment decremt axis speed thorugh .axisrc
took me a while to find what it, its under axis.tcl, but thats as far as i got. Im not too good with computers, and tcl is no exception
github.com/LinuxCNC/linuxcnc/blob/master...s/tcl/axis.tcl#L1409
More specifically this, but I dont exactly know how to manipulate it using axisrc, because it looks like its handled in tcl
github.com/LinuxCNC/linuxcnc/blob/master...s/tcl/axis.tcl#L1409
frame ${pane_top}.jogspeed
label ${pane_top}.jogspeed.l0 -text [_ "Jog Speed:"]
label ${pane_top}.jogspeed.l1
scale ${pane_top}.jogspeed.s -bigincrement 0 -from .06 -to 1 -resolution .020 -showvalue 0 -variable jog_slider_val -command update_jog_slider_vel -orient h -takefocus 0
label ${pane_top}.jogspeed.l -textv jog_speed -width 6 -anchor e
pack ${pane_top}.jogspeed.l0 -side left
pack ${pane_top}.jogspeed.s -side right
pack ${pane_top}.jogspeed.l1 -side right
pack ${pane_top}.jogspeed.l -side right
bind . , [regsub %W [bind Scale <Left>] ${pane_top}.jogspeed.s]
bind . . [regsub %W [bind Scale <Right>] ${pane_top}.jogspeed.s]
More specifically this, but I dont exactly know how to manipulate it using axisrc, because it looks like its handled in tcl
bind . , [regsub %W [bind Scale <Left>] ${pane_top}.jogspeed.s]
bind . . [regsub %W [bind Scale <Right>] ${pane_top}.jogspeed.s]
proc update_jog_slider_vel {newval} {
global jog_speed max_speed
set max_speed_units [to_internal_linear_unit $max_speed]
if {$max_speed_units == {None}} return
if {$::metric} { set max_speed_units [expr {25.4 * $max_speed_units}] }
set speed [val2vel_show $newval $max_speed_units];
set jog_speed $speed
Please Log in or Create an account to join the conversation.
Time to create page: 0.106 seconds