F. Satzger

Elektronik, PC und Technik

Benutzer-Werkzeuge

Webseiten-Werkzeuge


projekte:batterymonitor

Dies ist eine alte Version des Dokuments!


Battery Monitor [stable]

Your lightweight battery status monitor

Nur für Windows! Programmiert in C++ ohne weitere Library (außer Win-API)

see http://www.ohloh.net/p/batmon

What is Battery Monitor?

Battery Monitor is a very small and lightweight tool, which shows your battery status always on top of your screen - but without bugging you!

What are the main features of Battery Monitor?

  • Extremely lightweight - no frameworks needed, only one simple executable
  • Simple, not bothering interface
  • Free open source software
  • Automatic shutdown when running out of battery

Why is there no new release? Is this project abandoned?

No, but for now, I think Battery Monitor does exactly what it was intended to do, so I see no reason why there should be a newer release. If you have another opinion, don't wait contacting me (see at bottom of this page).

Why did you build in an automatic shutdown?

This feature was because of a missing feature in Windows XP. The problem is, that Windows has only a setting to shut down when less then 3% of battery charge remaining. As one of my laptops (an EEE-PC 901) has a very long battery lifetime (~7-9h), 3% can be up to 20 minutes. So I deactivated Windows automatic shutdown and use Battery Monitor instead.

Okay, give me some short usage information!

All right, using Battery Monitor is very simple:

  • Start the BatteryMonitor.exe
  • Now, Battery Monitor makes a small always-on-top window in the upper right corner of your desktop. it looks like this: . The text shows the remaining lifetime.
  • There are 3 different color schemes which could be interesting for you:
    1. Green/Red: The battery is discharging, the ratio green/red shows you visually your batteries status.
    2. Blue/Red: The battery is charging, the ratio is like green/red
    3. Yellow: Battery Monitor has no information about your battery. Are you sure you have one?
  • Important feature: Battery Monitor stays on top of most windows but you can click through the window anyway!
  • Simultaneously, a tray icon is created: This is your „control panel“.
  • When performing a left-click on the tray icon, some additional information is shown.
  • Important: A double right-click on the tray icon closes battery monitor.
  • Important/: Battery Monitor automatically shuts down when you are running out of battery (if lifetime is lower than 5 minutes.). If shutdown was initiated (you'll see a warning), you can stop it by running „shutdown -a“. But don't forget to stop Battery Monitor or it will reinitalize shutdown ;)! Since V1.1 shutdown should be canceled automatically if you plug in A/C source.

How much does Battery Monitor cost and what are my rights/duties?

Battery Monitor is free software, „free as in speech“ (licensed under a BSD-like license) and also „free as in beer“. Full license text.

What are the requirements for Battery Monitor?

Battery Monitor only supports Windows, as Linux doesn't have such a lack of software ;). I could only try it on WinXP by now, but it should work on other Windows versions as well.

What did you use to build Battery Monitor

Only few things: MinGW GCC/G++ 4.5, MSys, windres, QMake w/ QTCreator IDE and Editra(Superseded: Netbeans IDE (C++)) and icons from the public domain Tango Icon Library. And of course a bunch of Windows API calls ;). For creating the documentation, Doxygen was used.

Don't bug me any longer - where do i get it?

I've found a bug, whom should I tell?

Thats not possible…I'm perfect….but in case that….hmmm….. okay ;) You can write an email (see below).

I'm a developer, give me some more infos!

Okay, Battery Monitor only uses Windows API (and of course standard C/C++) features, the whole window management is done using API calls - as well as the query for every information Battery Monitor needs. The status update is done via windows messages using the windows internal timer. You can view the developer's Documentation(also available as PDF File) or directly download the sources}}. They were built using MinGw-Gcc 4.5 with some additional command line parameters: -mwindows -enable-auto-import -static-libgcc -static-libstdc++ Furthermore, you have to (dynamically) link setupapi. With those command line options, you'll get a static linked MinGW Runtime, otherwise one would need to have some additional dll files. Before compiling, you should also run windres -i main.rc -o main.res -O coff to produce a resource file containing all needed icons and version info. Since V1.1, qmake was used as build environment, but it should be no big deal to compile w/o qmake (see annotations above). The .pro-file is included. [[http://tornado.fa-satzger.de/batmon/src10.zip|Old sources (V1.0, better tested) The whole project until V1.0 was done using the free Netbeans IDE, I packed the Netbeans project into the sources distribution so you can start right away. The documentation was done using doxygen. One last annotation: You can define a preprocessor constant named „DEBUG“. This will cause Battery Monitor to show errors instead of simply ignoring them (be careful, this could be annoying…).

Changelog

  • V1.1.0 (beta)
    • Cancelling automatic shutdown
  • V1.0 (stable)
    • first release
    • Basic features included: Tray icon, automatic shutdown, etc
projekte/batterymonitor.1526563371.txt.gz · Zuletzt geändert: 2018/05/17 15:22 von fsatzger