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
[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 - FEvent() and Serial IO

FEvent() and Serial IO

A PocketC native palm library offering native forms and assorted utilities

Postby mikek66 on Tue Apr 22, 2003 2:19 pm

My app basically consists of a bunch of buttons on a resource form that accept user input while it performs serial I/O with a remote device. The serial I/O needs to happen pretty much constantly...checking for input from the user in between messages. The problem I'm having is when I'm sending and receiving messages to the remote, it seems like my pen events aren't getting queued. I'm checking for button events using FEvent(0) but the events don't seem to be there. If I change this to FEvent(10) or higher than I occasionally get a button press, but the results are far from acceptable.

While the communication is happening if I touch a button it turns black then white so I think it's being registered, but when my app gets back around to doing an "E = FEvent(0)" I don't find events matching any of my control ID's.

I guess my questions are...
1) does the palm device (or PToolBox lib) queue multiple form button presses?
2) does it work while sending/receiving serial data?

Any advice would be greatly appreciated,

Mike Kemper
mikek66
 
Posts: 3
Joined: Tue Apr 22, 2003 2:03 pm
Location: USA

Postby jstadolnik on Tue Apr 22, 2003 4:41 pm

Make sure that you are using version 7.5.3 of the PToolboxLib. Early v7.x.x versions are prone to event dropping.

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">
1) does the palm device (or PToolBox lib) queue multiple form button presses?
<hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote">

The events are queued.

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">
2) does it work while sending/receiving serial data?
<hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote">

It may be that the PocketC serial calls are eating events. I'll have to check with Jeremy on this.

Are you using the serwait() function? I would suspect that there could be problems with this one because it likely pulls from the event queue (in effect stealing the events from the Fevent calls).

Also, make sure that you are using the current version of the PToolboxLib (v7.5.3).

Joe

The PToolboxLib guy.
http://www.geocities.com/retro_01775/PToolboxLib.htm
jstadolnik
 
Posts: 1741
Joined: Wed Dec 06, 2000 3:34 am
Location: USA

Postby mikek66 on Tue Apr 22, 2003 5:38 pm

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by jstadolnik</i>
<br />Make sure that you are using version 7.5.3 of the PToolboxLib. Early v7.x.x versions are prone to event dropping.
<hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote">

I wasn't...I am now...seems to be the same results.

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">
It may be that the PocketC serial calls are eating events. I'll have to check with Jeremy on this.

Are you using the serwait() function? I would suspect that there could be problems with this one because it likely pulls from the event queue (in effect stealing the events from the Fevent calls).
<hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote">

I was using serwait(), but I recoded the serial routines to work without it and it still doesn't work properly. If I use Fevent(0) then it pretty much doesn't get any button presses. If I change it to something like Fevent(100) then occasionally it catches them, but it's pretty bad...something like 1 in 5 get caught.

I'm now using sersend() to send the message, and serdata() and serrecv() to receive the reply. If they are responsible for eating my events is there another way to work around them like maybe hooking PocketC's event handler somehow?

Thanks for the reply,
-Mike
mikek66
 
Posts: 3
Joined: Tue Apr 22, 2003 2:03 pm
Location: USA

Postby jstadolnik on Tue Apr 22, 2003 7:03 pm

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">
I'm now using sersend() to send the message, and serdata() and serrecv() to receive the reply. If they are responsible for eating my events is there another way to work around them like maybe hooking PocketC's event handler somehow?
<hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote">

Nope. I sent Jeremy an email asking if the serial functions can be gobbling up the events. We'll see what he says about it...

Joe

The PToolboxLib guy.
http://www.geocities.com/retro_01775/PToolboxLib.htm
jstadolnik
 
Posts: 1741
Joined: Wed Dec 06, 2000 3:34 am
Location: USA

Postby jstadolnik on Tue Apr 22, 2003 8:11 pm

Also, make sure that you are using version 5.0.3 of PocketC. Older versions can also steal events from Fevent().

Joe

The PToolboxLib guy.
http://www.geocities.com/retro_01775/PToolboxLib.htm
jstadolnik
 
Posts: 1741
Joined: Wed Dec 06, 2000 3:34 am
Location: USA

Postby jstadolnik on Wed Apr 23, 2003 2:29 am

The word from Jeremy is that the following PocketC functions can take events from Fevent(): alert, confirm, puts, gets*, wait*, getc, sleep, deepsleep, event, and exit.

Could you be using puts() or wait()?

Joe

The PToolboxLib guy.
http://www.geocities.com/retro_01775/PToolboxLib.htm
jstadolnik
 
Posts: 1741
Joined: Wed Dec 06, 2000 3:34 am
Location: USA

Postby mikek66 on Wed Apr 23, 2003 10:21 am

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by jstadolnik</i>
<br />The word from Jeremy is that the following PocketC functions can take events from Fevent(): alert, confirm, puts, gets*, wait*, getc, sleep, deepsleep, event, and exit.

Could you be using puts() or wait()?
<hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote">

The only function in your list that I'm calling is the sleep function. I thought that it was necessary for saving batteries.

I also rearranged the code so that the events are checked just before every serial operation and that improved performance dramatically. It still seems to miss some events, but it's much more usable.

Thanks again for your help
Mike
mikek66
 
Posts: 3
Joined: Tue Apr 22, 2003 2:03 pm
Location: USA


Return to Pocket Toolbox

Who is online

Users browsing this forum: No registered users and 0 guests

cron