Author Topic: Array variables for modules (CONFIG_ARRAY_ELEMENT)  (Read 2024 times)

Marsu42

  • Contributor
  • Hero Member
  • *****
  • Posts: 1557
  • 66d + flashes
Array variables for modules (CONFIG_ARRAY_ELEMENT)
« on: September 08, 2013, 11:24:16 AM »
This was buried in some dev thread, but I'd like to add an "official" feature request for this:

Modules currently don't support multiplexing variables as arrays, which is unfortunate since it's an extremely useful function and it cannot be worked around easily. As soon as an author module wants to have different config or variable sets, this is the way to go - take for example different exposure curves in the autoexpo module. I also wanted to use this in a module of mine to tie variables to dial settings until I found out that copy/pasting my code that was working in the core was broken as a module :-\

dmilligan

  • Developer
  • Hero Member
  • *****
  • Posts: 3218
  • 60Da / 1100D / EOSM
Re: Array variables for modules (CONFIG_ARRAY_ELEMENT)
« Reply #1 on: September 10, 2013, 05:00:59 PM »
We also need CONFIG_STR variables. The filepref module is cool, but IMO toatlly useless without being able to save the prefix name to the config (I have to re-type it in everytime I turn the cam on!!). I modded this module myself to simply save it to it's own txt file on the card so that this cool feature is actually usable, but it would be much better to integrate with the ML config system.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: Array variables for modules (CONFIG_ARRAY_ELEMENT)
« Reply #2 on: September 10, 2013, 06:01:53 PM »
Temporary hack: 4 letters can fit in an integer ;)

Marsu42

  • Contributor
  • Hero Member
  • *****
  • Posts: 1557
  • 66d + flashes
Re: Array variables for modules (CONFIG_ARRAY_ELEMENT)
« Reply #3 on: September 11, 2013, 03:42:14 PM »
Temporary hack: 4 letters can fit in an integer ;)

Well, this is only for CONFIG_STR which I really wasn't missing at all, while I do think CONFIG_ARRAY_ELEMENT which this thread is about is required and has no workaround at all other than manual reading/writing each array element into its own config var :-\