Thanks for the answers. I like python syntax workaround, but it only suits to python HAL files, which I almost never used. And if I want to keep my installations up-to-date, I would have to remake HAL files. Furthermore, old and new system configurations would be back and forward incompatible.

So, I am still thinking about another solution. My ideas:
1. Create a translator of .hal files and replace aliased pin names to original ones by using dictionary file. Maybe some standard linux command could also do this?.. This way it could be quite universal - the tool could be used for permanent translation and as load-time pipe translator (by using '|' in loading command). 2. Create my own cape overlay file with nice names. Never did that, don't know how complex it could be. 3. Create a custom HAL pass-through component with nice pin names for integrators and other pins net'ed to hardware pins in cape hal file. Create and use two functions - one for reading and one for writing, addf them after hardware reading and before hardware writing. I know this is quite easy solution, while it would add some extra cpu load at runtime. 4. Make and use .hal to .halpy translator to automate the change of existing configurations. Or maybe such tool already exists?



04/17/2017 10:51 AM, [email protected] rašė:

On 17/04/17 09:34, Alexander Rössler wrote:
Marius,

You can either use HAL signals with the nicer to read names or
properly named variable names in a Python HAL file.

e.g.
|
furaday_di_0 =hal.Pin('bb_gpio.out-02.value')
furaday_di_0.set(1)
|

The removal of aliases goes back almost 2 years
https://github.com/machinekit/machinekit/issues/610

Also note params have been deprecated, because they can be replaced by
an I/O pin.

Neither aliases nor params feature in the multicore code and the code
for looking up pins by name does not cater for an alias being used.

Nearly all components are now instantiated and can be named whatever is
required (not the pru components however).

Alternately the methods Alex highlights work and the python renaming
would probably be your best overall strategy, as you have complete freedom
in the naming and it can all be done in a discrete file that users don't
need to bother their heads about.

regards

--
website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
https://github.com/machinekit
--- You received this message because you are subscribed to the Google Groups "Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to