S110 splash screen showing only 1.5 sec.? - General Discussion and Assistance - CHDK Forum

S110 splash screen showing only 1.5 sec.?

  • 9 Replies
  • 5662 Views
S110 splash screen showing only 1.5 sec.?
« on: 21 / March / 2014, 09:26:44 »
Advertisements
Hi,

if I power on my S110 the CHDK splash screen shows up only for 1.5 seconds.
So I am not really able to read it.

Is 1.5 sec. the 'normal' duration?

2 x IXUS 860IS 100c
2 x Powershot S110 103a

Re: S110 splash screen showing only 1.5 sec.?
« Reply #1 on: 21 / March / 2014, 09:36:11 »
You really need to start studying the code :-

http://trac.assembla.com/chdk/browser/trunk/core/gui.c

Line 28.

Re: S110 splash screen showing only 1.5 sec.?
« Reply #2 on: 21 / March / 2014, 09:58:59 »
 Hi microfunguy,

I already study the code, but study and understanding is different.

So line 28 shows:

Code: [Select]
// splash screen time
29 #if defined(OPT_EXPIRE_TEST)
30 #warning OPT_EXPIRE_TEST enabled
31 #define SPLASH_TIME 40  // Displays for 3.2 seconds
32 #else
33 #define SPLASH_TIME 20  // Displays for 1.6 seconds
34                         // gui_redraw called every 4th loop of core_spytask which has 20ms delay per loop = (4*20) * 20 = 1600ms
35 #endif
In general I ask myself why the splash screen duration is depnding on this?
A splash screen should always appear that at least one can completely read it - or not?

How should I know what OPT_EXPIRE_TEST is and how/why influences the duration of the splash screen?
OPT_EXPIRE_TEST just exists but is documented nowhere :(



2 x IXUS 860IS 100c
2 x Powershot S110 103a

Re: S110 splash screen showing only 1.5 sec.?
« Reply #3 on: 21 / March / 2014, 10:41:42 »
OK, I have not studied the CHDK code in detail, including this bit.

What I would do, is simply search for all occurrences of that OPT and then study the code were it is used.
It will be defined in a header (.h) file.

Re: S110 splash screen showing only 1.5 sec.?
« Reply #4 on: 21 / March / 2014, 10:44:40 »
I have just done that and it is a compile-time option in buidconf.inc and makefile.inc.

It is used in gui.c.

Re: S110 splash screen showing only 1.5 sec.?
« Reply #5 on: 21 / March / 2014, 10:46:08 »
In buildconf.inc it describes it as "# make the build show an "expired" notice after N days. To encourage users of test builds to provide feedback"

If that OPT is set, the splash-screen is displayed for 3.2 seconds to allow time for reading the compiler warning.

See http://gcc.gnu.org/onlinedocs/gcc-4.8.1/cpp/Diagnostics.html
« Last Edit: 21 / March / 2014, 10:52:02 by Microfunguy »

Re: S110 splash screen showing only 1.5 sec.?
« Reply #6 on: 21 / March / 2014, 10:51:00 »
Hi microfunguy,

yes OPT_EXPIRE_TEST is used for expiration message I studied this already.

But

- what has the expiration message to do with duration of splash screen?
- why splash screen duration is half if OPT_EXPIRE_TEST is not defined?

This is a typical example why it is so difficult to understand the code.
Reading the code is easy, but undertsanding not.



2 x IXUS 860IS 100c
2 x Powershot S110 103a

Re: S110 splash screen showing only 1.5 sec.?
« Reply #7 on: 21 / March / 2014, 10:52:53 »
Our posts crossed, see edited version above.

Re: S110 splash screen showing only 1.5 sec.?
« Reply #8 on: 21 / March / 2014, 12:51:34 »
If that OPT is set, the splash-screen is displayed for 3.2 seconds to allow time for reading the compiler warning.
Not quite.   Setting the option enables an extended display time of the CHDK logo at startup so that people can read a warning message that they are using an experimental test version.  Reading the compiler warning is seperate from this and occurs at build time.  The #warning is there so that a developer building an install package realizes that it will have the test version warning.

- what has the expiration message to do with duration of splash screen?
The message is added to the splash screen for development builds. 


Quote
- why splash screen duration is half if OPT_EXPIRE_TEST is not defined?
Normally,  the splash screen only appears briefly so that you know CHDK is loaded.  Its not intended to display for long enough that you can actually read all of it.   When you have a test version,  we extend the splash screen duration so that you can actually read the warning text.

Quote
This is a typical example why it is so difficult to understand the code.  Reading the code is easy, but understanding not.
You are more than welcome to create a wikia page documenting all your discoveries for whoever comes next.


Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 14125
Re: S110 splash screen showing only 1.5 sec.?
« Reply #9 on: 21 / March / 2014, 16:33:35 »
How should I know what OPT_EXPIRE_TEST is and how/why influences the duration of the splash screen?
OPT_EXPIRE_TEST just exists but is documented nowhere :(
This is not actually correct, see builconf.inc
# make the build show an "expired" notice after N days. To encourage users of test builds to provide feedback
#OPT_EXPIRE_TEST=

If you grepped the tree as I suggested earlier, you should have found this.  I'm not trying to be a jerk, the reality is CHDK is a big, ugly, poorly documented code base. If you want to work on CHDK effectively, you are going to need to learn how to find stuff and actually take the time required to do so. That doesn't mean you shouldn't ask questions, just that your effort will be better spent learning *how* to find what you want rather than getting an explanation of every little detail.

In general everything with an OPT_ is a compile time option, so if you see one you will want to include the makefiles in your grep.

You could also search the forum for OPT_EXPIRE_TEST, which would get you
http://chdk.setepontos.com/index.php?topic=650.msg104732#msg104732
http://chdk.setepontos.com/index.php?topic=10610.msg104691#msg104691
The second one gives the commit where it was added and an explanation of why it exists.

You could also have found this by search the svn log, or using svn blame on the file where it appears. These are both helpful tools to understand the history of the code. If you use windows, I highly recommend using tortoise. I also recommend grepwin from the same author.
Don't forget what the H stands for.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal