Ok here is the situation...
I made an apps that communicate with a security system via serial port.
It is used by installation personnel to configure the security system.
But here is the problem, when the user is done, it must it the little
house icon to go back to the palm OS launcher, like any program...
but as soon as I hit the button, I can take as long as 1m30s to
the palm to show the launcher.
Can someone tell me if I do something wrong...
I have added some comment to tell what does the lines I added to the
original code
Ho, by the way... It take a millisecond to do this code...
The proof.. the system beeps when it returns in normal mode
and as soon as I click the button the system beep...
static void AppStop(void)
{
StarterPreferenceType prefs;
// Send END to the System pannel
// This simply tell the pannel, we are done with the configuration, so
that it return in normal
// operation mode
if(Serial_Opened == false)
{
// This simply open the serial with everything it needs
if( Open_Serial())
{
// This build the string that need to be sent to the system
BuildMessage(MT_END, 0x00, 0x00);
// That send the message built previously
SendMessage(ToSendMessage, ToSendMessage[0]);
// wait a second
Sleep(1);
//close the serial
Close_Serial();
}
}
else
{
BuildMessage(MT_END, 0x00, 0x00);
SendMessage(ToSendMessage, ToSendMessage[0]);
Sleep(1);
Close_Serial();
}
// Write the saved preferences / saved-state information. This data
// will be backed up during a HotSync.
PrefSetAppPreferences (appFileCreator, appPrefID, appPrefVersionNum,
&prefs, sizeof (prefs), true);
// Attendre un peu avant de finir le tout
// wait a second for the comm to finish
Sleep(1);
// Fermer le serial
// close serial port
if( Serial_Opened == true)
{
Close_Serial();
}
// set back the auto-off ...
// Remettre le auto-off sur le palm.
SysSetAutoOffTime(OldAutoOffDelay);
}
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Patrick Ouellet - Programmeur Sénior
[EMAIL PROTECTED]
Recherche & Devloppement
Les Entreprise Microtec inc.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
One Future, two choices:
Oppose them or let them destroy us!!
Word from a Linux user,
speaking of Micro$oft
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/