Author Topic: Easy configuration switch  (Read 592 times)

bpv5P

  • Member
  • ***
  • Posts: 102
Easy configuration switch
« on: July 01, 2017, 11:22:18 AM »
I think it's not implemented yet, but I would find really handy if I could switch from configurations with just a command (no reboot).
I see the configuration tab on ML GUI, but it's not intuitive, I don't know how to use it (if that even works) and I bet many people also don't.
For example, I normally shoot with 24.00 FPS (using Exact FPS on FPS_Override) and 180° shutter speed (1/48 on fine tune).
But some times I do 60fps recording for slowmotion. Also MLV recording with dual_iso. I would really like to be able to switch beetween those profiles without configuring everything manually (that's boring and sometimes I loose good stuff).

Is that possible or there's some firmware limitation? I know the switch beetween HD and FullHD is done on canon menu, but the other features seem to be just a dotfile (like in unix systems).

Anyway, just yet another idea.

garry23

  • Hero Member
  • *****
  • Posts: 1266
Re: Easy configuration switch
« Reply #1 on: July 01, 2017, 11:32:17 AM »
@bpv5p

It may not meet your needs, however, you may wish to look at my toggler script in s ripping corner or at photography.grayheron.net.

I wrote it so I could switch ML states quickly and without going into the ML menu.

Cheers

Garry

Walter Schulz

  • Hero Member
  • *****
  • Posts: 5643
Re: Easy configuration switch
« Reply #2 on: July 01, 2017, 11:36:17 AM »
Config presets are working pretty well. Apart from unconvenient reboot procedure and INFO button feature not working the way MENU and PLAY do.
http://www.magiclantern.fm/forum/index.php?topic=8499.0

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 10180
  • 5D Mark Free
Re: Easy configuration switch
« Reply #3 on: July 01, 2017, 11:48:53 AM »
It's possible, but every single piece of code that changes the settings with custom logic (that produces side effects, such as changing some Canon setting or installing some hook) has to be refactored; dmilligan already provided the backend and some proof of concept code for a few settings.

The idea is to call the same custom logic code from both menu (where it's currently used, as MENU_SELECT_FUNC's) and config file switching. Currently, the custom logic is called only when changing that setting from menu, but not when loading it from the config file.

Refactoring all of this would touch the entire codebase. It probably can be done one menu item at a time, but I would not do this sort of refactoring without a solid testing framework (as it's very easy to introduce subtle bugs, and manual testing would be extremely time-consuming). That framework can be built on top of QEMU, on those models that can run Canon GUI.

I'm afraid I do not have the time and resources to implement this alone, but I do recognize the usefulness.

An easy coding task in this direction would be to add a simple testing script for QEMU, along this idea. For example, a menu walkthrough (highlighting the differences between two ML versions).

If you cannot code, you can test the PR, and report what exactly you have tested. That's very helpful too.

you may wish to look at my toggler script

The script approach avoids the issue, as the menu API in Lua effectively simulates a menu interaction (so it calls the MENU_SELECT_FUNC's). So, for now, it's the only valid way to address this on the existing codebase. Be sure to use the lua_fix experimental build if you decide to go this route.

The approach (in the menu backend, not in garry's script) is a ugly hack though, and not a widely tested code path (other than api_test.lua); dmilligan's approach is the right way to solve this, so I'm tempted to revisit it.

bpv5P

  • Member
  • ***
  • Posts: 102
Re: Easy configuration switch
« Reply #4 on: July 14, 2017, 02:20:47 AM »
@bpv5p

It may not meet your needs, however, you may wish to look at my toggler script in s ripping corner or at photography.grayheron.net.

I wrote it so I could switch ML states quickly and without going into the ML menu.

Cheers

Garry

Thanks Garry!