Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 112

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 112

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 112

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 112

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 112

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 112

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 112

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 112
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3368: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3370: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3371: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3372: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
OrbWorks Community Forum • View topic - Sleep Timer Help

Sleep Timer Help

Discuss PocketC for CE (including Desktop Edition)

Postby Glasswalker on Sun Apr 20, 2003 3:06 pm

Hello, Just a quick question, I searched the messageboard for this one but nothing was found...

I have a program with a module that handles a realtime clock that times events in a round robbin tournament... It handles data collection and other info...

The problem is this needs to run unattended while the device is on battery power... And the sleep timer keeps shutting the machine off...
This is a problem... because all processing pauses till it is turned back on, and there is a gap in the timing and data collection which breaks everything...

I need a way to reset the "sleep timer" on the machine so that it never sleeps as long as my program is running...

I know you can do that in the palm version, but how do I do it on wince?

Also... on a side note... I noticed that my backlight kicks out whenever certain dialogs pop up (alerts mainly). Is there a way to fix this too?

Thanks
Glasswalker
 
Posts: 47
Joined: Wed Mar 21, 2001 12:18 am
Location: Canada

Postby Glasswalker on Sat Apr 26, 2003 12:04 pm

Does anybody know what to do here? this is important...
Glasswalker
 
Posts: 47
Joined: Wed Mar 21, 2001 12:18 am
Location: Canada

Postby KOU on Sat Apr 26, 2003 2:58 pm

Sorry if I misunderstood your question.

If the device is shutting down automatically, it is either battery or the setting.

You can change the shutdown setting in control panel. Probably "Power Management". (sorry, I'm using Japanese PocketPC)

If it is shutting down because of low battery, there will be no way to stop it.
If you are constantly using the CPU, it will be impossible to save the battery power.
When battery is low, it automatically shutdown the device.

KOU
KOU
 
Posts: 92
Joined: Mon Mar 18, 2002 8:04 pm
Location: USA

Postby KOU on Sat Apr 26, 2003 3:00 pm

>>Also... on a side note... I noticed that my backlight kicks out whenever certain dialogs pop up (alerts mainly). Is there a way to fix this too?
Back light setting was on "contrast and brightness setting" in control panel.
Again, I'm using Japanese PocketPC. (Cassiopeia E700)

I don't know how to change it in program, but I am sure that this setting is in registry.

KOU
KOU
 
Posts: 92
Joined: Mon Mar 18, 2002 8:04 pm
Location: USA

Postby Mickle on Sat Apr 26, 2003 4:00 pm

Generate keyboard events to keep device from auto-suspending:
Code: Select all
#define VK_NONAME       0xFC
#define KEYEVENTF_KEYUP 0x2

#include "/PocketC/winuser.h" // or pcheader.h

#define TIMERID 100

main()
{
   settimer(TIMERID, 10000);
   keyevent(VK_NONAME, 0, KEYEVENTF_KEYUP, 0);
   while (1)
   {
      sleep(0);
      switch (event(0)) {
         case PM_TIMER:
            switch (timerid()) {
               case TIMERID: keyevent(VK_NONAME, 0, KEYEVENTF_KEYUP, 0); break;
            }
            break;
      }
   }
}
Mickle
 
Posts: 48
Joined: Wed Apr 17, 2002 1:22 am
Location: Russia

Postby Glasswalker on Sat Apr 26, 2003 10:24 pm

Thanks Mickle....

Kou:
The problem with the shutdown is that it has to run for an hour or so each time without interaction... I cannot set the setting on the control panel to anything longer than 10 minutes on my handheld... Also... I know it is not battery that is shutting it down, because it is on a fresh charge... and my battery can run (using the CPU full tilt, and using the backlight on full) for 10 hours easily... and it shuts off after the first few minutes...

Also: about the backlight...
The setting in the control panel for backlight is set to 1 minute... But it will change from on to off when I get an alert, or a confirm dialog box, even if it is after only 10 seconds... Also since I am interacting with the system regularly, it should never turn the backlight off, but it does... EVERY time there is an alert or confirm box... and sometimes when there is other dialogs...

Anyway... thanks for the help mickle... I was considering synthesizing keystrokes, but was unsure if that would work... I will try it. If anyone knows of a better solution then let me know...
Glasswalker
 
Posts: 47
Joined: Wed Mar 21, 2001 12:18 am
Location: Canada

Postby Mickle on Sun Apr 27, 2003 4:17 am

keyevent() must prevent backlight kicks out.
If you use CEAPI library:
SystemIdleTimerReset() instead keyevent() but it has no effect for backlight.
Get/Set settings from program:
Code: Select all
int seconds = 60;
// Set:
SystemParametersInfo(SPI_SETBATTERYIDLETIMEOUT, seconds, NULL, 1) ;
// Get
SystemParametersInfo(SPI_GETBATTERYIDLETIMEOUT, 0, &seconds, 0) ;
Mickle
 
Posts: 48
Joined: Wed Apr 17, 2002 1:22 am
Location: Russia

Postby tutax on Mon Jul 14, 2003 5:56 am

I am not sure if there is a function in CE version, but in Palm OS version of PocketC there is a function like resetaot() which resets the auto off timer.
tutax
 
Posts: 1
Joined: Mon Jul 14, 2003 5:41 am


Return to PocketC for CE

Who is online

Users browsing this forum: No registered users and 0 guests

cron