test_lv crashes EOSM

Issue #2621 new
Daniel Fort created an issue

Running the script api_test.lua on the lua_fix branch will crash on the EOSM because test_lv tries to stop live view but the EOSM is always in lv mode. At first I submitted a pull request to skip the live view tests but the "right" solution was suggested by dmilligan, "throw an error if stopping LV is not possible on the current camera."

pull request #759

Comments (12)

  1. Daniel Fort reporter

    I came across this on the forum:


    So using the same code as in that post:

    NotifyBox(1000, "%d %d ", lv, raw_lv_is_enabled());

    It looks like lv is off (0 0) when a Canon menu takes over the display and lv is on (1 0) all other times including when a Canon menu is semi-transparent and when recording H.264 video. When the camera is recording MLV both lv and raw_lv_is_enabled() are on (1 1). I managed to get some screenshots to illustrate this. Sorry, I couldn't get a screenshot of the raw recording test.

    LV off Canon Menu.png

    LV on.png

    So maybe this proves that turning off Live View on the EOSM is possible?

  2. Daniel Fort reporter

    LiveView status? What is the variable name?

    For the info screen:

    lv = 0

    lv_disp_mode = 0

    lv_paused = 0

    As far as I can tell the only one that changes is lv. It is 0 on the Canon info screen and 1 on all other screens. lv_disp_mode and lv_paused always remained at 0 on the tests that I ran.

  3. Daniel Fort reporter

    Pressing the INFO. button, just below the selector wheel, until it comes up. From the ML screen it is the first press but on other screens you need to press multiple times.

    So to turn off LiveView you will need to trigger the INFO button until lv = 0?

  4. Alex

    Right. It may be possible to set it via SetGUIRequestMode as well - can you print the value of CURRENT_GUI_MODE?

  5. Daniel Fort reporter

    CURRENT_GUI_MODE = 21 on the info screen.

    Just out of curiosity I also checked other screens. They return 0 except for the Canon menu which returns 2.

  6. Alex

    With SetGUIRequestMode(21), can you go from LiveView to info screen?

    (you can place this one in "don't click me", for example, to try)

  7. Daniel Fort reporter

    Yes, that works.

    This is what I'm doing.


    static void run_test()

    The 5-sec delay is so I have time to get into various screens.

  8. Alex

    Great. And then, SetGUIRequestMode(0) should take you back to LiveView.

    If that works, close_liveview() should use SetGUIRequestMode(21) on EOS M. The opposite function, force_liveview, should be already compatible.

  9. Daniel Fort reporter

    Tested and now I can go from LiveView to the INFO screen and back to LiveView. I see that close_liveview() is declared in shoot.h but not sure where to take it from here.

  10. Daniel Fort reporter

    Got something that works on the EOSM and isn't breaking the other platforms. Log file looks good.

    Testing module 'lv'...
    LiveView is running; stopping...
    Starting LiveView...
    Setting zoom to x1...
    Setting zoom to x5...
    Setting zoom to x10...
    Setting zoom to x5...
    Setting zoom to x1...
    Setting zoom to x10...
    Setting zoom to x1...
    Pausing LiveView...
    Resuming LiveView...
    Stopping LiveView...
    LiveView tests completed.

    Also tested on a 700D.

    Pull request #761

  11. Log in to comment