On Mar 3, 2015, at 11:17 PM, Mark Wieder wrote:

> Peter-
> 
> Actually, BAT0 is a directory, so you want
> 
>        put url "/sys/class/power_supply/BAT0/status" into tStatus
> 
> and what I see on my Thinkpad running linux Mint 17 is status returns one of 
> three states:
> 
> Unknown if the laptop is plugged into the AC adapter
> Discharging if running off the battery power
> Charging if it's (wait for it) charging the battery.

Please clarify: "Unknown" if using the AC adapter, and "Charging" if it's 
charging the battery. How could you be charging the battery if you're not using 
the AC adapter? Is "Unknown" reserved for when you're plugged in and the 
battery is fully charged?

> If I remove the battery and run the laptop off AC power there is no BAT0 
> directory.

OK, so a test for "no such file" is called for.

-- Peter

Peter M. Brigham
pmb...@gmail.com
http://home.comcast.net/~pmbrig


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to