Skip to content

Commit f0e693a

Browse files
committed
Touchy: Move macros to the common [MACROS] INI section rather than [TOUCHY]
Signed-off-by: andypugh <andy@bodgesoc.org>
1 parent 14fd201 commit f0e693a

File tree

8 files changed

+22
-71
lines changed

8 files changed

+22
-71
lines changed

configs/sim/touchy/gladevcp/gladevcp_touchy.ini

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@ HOME_USE_INDEX = NO
160160
HOME_IGNORE_LIMITS = NO
161161
HOME_SEQUENCE = 0
162162

163-
# section for main IO controller parameters -----------------------------------
164-
[TOUCHY]
163+
[MACROS]
165164
MACRO=increment xinc yinc
166165
MACRO=probe-hole maxradius

configs/sim/touchy/gladevcp/touchy.ini

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ HOME_USE_INDEX = NO
156156
HOME_IGNORE_LIMITS = NO
157157
HOME_SEQUENCE = 0
158158

159-
# section for main IO controller parameters -----------------------------------
160-
[TOUCHY]
159+
[MACROS]
161160
MACRO=increment xinc yinc
162161
MACRO=probe-hole maxradius

configs/sim/touchy/ngcgui/pyngcgui_touchy.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ HOME_USE_INDEX = NO
146146
HOME_IGNORE_LIMITS = NO
147147
HOME_SEQUENCE = 0
148148

149-
[TOUCHY]
149+
[MACROS]
150150
MACRO=increment xinc yinc
151151
MACRO=probe-hole maxradius
152152

configs/sim/touchy/ngcgui/pyngcgui_touchy_moveoff.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ HOME_USE_INDEX = NO
148148
HOME_IGNORE_LIMITS = NO
149149
HOME_SEQUENCE = 0
150150

151-
[TOUCHY]
151+
[MACROS]
152152
MACRO=increment xinc yinc
153153
MACRO=probe-hole maxradius
154154

configs/sim/touchy/touchy.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# EMC controller parameters for a simulated machine.
2-
[TOUCHY]
2+
[MACROS]
33
MACRO=increment xinc yinc
44
MACRO=probe-hole maxradius
55

docs/src/getting-started/updating-linuxcnc.adoc

Lines changed: 4 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -200,66 +200,8 @@ correspondingly needs to change from `libcanterp.so` to `canterp.so`.
200200

201201

202202

203-
== Updating Configuration Files (for 2.9.y)
204-
205-
No changes should be necessary to configuration files when moving from 2.8.x to 2.9.y.
206-
207-
=== Spindle limits in the INI
208-
209-
It is now possible to add settings to the [SPINDLE] section of the INI file
210-
211-
MAX_FORWARD_VELOCITY = 20000 The maximum spindle speed (in RPM)
212-
213-
MIN_FORWARD_VELOCITY = 3000 The minimum spindle speed (in RPM)
214-
215-
MAX_REVERSE_VELOCITY = 20000 This setting will default to
216-
MAX_FORWARD_VELOCITY if omitted.
217-
218-
MIN_REVERSE_VELOCITY = 3000` This setting is equivalent to
219-
MIN_FORWARD_VELOCITY but for reverse spindle rotation.
220-
It will default to the MIN_FORWARD_VELOCITY if omitted.
221-
222-
INCREMENT = 200 Sets the step size for spindle speed increment / decrement commands.
223-
This can have a different value for each spindle.
224-
This setting is effective with AXIS and Touchy but note that some
225-
control screens may handle things differently.
226-
227-
HOME_SEARCH_VELOCITY = 100 - Accepted but currently does nothing
228-
229-
HOME_SEQUENCE = 0 - Accepted but currently does nothing
230-
231-
== New HAL components
232-
233-
=== Non-Realtime
234-
mdro
235-
mqtt-publisher
236-
pi500_vfd
237-
pmx485-test
238-
qtplasmac-materials
239-
sim-torch
240-
svd-ps_vfd
241-
242-
=== Realtime
243-
anglejog
244-
div2
245-
enum
246-
filter_kalman
247-
flipflop
248-
hal_parport
249-
homecomp
250-
limit_axis
251-
mesa_uart
252-
millturn
253-
scaled_s32_sums
254-
tof
255-
ton
256-
257-
== New Drivers
258-
259-
A framework for controlling ModBus devices using the serial ports on
260-
many Mesa cards has been introduced.
261-
http://linuxcnc.org/docs/2.9/html/drivers/mesa_modbus.html
262-
263-
A new GPIO driver for any GPIO which is supported by the gpiod library is now included:
264-
http://linuxcnc.org/docs/2.9/html/drivers/hal_gpio.html
203+
== Updating Configuration Files (for 2.10.y)
265204

205+
Touchy: the Touchy MACRO entries should now be placed in a [MACROS]
206+
section of the INI rather than in the [TOUCHY] section. This is part of
207+
a process of commonising the INI setting between GUIs.

docs/src/gui/touchy.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ All other font sizes can be changed on the Preferences tab.
102102
=== Macros
103103

104104
Touchy can invoke O-word macros using the MDI interface. To configure
105-
this, in the '[TOUCHY]' section of the INI file, add one or more 'MACRO'
105+
this, in the '[MACROS]' section of the INI file, add one or more 'MACRO'
106106
lines. Each should be of the following format:
107107

108108
[source,{ini}]

src/emc/usr_intf/touchy/touchy.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,18 @@ def __init__(self, inifile):
190190
self.mdi_control = mdi.mdi_control(Gtk, linuxcnc, mdi_labels, mdi_eventboxes)
191191

192192
if self.ini:
193-
macros = self.ini.findall("TOUCHY", "MACRO")
193+
# Instruct user to update config
194+
if self.ini.findall("TOUCHY", "MACRO"):
195+
dialog = Gtk.MessageDialog(
196+
message_type=Gtk.MessageType.WARNING,
197+
buttons=Gtk.ButtonsType.OK,
198+
text="MACRO entries found in [TOUCHY] section of INI")
199+
dialog.format_secondary_text(
200+
"in LinuxCNC 2.10.n and later these now need to be in the [MACROS] section")
201+
response = dialog.run()
202+
dialog.destroy()
203+
204+
macros = self.ini.findall("MACROS", "MACRO")
194205
if len(macros) > 0:
195206
self.mdi_control.mdi.add_macros(macros)
196207
else:

0 commit comments

Comments
 (0)