remap increment decremt axis speed thorugh .axisrc

More
4 years 6 months ago #239332 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??
 

Please Log in to join the conversation.

More
4 years 6 months ago #239403 by cakeslob
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
Code:
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
Code:
bind . , [regsub %W [bind Scale <Left>] ${pane_top}.jogspeed.s] bind . . [regsub %W [bind Scale <Right>] ${pane_top}.jogspeed.s]
Code:
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 to join the conversation.

Time to create page: 0.069 seconds
Powered by Kunena Forum