Replies: 4 comments 4 replies
-
This discussion might be more relevant to the Mobiflight-FirmwareSorce repository; I posted it here to avoid scattering, please advise if it should be moved. |
Beta Was this translation helpful? Give feedback.
-
I'm not sure I quite understand this proposal. When you say "I/O lines are assigned user-defined names" do you mean modules rather than lines? At the moment names are given to modules, not the individual pins used by the modules. For example if I define an encoder and call it "COM1" the encoder that's the name for the encoder, not the two pins used to read the encoder. I find naming modules incredibly helpful as a user as it means when I create the output and input configs I can easily tell in the dropdown which connected device I want to use for that output or input. The only place where I see names getting exchanged for actual IO lines is in the output shifter implementation, but even there it isn't stored in the configuration, it's only used to identify which line should get turned on/off. |
Beta Was this translation helpful? Give feedback.
-
@GioCC - thanks for sharing this idea. I explicitly wanted always that a user can give a meaningful name to the devices that one creates. HW-Pins themselves cannot be names, they are derived from the name that the board's data sheet provides for them and what is typically printed on the board. This yields the best UX because the HW pin names are easy to relate to their physical counterpart and the user can later give meaningful names to the devices. Configuration is stored completely on the board. This is also required for better sharing of configurations - only if device names and MF app config correspond correctly a config set can shared with others. For the shifter i am OK with auto-generated pin names, only requirement that is easy for the user to tell to which shift register these pins belong. |
Beta Was this translation helpful? Give feedback.
-
I changed the original formulation of the proposal; I got the text from a notice I made some time ago for myself and didn't notice that it was actually misleading (or quite incorrect). I also updated it with a few considerations. |
Beta Was this translation helpful? Give feedback.
-
What is meant by implicit I/O naming
Currently, I/O lines are assigned user-defined names, which are used in some cases to identify and reference those lines for message exchange and processing.
These user-defined names are stored in the configuration (for later retrieval), but also in the Arduino working memory, and must remain available to be used as above.
However, for the purpose of operations, a naming scheme derived exclusively from the line attributes (e.g. assigned pin...) could be defined.
The advantages:
Possible drawbacks:
* User-defined names are no longer required, except as labels in the configuration program; therefore, they would no longer be kept in the Arduino configuration copy, which in turn would not be fully comprehensive.Naming proposal
I/O line names are used when reporting I/O events (whether incoming or outgoing).
They can be uniquely identified by a set of values including:
(MPX management is already considered here.)
Ideally, the "MPX Channel" value (which would range from 0 to 15 for MPXs) could also conveniently double as address for I2C peripherals, allowing a seamless addressing of I/O expanders.
It would be also desirable to plan in advance for an input matrix arrangement (shoud it ever be considered interesting); however I haven't figured out a good solution for that yet, because it would probably also depend from its type of connection (using I/O expanders? MPXs? Direct inputs? Any of the above?)
This information can be sent as a set of integer values, or even better as a uniform string collecting all individual codes: for example, something along the lines of
I43.25@02
could mean
digital "I"nput, input block connected to pin #43, 25th input in block, block belonging to MPX channel #2.
This string would take the place of the user-assigned name currently exchanged.This string (but the actual syntax is just an example) could be used as-is for the exchange in serial messages, or encoded differently; the important part is that all these pieces of information are present in a consistent, easily decodable form.
Beta Was this translation helpful? Give feedback.
All reactions