Todd, with help from symbol germany i have now solved the locking problem: is was not SysBatterieInfo. It is a 'Bug' (or call it an undocumented feature!) in the (Symbol)-PalmOS for the SPT1700/1740. You can test it by yourself with the Scanndemo (Barcode) in the normal SPT 1700-Rom-Image. Change the time to a few minutes befor midnight. Put the SPT in the cradle (single or 4-slot) Start the Scandemo. Turn the SPT manual off (with the powerbutton). Wait till some minutes after midnight (for SPT-time). Turn the terminal on -> it is looked Put the batterie out and in -> now the scandemo is working again (after turning the spt on). The locking only apears when in an aplication the scanner is on, the spt is in the cradle, the spt is turn off manually (not with PowerTimeout) befor midnight and turn on after midnight. The only solution is to turn of the scanner on an poweroff-key and turn it on again on an LateWakeup-key (but NOT(!!!) at the LateWakeup at midnight). So i don't need the HrwBatteryLevel anymore. It is an interesting feature of the spt17xx, isn't it? Thomas Werner E-Mail: [EMAIL PROTECTED] -----Urspr�ngliche Nachricht----- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von Todd Augsburger Gesendet: Mittwoch, 18. Juli 2001 21:15 An: Palm Developer Forum Betreff: HrwBatteryLevel Thomas, We've been using SysBatteryInfo every 30 seconds for a very similar purpose (display) without a problem. Are you _SURE_ that's where the problem lies? I've not heard of any bugs relating to it. We use: static void DisplayBattery() { SysBatteryKind Kind; Boolean PluggedIn; Byte Pct; SysBatteryInfo (false,NULL,NULL,NULL,&Kind,&PluggedIn,&Pct); // draw battery outline if (PluggedIn) { // draw "pluged in" } else { // draw percentage } if (ScanIsPalmSymbolUnit()) { if (Kind == sysBatteryKindLiIon) // calculate point at which scanning will fail for SPT1700 else // calculate point at which scanning will fail for SPT1500 // draw to mark scan failure level } } If you are _determined_ to use HrwBatteryLevel, my guess is that you'd have to use the SysAToDCalibrationTokenType table to convert to voltage, then use the sysBattVoltageCurve table to convert to percentage. But that's what SysBatteryInfo is good for, so why reinvent the wheel? Todd Augsburger [EMAIL PROTECTED] Roller Organs http://www.bright.net/~allmax/index.htm >Subject: Re: HrwBatteryLevel >From: "Thomas Werner" <[EMAIL PROTECTED]> >Date: Tue, 17 Jul 2001 16:28:22 +0200 >X-Message-Number: 13 > >Hi Todd, > >i my project the customer wish to see the battery level in nearly every >form. I have used/use SysBatteryInfo to get this info (and to test if the >SPT is in the cradle). But there is/was a problem: if you call >SysBatterieInfo many times (as i have done; every 10 seconds) you get a >(memory?) problem (i don't know if this is a PalmOS or SymbolPalmOS-problem; >I get this info from Symbol england and USA). After same days the SPT locked >(you can't do anythings with it) and you have to put out the batterie and >put it in again (no reset needed!). It looks like the SPT freezes (same with >display on!) and the only PowerOnButton is a batterie out-and-in. > >So i changed the cradle-check to HrwDockStatus (every 10 seconds), and call >SysBatterieInfo only every 15 minutes (or more). So far there was no problem >with the program, but i wish to change the SysBatterieInfo to >HrwBatterieLevel (if there is no memory-problem with this one). So i have to >know what the return of HrwBatterieLevel is. > > >Thomas Werner >E-Mail: [EMAIL PROTECTED] > >>Von: [EMAIL PROTECTED] >>[mailto:[EMAIL PROTECTED]]Im Auftrag von Todd >>Augsburger >>Gesendet: Dienstag, 17. Juli 2001 14:36 >>An: Palm Developer Forum >>Betreff: Re: HrwBatteryLevel >> >> >> >>Thomas, >> >>I have no experience with HrwBatteryLevel, but have found SysBatteryInfo to >be sufficient for battery level info on the Symbol SPT1700. Is there a >specific need? > >I have found via experience that the Symbols will scan above 10% with >Lithium batteries (as on a SPT1700), and 25% with standard batteries (as on >a SPT1500). > >I'll share code if it's applicable to your need. > >Todd Augsburger >[EMAIL PROTECTED] >Roller Organs >http://www.bright.net/~allmax/index.htm > > >>Subject: problem with LateWakeupNotification >>From: "Thomas Werner" <[EMAIL PROTECTED]> >>Date: Mon, 16 Jul 2001 19:35:09 +0200 >>X-Message-Number: 33 >> >>... >> >>System: Symbol SPT1700 - PalmOS 3.5.2 (latest version from Symbol). >> >>Another question: Did sameone know what the return from HrwBatteryLevel >>meens (i get 255 at 100% BatteryLevel)? I haven't found any Docu for the >>Hrw-functions. >> >> >>Thanks for your help, >> >>Thomas Werner [EMAIL PROTECTED] ---------------------------------------------------------------------- -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
