Prevent date/time from flickering while ML menu is active

#480 Merged at b5b987a
Repository
Deleted repository
Branch
prevent-menu-flickering (d9a341121131)
Repository
Magic Lantern
Branch
unified
Author
  1. Maqs
Reviewers
Description

Calls CancelDateTimer (or StopDateTimer for 7D) to prevent refreshing the date/time displayed in the canon menu under the ML menu, therefore avoiding date/time flickering.

Note: this does not disable the clock itself, but the timer used to update it in the menu.

Comments (14)

      1. Maqs author

        Yes, the date/time view in the canon menu still works fine, as the (one-shot) timer is initialized every time the menu is shown. StartMenuMode (initializes timer) and CancelDateTimer are both called from IDLEHandler. The timer callback re-initializes the timer every time it is called.

        Tested for 6D.113. 7D.203 by request (reported by user via IRC).

  1. Giovanni Nanomad Condello

    A more possible generic solution,

    #define CONFIG_KILL_MENU_TIMER
    
    #define MENU_UPDATE_TIMER 0xDEADBEEF // Whatever it is
    
    NSTUB(0xFFOOFFE, TimerCancel) // xref: CancelDateTimer
    
    #if defined(CONFIG_KILL_MENU_TIMER)
    TimerCancel(MENU_UPDATE_TIMER);
    #endif
    

    But let's roll with this version first :)

    1. Maqs author

      In addition, in your more generic solution, the timer should be set to 0x17 after canceling it, at least that's what canon does everywhere (and in CancelDateTimer).

      edit: Without it, one could accidentally cancel other timers re-using the same id, if IDLEHandler calls CancelDateTimer when leaving the menu.

        1. Georg Hofstetter

          this is the timer subsystem? its not documented yet, right? (sorry if i am wrong)

          would be cool to see a header that has all the functions and constants, so we can use it for eliminating tasks etc. in which task context do those timer routines run? called from interrupt context?

          (i am asking because of stack requirements)

          1. Alex

            There's no task name, and it locks up when trying to call take_semaphore; give_semaphore works fine. So I also believe it's interrupt context.