Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Morghus

#1
When do you get these "Raw error" messages? Only after it stopped working for you, before, or even when not using the intervalometer? I just checked the ETTR code and there are a few scenarios where it would display this error message, one of them not being able to read the raw shooting parameters. It's just a wild guess, but maybe enabling Expo. Override helps?

Also make sure to put a clean ML installation on the SD card and not leave any stale TL files in the ML folder.
#2
Quote from: gary2013 on March 10, 2014, 04:26:44 AM
which nightly build? ML, TL or both?
ML only for now, but I'm sure it'll find its way into TL someday
#3
Quote from: feureau on February 24, 2014, 08:05:23 AM
On other cameras you can hold the set button and turn on the camera to disable ML to load, but that doesn't seem to be implemented in EOS-M

Should be in one of the next nightly, and the button to hold is INFO on the M
#5
General Development / Re: Auto ETTR on EOSM
March 07, 2014, 11:21:14 PM
Works perfectly now! I added a timeout and a status, how does this look?

diff -r 811c68f776a5 modules/ettr/ettr.c
--- a/modules/ettr/ettr.c Thu Mar 06 22:29:09 2014 +0200
+++ b/modules/ettr/ettr.c Fri Mar 07 23:19:25 2014 +0100
@@ -40,6 +40,7 @@
#define AUTO_ETTR_TRIGGER_BY_HALFSHUTTER_DBLCLICK (auto_ettr_trigger == 3)

/* status codes */
+#define ETTR_EXPO_PRECOND_TIMEOUT -2
#define ETTR_EXPO_LIMITS_REACHED -1
#define ETTR_NEED_MORE_SHOTS 0
#define ETTR_SETTLED 1
@@ -620,6 +621,21 @@

static int auto_ettr_work(int corr)
{
+    if (shooting_mode == SHOOTMODE_M || shooting_mode == SHOOTMODE_MOVIE)
+    {
+        /* in M mode, wait until shutter speed is reported by Canon firmware */
+        int waited = 0;
+        while (lens_info.raw_shutter == 0)
+        {
+            if (waited > 2000)
+            {
+                return ETTR_EXPO_PRECOND_TIMEOUT;
+            }
+            msleep(50);
+            waited += 50;
+        }
+    }
+
     /* save initial exposure settings so we can print them */
     char* expo_settings = get_current_exposure_settings();
     snprintf(prev_exposure_settings, sizeof(prev_exposure_settings), "%s", expo_settings);
@@ -671,6 +687,13 @@
         msleep(1000);
         bmp_printf(FONT_MED, 0, os.y0, "ETTR: expo limits reached\n%s", get_current_exposure_settings());
     }
+    else if (status == ETTR_EXPO_PRECOND_TIMEOUT)
+    {
+        beep_times(3);
+        ettr_pics_took = 0;
+        msleep(1000);
+        bmp_printf(FONT_MED, 0, os.y0, "ETTR: timeout while waiting for preconditions\n");
+    }
     else if (AUTO_ETTR_TRIGGER_AUTO_SNAP)
     {
         /* take another pic */
@@ -699,7 +722,6 @@
     if (shooting_mode != SHOOTMODE_M && shooting_mode != SHOOTMODE_AV && shooting_mode != SHOOTMODE_TV && shooting_mode != SHOOTMODE_P && shooting_mode != SHOOTMODE_MOVIE) return;
     int is_m = (shooting_mode == SHOOTMODE_M || shooting_mode == SHOOTMODE_MOVIE);
     if (lens_info.raw_iso == 0 && is_m) return;
-    if (lens_info.raw_shutter == 0 && is_m) return;
     if (auto_ettr_running) return;
     if (is_hdr_bracketing_enabled() && !AUTO_ETTR_TRIGGER_BY_SET) return;
#6
General Development / Re: Auto ETTR on EOSM
March 07, 2014, 10:52:29 PM
I tried a few things:

  • lens_info.raw_shutter regains a value around 1 second after QR popped up
  • In PROP_HANDLER(PROP_GUI_STATE) I can't wait for that value because lens_info.raw_shutter only regains a value after this function returned (I actually tried this, as if I waited 2 seconds it took exactly 2 seconds for raw_shutter to get a value)
  • I tried creating a task with TASK_CREATE() and waiting for raw_shutter there, same behavior as if I just wait in PROP_HANDLER(PROP_GUI_STATE)
  • vsync_cbr is not called while QR is active, so I can't check raw_shutter there and, if necessary, start ETTR
  • debug_task sees raw_shutter regain a value before QR is over

I don't know if I should create a background task in ettr that always runs, like the vsync_cbr, checking for the right conditions... would be a waste of resources. I don't know if there are any background tasks that I could use for that, any suggestions?
#7
General Development / Re: Auto ETTR on EOSM
March 07, 2014, 10:10:10 PM
No, unfortunately as soon as you press half shutter it goes back to LV
#8
General Development / Re: Auto ETTR on EOSM
March 07, 2014, 10:06:08 PM
Quote from: a1ex on March 07, 2014, 07:42:14 AM
So... were you able to turn off LiveView on the M? I've asked somewhere else and IIRC it wasn't possible.
NotifyBox(1000, "%d %d ", lv, raw_lv_is_enabled());

Pressing INFO cycles through these modes:

I'll test lens_info.raw_shutter next!
#9
General Development / Re: Auto ETTR on EOSM
March 07, 2014, 01:08:10 AM
Made a pull request, double tapping the screen will trigger ETTR.

I also found out why ETTR in combination with the intervalometer doesn't work: in auto_ettr_step() the following line fails:

    if (lens_info.raw_shutter == 0 && is_m) return;

raw_shutter seems to be 0, right before taking a photo it is set correctly, something seems to set it to 0 while or after taking a photo... I tried commenting out that line and it seems to fix it but I think corrections aren't always dead on, it takes one or two photos to settle fully.
#10
Works on the 6D even in combination with Expo Lock, on the M however Expo Lock doesn't seem to work right, shutter speed jumps right to 30" when I adjust aperture or ISO, I'll have to investigate, don't know if it didn't work before either...

EDIT: I forgot to mention that changing ISO works as well on the M
#11
Yep, ISO now changes on 6D and EOSM, however some modules aren't building now because they are missing a dependency

[ DEPENDS  ]   ettr.dep
Will NOT load on:
    6D (expo_lock_update_value)
    EOSM (expo_lock_update_value)
#12
General Development / Re: Auto ETTR on EOSM
March 06, 2014, 08:24:52 AM
So a CONFIG_IS_MIRRORLESS or CONFIG_EVF_ONLY or something should be introduced and then disable the parts where it tries to change things outside LV? I figure the EOS M and M2 won't be the last mirrorless cameras from canon and other ones probably should behave like the M.

Also:
Quote from: Morghus on March 05, 2014, 11:11:41 PM
While ETTR is enabled and set to Press SET, the quick menu becomes inaccessible though... would that be preferable to not being able to use SET as a trigger? I can clean up the code and submit a pull request if yes.
Where would be the right place to discuss this?
#13
General Development / Re: Auto ETTR on EOSM
March 06, 2014, 03:49:06 AM
No it doesn't work there yet, something doesn't work after analyzing the photo in image review, it should work in manual always on or with halfs dblclick
#14
Quote from: a1ex on March 05, 2014, 09:50:49 PM
That means, when doing auto adjustments, 50D does not trigger PROP_ISO, PROP_SHUTTER, PROP_APERTURE or PROP_APERTURE2?

Try putting some printf's in these 4 properties and let me know how it behaves.

Also try this one on 50D: https://bitbucket.org/hudson/magic-lantern/commits/8c2d1a82ee6e
Tried this on the 6D, ISO still can't be changed by canon, only ML works
#15
General Development / Re: Auto ETTR on EOSM
March 05, 2014, 11:11:41 PM
Alright that took a while... Since gui.h contains this
#define BGMT_Q TOUCH_1_FINGER
and key codes are mapped to different values in module.c (and unknown ones mapped to 0) I couldn't access the key code in the module. By outputting the pressed raw keycodes in module.c I was able to find out that blocking 0x1d in handle_module_keys prevents the quick menu from being opened, but that also blocks the BGMT_PRESS_SET event for some reason. However, it does not block the BGMT_UNPRESS_SET event so listening for that to start ETTR I could get it to work by also translating the 0x1d key code to a module code. While ETTR is enabled and set to Press SET, the quick menu becomes inaccessible though... would that be preferable to not being able to use SET as a trigger? I can clean up the code and submit a pull request if yes.
#16
General Development / Re: Auto ETTR on EOSM
March 05, 2014, 09:33:17 PM
in auto_ettr_keypress_cbr
if (!display_idle()) return 1;
causes it to stop handling the event when Q/SET is pressed, even though the event gets there correctly with the right codes... this is because when you press that button, the Q menu comes up
if (key == MODULE_KEY_PRESS_SET) {
    NotifyBox(100, "SET PRESSED %d %d %d", AUTO_ETTR_TRIGGER_BY_SET, key == MODULE_KEY_PRESS_SET, key);
}

works before the display_idle check, not after
#17
General Development / Re: Auto ETTR on EOSM
March 05, 2014, 08:58:06 PM
It works for Always ON and HalfS DblClick, Auto Snap and using ETTR with the intervalometer doesn't seem to work, maybe something goes wrong while analyzing the image in image review? (I set it to 2 sec) Also, the Press SET trigger doesn't work since the M has a combined Q/SET button, maybe we can remove this entry for the M.
#18
General Development / Re: Auto ETTR on EOSM
March 05, 2014, 08:25:29 PM
Nope, same behavior, no flickering until I start recording a movie, and flickering stops when recording stops :( If my understanding is right, the evfSetParamInterrupt input is called/spied on when LV is ready to accept new exposure params in the memory addresses?
#19
Quote from: 1% on March 05, 2014, 08:05:25 PM
The iso adjustment dialog is different... it lets you change ISO from the ML menu however. So maybe you found a bug... I speculate that its from there being a lack of "iso_adjustment_active". What does it do on 5DIII?

Maybe the fix would be looking what dialog handler if any exists for the iso menu.

That's right, from the ML menu it works. I also have a shortcut for holding SET and turning the small wheel on top to change ISO, which doesn't work either... might be a little more complicated to listen for that.
#20
General Development / Re: Auto ETTR on EOSM
March 05, 2014, 08:12:42 PM
I tried setting the ISO in all inputs of state 5, no dice... it works when starting to record a movie, but outside of that it doesn't. At least I think I tried it. As far as I know this code should do that:

state-object.c:
   
...
#ifdef EVF_STATE

    if (self == EVF_STATE && old_state == 5)
    {
    int iso = vsync_counter % 2 ? 72 : 96;
    set_frame_iso(iso);
    NotifyBox(1000, "%d", iso);
    }

...


#21
This is another thing I could try my hands on since I have a 6D. Expo override doesn't let me change ISO anymore after enabling it but it displays the correct exposure in LV. Is it the same for you leandroprz?
#22
General Development / Re: Auto ETTR on EOSM
March 05, 2014, 11:48:24 AM
That is useful information, I didn't know what that line was doing in hdr_step() but I couldn't find any other references to that, so it makes sense that the module callback is called from in there.

I did a quick test in hdr_step(), changing the ISO and shutter timer in some intervals and it only works while recording h264. Movie mode and not recording, or photo mode => no dice.


Edit: I moved the same code to the ettr callback and it seems to work there too when recording... I'm not sure why it didn't work yesterday, must have been something I missed
#23
General Development / Re: Auto ETTR on EOSM
March 04, 2014, 11:17:39 PM
I tried that AUTO_ETTR_DEBUG block and I assume those blue dots should be on the diagonal red line? They are all horizontal and when the scene changes they go up and down.

I also tried setting ISO and shutter in each call now, no effect. Just for clarificaion, the Advanced Bracketing/Movie HDR code runs after the vsync hook has been called? What is done in between? It seems to work for those two things and those are not modules with vsync hooks.
#24
General Development / Re: Auto ETTR on EOSM
March 04, 2014, 10:37:04 PM
Quick update to answer those three questions:



Expo override does not fix it.
While HDR video is doing its thing I can not see the changes it should be doing in the dump... I'll try that AUTO_ETTR_DEBUG test now.
#25
General Development / Re: Auto ETTR on EOSM
March 04, 2014, 09:49:10 PM
Thanks for your guidance so far, I did what you suggested:



I'm not really sure what happens there though. I can see where FRAME_ISO, FRAME_APERTURE, FRAME_SHUTTER and FRAME_SHUTTER_TIMER come from but setting FRAME_ISO or FRAME_SHUTTER_TIMER does not seem to have an effect. Every time the digit left of FRAME_BV changes, FRAME_ISO is set to ISO_100 or ISO_800 and you can see it change in the dump for a frame, LV does not seem to be affected though.

It's only smoothing in photo mode, in movie mode or with Expo. Override on it does not smooth the changes. Any other suggestions where I can poke at?