Skip to content

halcmd: warn about an arrow written against a name - #4803

Open
grandixximo wants to merge 1 commit into
LinuxCNC:masterfrom
grandixximo:halcmd-arrow-warn
Open

grandixximo wants to merge 1 commit into
LinuxCNC:masterfrom
grandixximo:halcmd-arrow-warn

Conversation

@grandixximo

Copy link
Copy Markdown
Contributor

Fixes #4645 for now with a warning, as discussed there.

net lube-pump=> io.relay5 makes a signal named lube-pump=>, since halcmd only drops an arrow that stands as its own word. The config loads, and the odd name only shows up later, when halcmd commands typed by hand cannot find the signal.

net, linkps and linksp now warn about an argument that starts or ends with => or <=:

test.hal:3: Warning: 'lube-pump=>' has an arrow attached, it is taken as part of the name; put a space between the name and the arrow

The name is still accepted as before, so no existing config breaks. A name with an arrow in the middle, like in=>out, stays silent and still works (the case @rmu75 raised).

While checking this I found the linkps help text listed the arrows as ==> and <==. halcmd drops only =>, <= and <=>; I tested net a ==> siggen.0.sine and halcmd looks for a pin named ==>. The help text now lists the right ones, and the man page says an arrow needs spaces around it.

"net lube-pump=> io.relay5" makes a signal named "lube-pump=>", since
halcmd only drops an arrow that stands as its own word. The config
loads, and the odd name only shows up later, when halcmd commands
typed by hand cannot find the signal.

net, linkps and linksp now warn about an argument that starts or ends
with "=>" or "<=". A name with an arrow in the middle, like "in=>out",
stays silent and still works.

The linkps help text listed the arrows as '==>' and '<=='; halcmd
drops only '=>', '<=' and '<=>', and takes '==>' as a name.

Reported by dirkx in LinuxCNC#4645.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: (Not)Accepting decoration as a hal signal name when there is no space

1 participant