Talk:Battery Monitor (trigger)
From ProxiPedia
[edit] Bug With "Time Until..." Variables
I am having a problem with the battery variables for "Time Until Empty" and "Time Until Full". I have set up two notifications, one for when I go on AC power and the other for when I switch to battery. Each one draws a screen message alerting me to my current battery capacity and telling me the time until full (AC) and the time until empty (battery). Each of these reports either -1 or 0 when I switch power sources. If I wait for a couple seconds and then trigger the task again, I get the right numbers.
Update: I managed to get past the one problem by adding an AppleScript task that delays for 2.5 seconds. That seems to give it enough time to figure out the numbers.However, I've run into a couple new issues.
Firstly, the "Time Until Empty" number is always reported as a negative number.
Secondly, the growl notification for AC power is displayed 2-3 times once the AppleScript delay is added. (Not sure why the number of times varies. After restarting Proxi it changed from 3x to 2x.) If I use the "Screen Message" task instead of Growl, I get the same result -- two screen messages. Nik
- I think I must have developed a bit of a blind spot for this particular problem. Thanks for bringing it to my attention. Although I'm not seeing Time Until Empty as a negative number once the value has been calculated. Also, I'm not certain I want to suppress the trigger until the Time Until Empty and Time Until Full values have been calculated. The trigger is very useful as a notification when the power has been inadvertently remove. Some might want to know about this immediately and I'm not certain how to deal with the unknown values in this situation. Perhaps a checkbox on the trigger that says do not trigger until charge / discharge times are known? --Somegeekintn 11:00, 15 October 2007 (CDT)

