sensors: minor cleanup, bugs fixed, use unsigned long for discharged integration to avoid rounding errors.

This commit is contained in:
Anton Babushkin
2013-11-10 15:51:47 +04:00
parent 20db1602d7
commit e8487b7498
2 changed files with 33 additions and 27 deletions
+3 -3
View File
@@ -54,8 +54,8 @@
struct battery_status_s {
uint64_t timestamp; /**< microseconds since system boot, needed to integrate */
float voltage_v; /**< Battery voltage in volts, filtered */
float current_a; /**< Battery current in amperes, filtered, -1 if unknown */
float discharged_mah; /**< Discharged amount in mAh, filtered, -1 if unknown */
float current_a; /**< Battery current in amperes, -1 if unknown */
float discharged_mah; /**< Discharged amount in mAh, -1 if unknown */
};
/**
@@ -65,4 +65,4 @@ struct battery_status_s {
/* register this as object request broker structure */
ORB_DECLARE(battery_status);
#endif
#endif