what it displays and what i see - General Discussion and Assistance - CHDK Forum

what it displays and what i see

  • 5 Replies
  • 4215 Views
what it displays and what i see
« on: 15 / June / 2011, 22:16:00 »
Advertisements
hey board, nice job bending the machines to our human wishes!

i would like to ask some questions which i have searched but did not find any coherent answer. they are all grouped around the GUI:

1. can i draw on the screen? like a custom grid or something? can i also move the grid lines while photographing (e.g. with buttons or with a.i.)?

2. can i change menus? (layout, structure, fonts, symbols instead of text items). i would like a lightning-quick-2-click-maximum-access to everything from am/pm to format card. just givin' an example for extreme overhaul  :'(

*

Offline reyalp

  • ******
  • 14079
Re: what it displays and what i see
« Reply #1 on: 16 / June / 2011, 00:39:20 »
1. can i draw on the screen? like a custom grid or something? can i also move the grid lines while photographing (e.g. with buttons or with a.i.)?
You can make custom grids: http://chdk.wikia.com/wiki/Grids
You cannot move the grids around interactively on the camera.
Quote
2. can i change menus? (layout, structure, fonts, symbols instead of text items). i would like a lightning-quick-2-click-maximum-access to everything from am/pm to format card. just givin' an example for extreme overhaul  :'(
You cannot change the Canon menus. You can run scripts which send keypresses to the canon firmware, but selecting and running a script takes several steps so it's not likely to be helpful in this case.

CHDKs own menu can be customized with the user menu http://chdk.wikia.com/wiki/CHDK_User_Manual#User_Menu but you can't add your own custom items without hacking the code.

You can have a look through the user manual http://chdk.wikia.com/wiki/CHDK_User_Manual to get an idea what is available.
Don't forget what the H stands for.

Re: what it displays and what i see
« Reply #2 on: 16 / June / 2011, 11:56:39 »
thank you! my fault i didn't read the manual (i started with the developer guides) but maybe this way we can have a more laid-out discussion. also, i am deeply sorry but this month by no means i could chew thru that manual. next month will be fortunately different.

back to our sheep, I have some more questions (maybe we could compile an u.i. faq out of this discussion... if we get somewhere):

1. okay, i'm happy to see that grids are in their golden age; are these grids

1. a. made (compiled? interpreted as a script?) by CHDK or they are just passed as-is (.grd contents) to the firmware? or are they written in the frame buffer of the lcd? at all, does it make a difference? i would say yes but maybe i'm mistaken
1. b. if i have, for example, 20 .grd's, can these be changed dynamically or interactively (thru CHDK, with and without menu)?

2. well, i looked into it, and from what i understand, the canon menu stays always the same and the chdk menu runs in parallel on-demand. now i am really confused. let's go from easy to hard

2. a. can the chdk menu's background be transparent? in all the screenshots i see it black clear now
2. b. can the chdk menu take up another appearance than the one resembling the canon settings menus? like, for example, the canon left-side menu you use while shooting (although not that fancy... but a column of letters on the left side, their status coded by colors... or something like that)? i have seen one chdk case where the timer icon on the left-side-menu operated the bracketing controls, but it's still unclear to me.
2. c. can the chdk menu be hierarchical? e.g. having 4 options on top level, every option taking you in a sub-menu with 1-4 options?
2. d. how is the chdk menu built up? is it necessarily baked into chdk or you could have something like an xml parser in ubasic which reads it from the card?

sorry for the stupid question but i really don't have a camera on which i could try it out and while the manual is written smoothly, it seems to me that it's more of a description of how it works, not why it works.

3. buttons

3. a. so, when i am in live view and i push any button (from the ones on the cross, let's say), it will always send the event to the canon firmware? or does the chdk trap it and (you) decide where to send it?
3. b. in case of "yes, it always goes to the firmware," can scripts only be executed by the chdk menu?
3. c. do the button combinations and length of the keypresses depend on the firmware in any way or it's a clean and straightforward system?

4. what do you mean by custom items?

i think i will do some mock-ups to have a clearer view of what we are talking about  ::)
« Last Edit: 16 / June / 2011, 12:16:19 by 220canovolts »

Re: what it displays and what i see
« Reply #3 on: 16 / June / 2011, 12:01:06 »
btw the AiAf face tracker thingie looks like it's updating constantly, is that just a procedure for which, if you find the address, you could then invoke at will? i am really bent on make the u.i. nice and in the next 2 years i have no intention to work for nikanon  :xmas


*

Offline reyalp

  • ******
  • 14079
Re: what it displays and what i see
« Reply #4 on: 16 / June / 2011, 17:57:48 »
1. a. made (compiled? interpreted as a script?) by CHDK or they are just passed as-is (.grd contents) to the firmware? or are they written in the frame buffer of the lcd? at all, does it make a difference? i would say yes but maybe i'm mistaken
CHDK parses the file and uses the results to draw the grid directly on the frame buffer. (see core/gui_grid.c)
Quote
1. b. if i have, for example, 20 .grd's, can these be changed dynamically or interactively (thru CHDK, with and without menu)?
Not without using the menu. If you are willing / able to hack the C code, that shouldn't be too hard to add. I wouldn't expect such a feature to be added to mainstream CHDK without a compelling use case.

Allowing CHDK scripts to manage CHDK gui widgets is something I'd like to see eventually.
Quote
2. well, i looked into it, and from what i understand, the canon menu stays always the same and the chdk menu runs in parallel on-demand.
Correct. CHDK draws directly on the bitmap overlay framebuffer. This is the same framebuffer the Canon UI uses, but the two are pretty much completely unaware of each other. This also means that CHDK displays frequently get trashed when the canon firmware updates.

Quote
2. a. can the chdk menu's background be transparent? in all the screenshots i see it black clear now
2.
Yes, the bitmap palette includes transparent entries. That is only transparent with respect to the live view, not other UI elements (canon or CHDK).
Quote
b. can the chdk menu take up another appearance than the one resembling the canon settings menus?
The CHDK menu looks like what you see in the screenshots. You could hack it to appear differently in the C code.

Quote
2. c. can the chdk menu be hierarchical? e.g. having 4 options on top level, every option taking you in a sub-menu with 1-4 options?
The CHDK menu is hierarchical. See core/gui.c and core/gui_menu.c
Quote
2. d. how is the chdk menu built up? is it necessarily baked into chdk or you could have something like an xml parser in ubasic which reads it from the card?
The entire CHDK core is smaller than some XML parsers, we definitely don't do anything like that ;)

The CHDK UI is entirely in C code (see core/gui*), although some things like position, color, on/off state are stored in the CFG file. As I said above, adding some UI capability to lua would be a nice to have (I wouldn't try to do it in ubasic, because ubasic is brain dead)

Quote
3. a. so, when i am in live view and i push any button (from the ones on the cross, let's say), it will always send the event to the canon firmware? or does the chdk trap it and (you) decide where to send it?
3. b. in case of "yes, it always goes to the firmware," can scripts only be executed by the chdk menu?
In CHDK "alt" mode, key presses go to CHDK, not the canon firmware. In non-alt mode, key presses generally go to the original firmware. Script generated key presses always go to the original firmware.

Quote
3. c. do the button combinations and length of the keypresses depend on the firmware in any way or it's a clean and straightforward system?
It is neither clean nor straightforward. It is a hack created by pocking binary guts of a completely undocumented system, with minimal insight into how that system was supposed to work, done by many different people with varying levels of understanding and programming ability. You can look at core/kbd.c and platform/<camera>/kbd.c to get a better idea of how it works.

Quote
4. what do you mean by custom items?
Without changing the C code, you cannot create new menu items with arbitrary functions
Quote
i think i will do some mock-ups to have a clearer view of what we are talking about  ::)
If you want to make sense of this, you will need a camera that supports CHDK. You can pick up an old low end A series for very little.

A very careful study of the source code might also suffice, but even for an experience programmer actually understanding how it all fits together without some amount of trial and error would be quite challenging.
Don't forget what the H stands for.

Re: what it displays and what i see
« Reply #5 on: 16 / June / 2011, 20:25:56 »
so basically the answer is that i need to modify chdk itself and use lua. and learn asm so i can help u guys.

 

Related Topics