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
Timothy Scott
d7bb5d46bb
Created new AnalogBattery class
2019-12-05 16:38:04 +01:00
Timothy Scott
bff1df7080
Refactored battery library for multiple instances
2019-12-05 16:38:04 +01:00
Daniel Agar
97c6a28a70
replace unnecessary perf_alloc_once usage
2019-11-30 21:17:15 -05:00
Daniel Agar
dc06e644d8
simulator: fix distance_sensor ORB_ID()
2019-11-30 20:17:17 -05:00
Daniel Agar
c04713f4a8
simulator update orb usage
2019-11-30 15:52:53 -05:00
Julian Oes
a6a8877463
simulator: don't reset battery when disarmed
...
Before this change, the battery percentage is reset to 100% as soon as
the drone is disarmed again. In my opinion it is more realistic if the
batteries don't magically fill up again but stay low.
2019-10-30 15:45:44 -04: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
c284198bec
clang-tidy: partially fix hicpp-use-override
2019-10-28 10:50:31 -04:00
Daniel Agar
c8e59c4e39
parameter_update use uORB::Subscription consistently
2019-09-29 10:49:03 -04:00
Patrick Servello
47e668eb86
simulator and dumpfile fix minor resource leaks
...
* Certain conditional branches returned before closing the file handler.
2019-09-09 13:24:07 -04:00
roangel
e50dd7c364
replay: close replay log file after replay is finished, then exit ( #11264 )
2019-08-28 08:13:50 +02:00
Daniel Agar
2ad12d7977
sensors: create vehicle_angular_velocity module ( #12596 )
...
* split out filtered sensor_gyro aggregation from mc_att_control and move to wq:rate_ctrl
2019-08-06 12:55:25 -04:00
Martina Rivizzigno
aff131774e
simulator mavlink: add horizontal and vertical fov + quaterion orientation
...
to distance sensor
2019-07-15 10:58:00 +02:00
alessandro
fecb32f88d
Parameter for virtual battery in SITL ( #12299 )
...
* New parameter for virtual battery in SITL
* Update src/modules/simulator/simulator_mavlink.cpp
Co-Authored-By: Beat Küng <beat-kueng@gmx.net >
* Updated description for parameter SIM_BAT_MIN_PCT
2019-07-02 15:53:18 +02:00
Julian Oes
d2c824c534
gpssim: don't advertize uninitialized data
...
According to valgrind uninitialized bytes were being advertized.
2019-06-07 17:10:35 -04:00
rfauvet
755eccbe60
simulator: fixing missing declaration
...
The "len" variable was not defined and gave me an error, declaring it as "int" fixed it
2019-06-03 10:02:36 -04:00
Daniel Agar
43e3fc707d
simulator move to PX4Accelerometer, PX4Gyroscope, PX4Magnetometer, PX4Barometer helpers ( #12081 )
2019-05-30 21:07:26 -04:00
Julian Oes
4d7a1afd92
Revert "Revert "simulator: remove hack for diff_pressure noise""
...
This reverts commit 2142459027 .
2019-05-29 08:56:33 -04:00
Julian Oes
9d8015d029
modules/lib: ignore address-of-packed-member
...
For now we need to ignore this warning which GCC 9 shows for the MAVLink
headers.
2019-05-16 13:06:25 +02:00
Daniel Agar
2142459027
Revert "simulator: remove hack for diff_pressure noise"
...
This reverts commit 4a71984f77 .
2019-04-29 10:46:38 -04:00
Julian Oes
4a71984f77
simulator: remove hack for diff_pressure noise
...
The noise for airspeed is now applied on the Gazebo side and we can
remove this hack.
2019-04-28 18:22:21 -04:00
Mark Sauder
74bc6870ed
simulator: uorb and initialization cleanup ( #11825 )
...
* Cherry pick the vehicle_imu PR #9756 src/modules/simulator directory work to submit as standalone PR.
* Modify the accelsim init method mag_report usage to match usage in measure() and mag_measure() methods in the class.
* Incorporate review comments in the accelsim.cpp init() method and also make the same modifications in gyrosim.cpp.
* Delete unneeded mag_report initialization from accelsim init() method.
* Deprecate unneeded measure() call from accelsim.cpp init() and gyrosim.cpp init().
2019-04-16 08:29:53 +02:00
bresch
6c823903bc
Parameter update - Rename variables in modules/simulator
...
using parameter_update.py script
2019-04-03 15:38:50 +02:00
mcsauder
a6315d4e6e
Delete Simulator class subscription vars that are not used and add orb_unsubscribe() calls.
2019-03-18 10:00:39 +01:00
Daniel Agar
b35d048566
cmake enable -Wcast-align and disable per module
2019-03-16 11:47:15 -04:00
mcsauder
d12cec81ba
Add const specifier to remaining methods utilizing mavlink_message_t and similar message pointer types.
2019-03-07 08:22:44 +01:00
mcsauder
278fddb585
Cut case MAVLINK_MSG_ID_ODOMETRY content and paste into handle_message_odometry() method.
2019-03-07 08:22:44 +01:00
mcsauder
3918d0ce0a
Cut case MAVLINK_MSG_ID_VISION_POSITION_ESTIMATE content and paste into handle_message_vision_position_estimate() method. Add const specifier to publish_odometry_topic() method.
2019-03-07 08:22:44 +01:00
mcsauder
c3acd3bad3
Delete unnecessary curly braces in simulator_mavlink.cpp
2019-03-07 08:22:44 +01:00
mcsauder
e43a0bbf1d
Cut case MAVLINK_MSG_ID_RC_CHANNELS content and paste into handle_message_rc_channels() method.
2019-03-07 08:22:44 +01:00
mcsauder
801cbc856e
Cut case MAVLINK_MSG_ID_HIL_GPS content and paste into handle_message_hil_gps() method.
2019-03-07 08:22:44 +01:00
mcsauder
b705bf6b1c
Cut case MAVLINK_MSG_ID_HIL_SENSOR content and paste into handle_message_hil_sensor() method.
2019-03-07 08:22:44 +01:00
mcsauder
a97151feed
Set default set_publlish() argument to true.
2019-03-05 09:16:31 +01:00
mcsauder
0bd5d6caff
Refactor set_publish() logic so that a default false value is not (re)set each loop in simulator_mapvlink.cpp and provide a default argument to set_publish() in simulator.h.
2019-03-05 09:16:31 +01:00
mcsauder
6e0fc150c0
Create Simulator::set_publish() method and Simulator::_publish member variable to allow redefinition of the Simulator::handle_message() prototype to match MavlinkReceiver::handle_message().
2019-03-05 09:16:31 +01:00
Gabriel Moreno
fc7c7ac206
simulator: fix to set system and component IDs as defined in params
...
The simulator had hardcoded component ID and system ID (sysID was 0), ignoring what was set up in the params MAV_SYS_ID and MAV_COMP_ID. This caused an issue with multi-vehicle simulations that that rely on sysID to identify the vehicles.
Signed-off-by: Gabriel Moreno <gabrielm@cs.cmu.edu >
2019-03-03 10:41:47 +01:00
mcsauder
1eced05359
Rename Simulator class private methods names to match snake case of other private class methods.
2019-02-28 19:26:45 +01:00
mcsauder
b0a79996ae
Cut case MAVLINK_MSG_ID_HIL_STATE_QUATERNION content and paste into handle_message_hil_state_quaternion() method.
2019-02-28 19:24:50 +01:00
mcsauder
8b42045546
Cut case MAVLINK_MSG_ID_HIL_OPTICAL_FLOW content and paste into handle_message_hil_optical_flow() method.
2019-02-28 19:24:50 +01:00
mcsauder
24e55e4d4d
Cut case MAVLINK_MSG_ID_DISTANCE_SENSOR content and paste into handle_message_distance_sensor() method.
2019-02-28 19:24:50 +01:00
mcsauder
411db781eb
Cut case MAVLINK_MSG_ID_LANDING_TARGET content and paste into handle_message_landing_target() method.
2019-02-28 19:24:50 +01:00
Carl Olsson
447e0be250
gpssim: populate s_variance_m_s with 0.25 ( #11521 )
...
Signed-off-by: CarlOlsson <carlolsson.co@gmail.com >
2019-02-24 11:23:28 -05:00
Oleg Kalachev
0b4751d031
simulator_mavlink: fix DISTANCE_SENSOR.covariance field handling
2019-02-22 18:31:27 +00:00
Oleg Kalachev
fbc8d01a7e
Rename distance_sensor.covariance to variance
2019-02-22 18:31:27 +00:00
mcsauder
b5be8d9fd1
Add perf_free() calls orb_unsubscribe and remove delete _instance in the Simulator class destructor.
2019-02-21 08:12:22 +01:00
mcsauder
437a9e0260
Move remaining variable initialization from constructor list and alphabetize/organize methods and vars ordering.
2019-02-21 08:12:22 +01:00
Daniel Agar
d7ba8cc3f0
simulator mavlink don't send_controls() until ready ( #11426 )
2019-02-11 10:50:24 -05:00