View Single Post
Posts: 607 | Thanked: 296 times | Joined on Jun 2008 @ Finland
#75
Originally Posted by 412b View Post
Not sure if it is to be posted here, but partly it is right.
I've almost finished python daemon for working with BME server socket, so there will be no need in hald-addon-bme. Thanks for BME Protocol, but unfortunately it has some errors in message structs descriptions and black spots:
Code:
struct emsg_battery_info_reply {
    uint32      status; // I guess it's the reply status, 0 means all is OK, -1 means error
    uint32      a;
    uint32      flags;
    uint16      c;
    uint16      // Battery capacity. Have no another battery, so check needed, but seems to be it.
    uint16      temp;   // Battery temperature measured in Kelvin 
    uint16      instaneous_battery_voltage; // Instantaneous battery voltage (mV)
    uint16      // Lowest TX-Off voltage (mV)
    uint16      // Lowest TX-On voltage (mV)
    uint16      // Closed switch battery voltage (mV)
    uint16      // Open switch battery voltage (mV)
    uint16      k;
    uint16      l;
};

struct emsg_bme_bulk1_reply {
   uint32     status; // I guess it's the reply status, 0 means all is OK, -1 means error
   uint32     unknown1;
   uint32     unknown2;
   uint32     unknown3;
   uint16     // Elapsed model time (min)
   uint16     // Tx-Off battery voltage (mV)
   uint16     // Tx-On battery voltage (mV)
   uint8      // Battery power state
   uint8      //  Batmon4 internal flags2
   uint8      // Batmon4 internal flags3
   uint8      // Charging method
   uint16     // Present Phi value (mV)
   uint16     // Present Delta Phi value (mV)
   uint8      // Charging mode 
   uint8      // Previous charging mode 
   uint8      // Charger type
   uint8      // Previous charger type
   uint16     // Instantaneous battery voltage (mV)
   uint8      // Number of charger checks (0-9) ?
   uint8      // Charger recognition state
   uint16     unknown4;
   uint16     // Instantaneous charger current (mA)
   uint16     unknown5;
   uint16     // Charging time (min)
   uint16     // Average Vchar (mV)
   uint16     // Equivalent DC charger current (mA) 
   uint8      // Battery full flag (0 or 1)
   uint8      // HW Cha PWM value L ??
   uint8      // Cha PWM value L ??
   uint8      unknown6;
   uint16     // Open switch battery voltage (mV)
   uint16     // Closed switch battery voltage (mV)
   uint16     unknown7;
};
Next thing is to think about calculating the battery percentage, 'cause there are enough values to use. And I guess I really should write it in pure C with D-Bus messaging. Any ideas and help appreciated.

And Advanced Power (and Monitor) are fully ported to Mer now. Next release will be fully working on Maemo and Mer.
I'd like to see it working with other battery monitors too, since i use other desktop-environments too ("normal battery monitors [KDE and GNOME ones]" with hald-addon-bme can only show 25%,50%,75% and 100%)
__________________
Touch Book .. do not waste you money on it.