Flash prop

Started by scrax, December 17, 2012, 10:35:07 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

scrax

If someone want to check and edit what i did i'm pushing here my strobo.c/.h : https://bitbucket.org/600Dplus/magic-lantern-finding-flash-prop/commits/all
Permission are the same of the source repo so you can make corrections  ;)
I'm using ML2.3 for photography with:
EOS 600DML | EOS 400Dplus | EOS 5D MLbeta5- EF 100mm f/2.8 USM Macro  - EF-S 17-85mm f4-5.6 IS USM - EF 70-200mm f/4 L USM - 580EXII - OsX, PS, LR, RawTherapee, LightZone -no video experience-

g3gg0

strobo_settings must be an array of size 34 iirc and in prop handler you must memcpy the data into your strobo_settings
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

scrax

Quote from: g3gg0 on December 20, 2012, 12:42:38 PM
strobo_settings must be an array of size 34 iirc and in prop handler you must memcpy the data into your strobo_settings
Googled for memcpy now and come up with this but it's wrong i think  :( :


#include "dryos.h"
#include "strobo.h"

size_t n = 2;
uint32_t strobo_settings[PROP_STROBO_SETTINGS_LEN];
PROP_HANDLER(PROP_STROBO_SETTINGS)
{
    memcpy(buf[STROBO_SETTING_POS], &strobo_settings, n);
}

/** call this function when changing to/from manual flash mode...**/
void strobo_set_status(uint32_t strobo_status)
{
#define STROBO_SETTING_POS (STROBO_SETTINGS_STATUS_POS)
    strobo_settings[STROBO_SETTING_POS] = strobo_status;
    prop_request_change(PROP_STROBO_SETTINGS, &strobo_settings, PROP_STROBO_SETTINGS_LEN);
}
I'm using ML2.3 for photography with:
EOS 600DML | EOS 400Dplus | EOS 5D MLbeta5- EF 100mm f/2.8 USM Macro  - EF-S 17-85mm f4-5.6 IS USM - EF 70-200mm f/4 L USM - 580EXII - OsX, PS, LR, RawTherapee, LightZone -no video experience-

g3gg0


#include "dryos.h"
#include "strobo.h"

uint32_t strobo_settings[PROP_STROBO_SETTINGS_LEN];
PROP_HANDLER(PROP_STROBO_SETTINGS)
{
    memcpy(strobo_settings, buf, PROP_STROBO_SETTINGS_LEN * 4);
}

/** call this function when changing to/from manual flash mode...**/
void strobo_set_status(uint32_t strobo_status)
{
    strobo_settings[STROBO_SETTINGS_STATUS_POS] = strobo_status;
    prop_request_change(PROP_STROBO_SETTINGS, &strobo_settings, PROP_STROBO_SETTINGS_LEN);
}
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

scrax

thanks I've finished now adding all but still can't get this:


addrleng0x290x270x250x230x210x1E0x1C0x1A0x180x170x150x130x110x0E0x0C0x0A0x080x060x040x020x00
800300380022:aa00bc04gghhffdennkmmqqiijjss38oopprrttzz
I think that leng should be 0x30, not 0x22.. what's going on?
I'm using ML2.3 for photography with:
EOS 600DML | EOS 400Dplus | EOS 5D MLbeta5- EF 100mm f/2.8 USM Macro  - EF-S 17-85mm f4-5.6 IS USM - EF 70-200mm f/4 L USM - 580EXII - OsX, PS, LR, RawTherapee, LightZone -no video experience-

g3gg0

cant you add a property handler that permanently checks the size and reports it?
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

scrax

Quote from: g3gg0 on December 20, 2012, 04:46:20 PM
cant you add a property handler that permanently checks the size and reports it?
is bad leaving it at 0x31 even if it's less I suppose? 
I'm using ML2.3 for photography with:
EOS 600DML | EOS 400Dplus | EOS 5D MLbeta5- EF 100mm f/2.8 USM Macro  - EF-S 17-85mm f4-5.6 IS USM - EF 70-200mm f/4 L USM - 580EXII - OsX, PS, LR, RawTherapee, LightZone -no video experience-

a1ex

The length is camera-specific; you can define a maximum length and allocate the array statically, but use the length reported by the prop handler when you call prop_request_change.

I've bricked Marvin's 5D3 with a wrong length value in a prop_request_change call. It was easy to unbrick, only took one hour or so.

Pelican

Wow! I'm working on this too (I want to display the remote flash settings on the info screen), but you were quicker! Congrats!
I'll download your strobo.c and see it.
I want some more readable than a big array, like make a struct for flash settings like lens_info.

But if it is camera dependent we should put it to the platform specific folder instead of src, shouldn't we?
EOS 7D Mark II, EOS 7D, EOS 5, EOS 100 + lenses (10mm to 300mm), 600EX, 550EX, YN600EX x 3
EOScard, EOS DSLR firmwares, ARMu, NiControl, etc.: http://pel.hu/down

scrax

Quote from: Pelican on December 29, 2012, 10:21:46 PM
Wow! I'm working on this too (I want to display the remote flash settings on the info screen), but you were quicker! Congrats!
I'll download your strobo.c and see it.
I want some more readable than a big array, like make a struct for flash settings like lens_info.

But if it is camera dependent we should put it to the platform specific folder instead of src, shouldn't we?
Thank's, I'm stuck now on that, so go on with what you think could be done to make those settings usable.  :)
I suppose like other prop that address is the same and just values are camera specific (for example for wireless flash.)
I'm using ML2.3 for photography with:
EOS 600DML | EOS 400Dplus | EOS 5D MLbeta5- EF 100mm f/2.8 USM Macro  - EF-S 17-85mm f4-5.6 IS USM - EF 70-200mm f/4 L USM - 580EXII - OsX, PS, LR, RawTherapee, LightZone -no video experience-

Pelican

Quote from: scrax on December 29, 2012, 11:23:11 PM
Thank's, I'm stuck now on that, so go on with what you think could be done to make those settings usable.  :)
I suppose like other prop that address is the same and just values are camera specific (for example for wireless flash.)
There are a lot of problem (at least on 7D).
This property only contains data when you are in the Canon flash menu. After that its deleted.
Also when you are in the Canon flash menu, you can see the same data at memory address 7B1A8 and several other places, but when you close the menu then all of them deleted too. I found the property data with memdump in other locations after the menu closed but these adresses changed every time.


Anyway, I fixed all the typos and stuff in the strobo.c/.h so you can compile them and also made a struct to the array.
I can send it to you if you can use it on 600D.


struct flash_info {
   int firing; // 0: enable firing, 1: disable_firing
   int ettl2_meter; // 0: evaluative, 1: average
   int expo_comp;
   int zoom;
   int mode; //E-TTL II, Manual, Multi
   int wireless_func;  // Disable, Ext, Ext (A,B,C), Ext+Int, Ext(A,B,C)+Int
   int wireless_channel; // (1,2,3,4)
   int shutter_sync; // 1st curt., 2nd curt, High Speed
   int multi_freq; // (199 = 0xc7, 1 = 0x1)
   int multi_count; //(hex like before 1 = 0x1 18 = 0x12)
   int internal_output; // Flash power values from 1/1 to 1/128 1/3stop: (2,5,8,a,d,10,12,15,18,1a,1d,20,22,25,28,2a,2d,30,32,35,38)
   int external_output;
   int group_a_output; // 0x00..0x38: 1/1..1/128
   int group_b_output;
   int group_c_output;
};


Another thing about your first post with this
addr   leng   0x29   0x27   0x25   0x23   0x21   0x1E   0x1C   0x1A   0x18   0x17   0x15   0x13   0x11   0x0E   0x0C   0x0A   0x08   0x06   0x04   0x02   0x00
80030038   0022:   aa   00   bc   04   gg   hh   ff   de   nn   k   mm   qq   ii   jj   ss   38   oo   pp   rr   tt   zz

I really don't understand how do you count these numbers.
For example, you positioned the c: flash mode to the 0x25 and actually it is the 0x01
When you see the prop spy data you see this:
80030038 0022: "first longword" "second long word" ... "sixth longword"

Doesn't matter if you see only one zero it is a longword (four bytes) so the byte order is:
03 02 01 00  07 06 05 04  0b 0a 09 08  0f 0e 0d 0c ...
EOS 7D Mark II, EOS 7D, EOS 5, EOS 100 + lenses (10mm to 300mm), 600EX, 550EX, YN600EX x 3
EOScard, EOS DSLR firmwares, ARMu, NiControl, etc.: http://pel.hu/down

scrax

Quote from: Pelican on December 30, 2012, 09:23:16 PM
Doesn't matter if you see only one zero it is a longword (four bytes) so the byte order is:
03 02 01 00  07 06 05 04  0b 0a 09 08  0f 0e 0d 0c ...
Thank's Pelican, now understood a little more why the numbers were not correct. Added to you writing permission on the fork so you can pull your corrections that i'll use for understanding better my errors, if you prefer posting strobo.c/h somewhere i will add them there for reference since I think that probably also 600D has the same problems you found on 7D.
I'm using ML2.3 for photography with:
EOS 600DML | EOS 400Dplus | EOS 5D MLbeta5- EF 100mm f/2.8 USM Macro  - EF-S 17-85mm f4-5.6 IS USM - EF 70-200mm f/4 L USM - 580EXII - OsX, PS, LR, RawTherapee, LightZone -no video experience-

Marsu42

Quote from: Pelican on December 30, 2012, 09:23:16 PM
This property only contains data when you are in the Canon flash menu. After that its deleted.

I'm trying to implement this feature request (switch from hss to 2nd curtain): http://www.magiclantern.fm/forum/index.php?topic=5040.0

But from what you're saying I understand it's impossible to either read or write this property outside the Canon flash menu, so changing anything about the flash from normal shooting is doomed?

peter.scharff

Sorry to crash the party here guys, but I was reading this post with interest, would finding these setting help with implementing a ml dedicated flash menu that is easy to navigate to via a user defined button shortcut ? instead of the long winded approach canon has buried deep within their menus, Canons implementation really breaks my flow while shooting and setting up ratios.

I did a feature request some time ago and a1ex mentioned it wasn't possible as of yet here :

http://www.magiclantern.fm/forum/index.php?topic=3392.msg17775#msg17775

If this now possible could you look at implementing the above request, I'm sure it would be a much loved feature for us that use Flash while shooting,

Thank all :)

Marsu42

Quote from: peter.scharff on April 08, 2013, 09:18:07 AM
If this now possible could you look at implementing the above request, I'm sure it would be a much loved feature for us that use Flash while shooting

I agree - while I can change most settings directly on my "big" Canon flash, some things are better done on the large camera lcd and it's a pita to navigate to say "Group C EC" in the Canon menu structure - and you even cannot link items in the flash menu to the Canon "my menu" :-(

Maybe I'll come around to do it sometime later, but as far as I understand it the flash props aren't completely worked out yet (or they aren't accessible until you're in the Canon flash menu).

nanomad

Quote from: Marsu42 on April 08, 2013, 01:16:04 PM
Maybe I'll come around to do it sometime later, but as far as I understand it the flash props aren't completely worked out yet (or they aren't accessible until you're in the Canon flash menu).
Both things actually  :(
EOS 1100D | EOS 650 (No, I didn't forget the D) | Ye Olde Canon EF Lenses ('87): 50 f/1.8 - 28 f/2.8 - 70-210 f/4 | EF-S 18-55 f/3.5-5.6 | Metz 36 AF-5

Marsu42

Quote from: nanomad on April 08, 2013, 01:30:48 PM
Both things actually  :(

Damn, that's bad news - maybe Canon wants to sell their expensive flashes as the only sane options to have a fast access to the flash settings? The fact alone that you cannot pin flash settings to my menu is strange ... or maybe Canon's whole flash code is just not integrated well as the camera tends to loose some settings (like the flash group modes) on battery changes.

But to be absolutely sure: The gist of it is that the whole thing is doomed since the props aren't there unless you're in the Canon menu, and then you don't need ml anymore to change them, correct?

1%

6D:


*0x77C2C = arg0
_prop_request_change(0x80040014, 0x77c2c, 0x4, arg3) => ret__prop_request_change_FF19A328


The prop changes between evaluative and average... so does mem location.

0x80030038 or PROP_STROBO_SETTING contains values all the time for me. Am I missing something?


Ok... prop is wiped out after playing in the flash settings. But my flash is off the camera and the dialog said as much. So maybe prop shows up only when strobo connected? I hooked up/powered the flash and its back.
* on 600D... that prop has values too at least at the front where I can see with prop browser.

Marsu42

Any news here, anybody did some more research esp. as far as hss on/off goes?

I'd still like to force-switch hss on with ml instead of having to push a button on the flash ... the latter is a major annoyance with Canon because if you forget it after changing batteries the camera stops at x-sync no matter what and simply overexposes all pictures, I've lost a couple of good shots this way.

jondeckerphoto

I'm subscribing to this string. I'm on the hunt for a solution to the second Curtain Sync for non-canon strobe triggers.

jondeckerphoto

After researching this for days before finding the forum, I'm trending towards finding a hardware solution. There's some trigger or electronic feedback that the my Canon flashes give the body that allows 2nd shutter sync that I'm hoping can be remedied with a dongle, if this software solution you-all are working on isn't feasible.

dragos

Hi guys, did you manage to find a workaround to the second curtain sync? This thing is driving me crazy. Got a 6D , have to use it underwater with a non-canon flash and i dont have enough space in the housing for any kind of trigger... Thank you very much