M1 Stop save setting

Here is where you can request new features or special features.

M1 Stop save setting

Postby ger21 » Sat Jan 28, 2017 2:55 am

I added an M1 toggle button to my screen (#561).
It defaults to On when starting UCCNC, and it's state does not appear to be saved in the profile.
I tried:
AS3.Switchbutton(false,561);
in both the constructor macro and the .ssf file, but it always defaults to On.

Can we either get button #561to default to Off? Or have it's state saved in the profile?
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2714
Joined: Sat Sep 03, 2016 2:17 am

Re: M1 Stop save setting

Postby cncdrive » Sat Jan 28, 2017 3:12 am

Gerry,

The exec.Switchbutton only changes the visual state of the button and the visual state change can be handled separately to let the programmers control the visual state of custom buttons based on their functions' states.
I mean for example a macro can change a custom toggle type button state to on off based on if the programmer's function could do and finish different things.
In other words it is not mandatory that a button should always change it's visual state when the button is pressed.

To switch the M1 button state you should execute the exec.Callbutton function on the button code.
You could do it in the constructor macro and then the M1 button could be switched off on startup.
cncdrive
Site Admin
 
Posts: 4887
Joined: Tue Aug 12, 2014 11:17 pm

Re: M1 Stop save setting

Postby ger21 » Sat Jan 28, 2017 11:48 am

My mistake. Thanks.
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2714
Joined: Sat Sep 03, 2016 2:17 am


Return to Feature Request

Who is online

Users browsing this forum: No registered users and 5 guests