Refactor audio to use new config var callback instead of menu API

#420 Open
Repository
dmilligan
Branch
config_var_refactor
Repository
hudson
Branch
unified

Bitbucket cannot automatically merge this request.

The commits that make up this pull request have been removed.

Bitbucket cannot automatically merge this request due to conflicts.

Review the conflicts on the Overview tab. You can then either decline the request or merge it manually on your local system using the following commands:

hg update 7a3b5fa3f4c6
hg pull -r config_var_refactor https://bitbucket.org/dmilligan/magic-lantern
# Note: This will create a new head!
hg merge 2a7265dc39d4
hg commit -m 'Merged in dmilligan/magic-lantern/config_var_refactor (pull request #420)'
Author
  1. David Milligan
Reviewers
Description

The audio stuff is quite a mess and needs more refactoring than this, but I don't really have time or desire (I never use in camera audio, so what's in it for me?). Also, I have no way of testing the audio-lapis stuff so I don't even know if screwed something up. Probably needs some basic testing by someone with this camera before merging.

Anything else besides this that needs to do stuff when config vars change (needs a CBR)?

Comments (13)

    1. David Milligan author
      • Switch config presets w/o reboot

      • Decouple from menu API

      • Control with PTP

      • Easier to change settings from module or script

      1. David Milligan author

        narrowing it down to just the core, it's not too bad

        $ grep -e MENU_SELECT_FUNC *.c
        bitrate-6d.c:static MENU_SELECT_FUNC(hibr_wav_record_select){
        bitrate.c:static MENU_SELECT_FUNC(hibr_wav_record_select){
        config.c:static MENU_SELECT_FUNC(config_autosave_toggle)
        config.c:static MENU_SELECT_FUNC(config_save_select)
        config.c:static MENU_SELECT_FUNC(config_preset_toggle)
        debug.c:extern MENU_SELECT_FUNC(tasks_toggle_flags);
        fio-ml.c:static MENU_SELECT_FUNC(card_test_toggle)
        flexinfo.c:MENU_SELECT_FUNC(info_menu_save_select)
        flexinfo.c:MENU_SELECT_FUNC(info_menu_delete_select)
        flexinfo.c:MENU_SELECT_FUNC(info_menu_reset_select)
        focus.c:static MENU_SELECT_FUNC(focus_stack_copy_rack_focus_settings)
        hdr.c:static MENU_SELECT_FUNC (hdrv_extended_shutter_toggle)
        hdr.c:static MENU_SELECT_FUNC (hdrv_extended_iso_toggle)
        menu.c:MENU_SELECT_FUNC(menu_advanced_toggle)
        module.c:static MENU_SELECT_FUNC(module_menu_update_select)
        module.c:static MENU_SELECT_FUNC(module_menu_select_empty)
        module.c:static MENU_SELECT_FUNC(module_info_toggle)
        module.c:static MENU_SELECT_FUNC(module_menu_load)
        module.c:static MENU_SELECT_FUNC(module_menu_unload)
        module.c:static MENU_SELECT_FUNC(module_open_submenu)
        module.c:static MENU_SELECT_FUNC(console_toggle)
        raw-blinkies.c:static MENU_SELECT_FUNC(raw_blinkies_toggle)
        shoot.c:static MENU_SELECT_FUNC(interval_trigger_toggle)
        shoot.c:static MENU_SELECT_FUNC(hdr_stepsize_toggle)
        shoot.c:extern MENU_SELECT_FUNC(digic_iso_toggle_movie);
        tasks.c:MENU_SELECT_FUNC(tasks_toggle_flags)
        tskmon.c:MENU_SELECT_FUNC(tskmon_trace)
        tweaks.c:static MENU_SELECT_FUNC(defish_toggle)
        
          1. David Milligan author

            Is there anything about this PR that you object to? Would you like other stuff as part of this one, or separate?

            1. Alex

              I need some more time to digest this stuff and try it; overall I like the idea, but can't tell much more right now.

  1. Alex

    One that was gone with the menu caret changes (noticed it now): bulb_toggle. This has effect when expo override is active, because ML does ExpSim for bulb timer too.

  2. Alex

    Name change proposal (because "update" conflicts with the update functions from menu): refresh or change.

    1. David Milligan author

      I like 'change', how about CONFIG_INT_NOTIFY_CHANGE and int mgain_on_change(struct config_var*, int, int); etc. This makes the function name very descriptive of it's purpose

      1. Alex

        mgain_on_change sounds great.

        CONFIG_INT_NOTIFY_CHANGE.. a bit too long (well, I'm probably thinking too much at the alignment in the source file).