Commit Graph
19 Commits
Author SHA1 Message Date
Lorenz Meier fa5071b3c5 Remove module.mk files to prevent confusion of adopters upgrading 2015-10-06 11:23:20 +02:00
James Goppert 1d6b31d196 Switch to cmake build system. 2015-09-07 20:37:45 -04:00
Mark Charlebois 1ca05aaa64 orb_advert_t changed to void * and checks changed to nullptr
The existing orb_advert_t use thoughout the code sometimes tries
to treat it as a file descriptor and there are checks for < 0
and ::close calls on orb_advert_t types which is an invalid use
of an object pointer, which is what orb_advert_t really is.

Initially I had changed the -1 initializations to 0 but it was
suggested that this should be nullptr. That was a good recommendation
but the definition of orb_advert_t had to change to void * because
you cannot initialize a uintptr_t as nullptr.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-27 14:42:49 -07:00
Mark Charlebois a734fc96d1 extensive orb_advert_t fixes
The calls to orb_advertise were being mishandled throughout the code.
There were ::close() calls on memory pointers, there were checks
against < 0 when it is a pointer to a object and values larger than
0x7ffffffff are valid. Some places orb_advert_t variables were
being initialized as 0 other places as -1.

The orb_advert_t type was changed to uintptr_t so the pointer value
would not be wrapped as a negative number. This was causing a failure
on ARM.

Tests for < 0 were changed to == 0 since a null pointer is the valid
representation for error, or uninitialized.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-27 14:41:33 -07:00
Mark Charlebois 9758112e31 Use px4_config.h instead of nuttx/config.h
Modified code to use OS independent header file for config settings.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 10:55:41 -07:00
Randy Mackay 04863dc2d1 batt_smbus: add ioctl to return batt capacity
Also use full charge capacity instead of design capacity so that an old
battery's capacity will appear as lower than its original capacity but
it will still report 100% charged after charging
2015-04-10 14:17:25 +09:00
Randy Mackay 4e83f43ea3 batt_smbus: remove usleep
Also restore I2C address after performing command line search for
devices
2015-03-19 12:09:40 +09:00
Randy Mackay 23075f6dab batt_smbus: calculate current discharged 2015-03-19 12:09:31 +09:00
Randy Mackay ca4adebe11 batt_smbus: remove debug 2015-03-02 15:30:06 +09:00
Randy Mackay d57dd250b9 batt_smbus: reverse reported current
smart batteries report a negative current when being discharged
2015-02-20 16:57:23 +01:00
Randy Mackay d80a00fad1 batt_smbus: disable if no batt 10seconds after startup 2015-01-21 22:23:17 +01:00
Lorenz Meier 3c99becada SMBus battery driver: Remove console print on normal block read operation 2015-01-04 11:04:55 +01:00
Lorenz Meier 1106e0bff3 SMBus battery driver: further code style fixes 2015-01-04 11:02:53 +01:00
Lorenz Meier 17e4e283d8 SMBus battery driver: Stylize according to style guide 2015-01-04 10:58:45 +01:00
Randy Mackay c4e3577476 batt_smbus: add search 2014-12-30 13:43:23 +09:00
Randy Mackay a952a18b42 batt_smbus: add get_PEC 2014-12-30 13:43:21 +09:00
Randy Mackay 65bcd0e122 batt_smbus: minor format fix 2014-12-30 13:43:18 +09:00
Randy Mackay b8e818b387 batt_smbus: remove sleep before I2C transfer 2014-12-30 13:43:13 +09:00
Randy Mackay df9547e9d3 batt_smbus: driver for smart battery 2014-12-30 13:43:11 +09:00