Sebastian Domoszlai
b5f37c9fa6
Simplify Battery-related Enum Naming ( #24265 )
...
* Simplify battery-related enum naming
* Fix mistakenly removed string in enum names
* Fix missing renamings
* Update outdated file
* msg: Increase battery_status version since the enum naming was changed
* Revert message version increase
---------
Co-authored-by: Matthias Grob <maetugr@gmail.com >
2025-02-28 11:42:40 -09:00
Alex Klimaj
1043aebf5d
analog_battery: add option for filter ( #23987 )
2025-01-03 16:01:16 +01:00
Alexander Lerach
f47719d397
Manual idle current setting ( #23914 )
...
* Added param to overwrite analog idle current measurement
* Fixed topic handling
2024-11-11 11:40:30 +01:00
BazookaJoe1900
4d83badba1
fix files tags on the header comments ( #23564 )
2024-09-19 09:25:18 +03:00
Matthias Grob
1c25d65a1e
Add missing newline at the end of files
2023-12-01 13:11:00 -05:00
Jukka Laitinen
9449ed6e66
Add support for protected build in drivers, systemcmds and modules Kconfig
...
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae >
2022-02-18 07:58:58 +01:00
Beat Küng
b6607a7b78
battery_status: do not publish if no voltage channel is defined
...
This is the case for boards with digital readout, like v5x, but still
enable the battery_status module for external analog driver options.
An alternative would be to not run battery_status depending on config.
2022-02-09 16:54:45 -05:00
Daniel Agar
daa925137c
boards: move default battery calibration defines to parameter defaults
2022-01-10 09:49:36 -05:00
Matthias Grob
ee3bc6673a
AnalogBattery: make update variables const
2021-12-07 21:06:51 +01:00
Matthias Grob
fdc40880d0
battery: separate out publishing from updating
...
to allow smart battery drivers to use the battery class and
filling in additional information in case it makes sense.
2021-12-07 21:06:51 +01:00
Matthias Grob
e70d70468a
battery: pass voltage and current by setter
2021-12-07 21:06:51 +01:00
Matthias Grob
39641494da
battery: pass connected flag in by setter
2021-12-07 21:06:51 +01:00
Matthias Grob
38d23f5345
battery: pass priority in by setter
2021-12-07 21:06:51 +01:00
Matthias Grob
f9fc9a9af6
battery: pass source in by constructor
2021-12-07 21:06:51 +01:00
Matthias Grob
b965923c08
battery: fetch throttle value inside of class
2021-12-07 21:06:51 +01:00
Shubham Shah
6576e1fda9
Update battery_status.cpp
2021-10-09 19:39:43 -04:00
Peter van der Perk
d5e3e9a7bc
[Kconfig] Decompose Kconfig, now each module has its own Kconfig
...
Which is better for versioning and decomposability
2021-10-07 10:09:01 -04:00
Hamish Willee
c1f588806a
BAT_ADC_CHANNEL should point to BAT1_I_CHANNEL
2021-08-17 19:35:11 -04:00
Daniel Agar
c5b1fe86ca
delete deprecated BAT_* parameters
2021-07-08 22:19:12 -04:00
David Sidrane
a3593d7d07
analog_battery:Use inttytpes
2021-06-16 17:07:47 +02:00
Daniel Agar
967d35a6b6
rate limit most parameter_update subscriptions
...
- parameter updates can be quite expensive because they trigger nearly all modules to reload all of their parameters immediately
- limit modules from updating faster than once per second
2021-01-10 21:09:15 -05:00
Daniel Agar
016ee6ea59
battery: fix duplicate uORB publish and minor cleanup
...
- run battery_status module on adc_report publications rather than a fixed schedule
2020-10-05 11:01:58 -04:00
Matthias Grob
d06425d131
analog_battery: fix missing stdio include
...
This was not a problem before because battery.h
included the adc driver and implicitly snprintf
was defined through there.
2020-09-01 10:25:03 +02:00
Oleg
172a4e3557
batterry_status: fix checking default v_div
2020-08-30 11:09:59 -04:00
Oleg
a18f22bd91
batterry_status: fix checking default a_per_v
2020-08-27 21:47:27 -04:00
Daniel Agar
942eb83184
sensors: keep legacy params active (BAT_V_DIV/BAT_A_PER_V) for QGC SITL
...
- fixes https://github.com/PX4/Firmware/issues/15505
2020-08-12 11:57:34 -04:00
Matthias Grob
88c21337fa
Make all battery sensor drivers report their sample interval
...
To make use of the time abstraction in the leaky integrator.
2020-05-25 11:04:24 +02:00
Julian Oes
f650b91718
battery: check source param inside battery lib
...
This moves the handling of the BAT%d_SOURCE param inside of the battery
library. Users of the library now pass the source instead of the flag
whether to publish. The battery library then checks if the source is
selected using the param and publishes accordingly.
Since we removed the strange system_source flag, we now need to look at
all batteries in commander.
For current estimation - I think - it makes sense to sum them up.
2020-04-06 15:56:54 +02:00
SalimTerryLi
dc8e775d8f
ADC: replace ioctl with uorb message ( #14087 )
2020-03-20 11:23:32 +01:00
Timothy Scott
4c1adc088f
Removed all swapping of uORB instances
2020-02-21 22:38:26 -08:00
Daniel Agar
21a8d7db7f
WorkItem modules: Run() shouldn't be public
2020-01-22 12:03:03 -05:00
Daniel Agar
d19f18d40b
linux boards (ocpoc, bbblue, navio2) replace custom adc drivers with simple px4_arch implementation
2020-01-07 14:04:13 -05:00
Daniel Agar
de9e4dda4c
battery: delete unused armed
2019-12-12 09:48:45 -05:00
Timothy Scott
11bbc8ae34
Code cleanup
2019-12-12 04:39:53 -08:00
Timothy Scott
993fa5bd37
Refactored to work with new battery_status module
2019-12-05 16:38:04 +01:00
Beat Küng
1371887578
board config: add define for adc voltage scaling
2019-11-21 08:19:59 +01:00
Beat Küng
4b290c4903
voltage & current scaling: use px4_arch_adc_dn_fullcount() instead of 4096
...
Fixes the scaling on h7 boards (the ADC has 16 bits resolution).
2019-11-21 08:19:59 +01:00
Beat Küng
3198610f85
src/platforms: move all headers to platforms/common/include/px4_platform_common
...
and remove the px4_ prefix, except for px4_config.h.
command to update includes:
for k in app.h atomic.h cli.h console_buffer.h defines.h getopt.h i2c.h init.h log.h micro_hal.h module.h module_params.h param.h param_macros.h posix.h sem.h sem.hpp shmem.h shutdown.h tasks.h time.h workqueue.h; do for i in $(grep -rl 'include <px4_'$k src platforms boards); do sed -i 's/#include <px4_'$k'/#include <px4_platform_common\/'$k/ $i; done; done
for in $(grep -rl 'include <px4_config.h' src platforms boards); do sed -i 's/#include <px4_config.h/#include <px4_platform_common\/px4_config.h'/ $i; done
Transitional headers for submodules are added (px4_{defines,log,time}.h)
2019-10-30 11:48:47 +01:00
Daniel Agar
94de12ef19
sensors: own BAT_V_DIV and BAT_A_PER_V params ( #13299 )
...
- this is currently necessary for the QGC power setup gui, but should be reverted in the future
- fixes #13292
2019-10-28 16:03:05 -04:00
Daniel Agar
6a0f5249f8
sensors: split out analog battery handling to new standalone battery_status module
2019-10-21 13:40:23 -04:00