When we send a command to any sysid or any compid, we need to match an
ack from a specific sysid or compid. If we don't do that, we keep
sending retransmissions and eventually time out.
The int32 param COM_ARM_AUTH is mapped to a packed struct. However, this
struct was not actually packed (anymore) and therefore the values were
applied incorrectly.
I fixed this by applying the packed attribute. By using a union with a
int32_t I could rid of the warning about address-of-packed-member.
Mavlink does not correctly forward messages that have the target_system or target_component routing fields in the message.
Some investigation revealed that the Mavlink::forward_message function is incorrectly utilizing the mavlink_msg_entry_t.target_system_ofs and mavlink_msg_entry_t.target_component_ofs fields. These offsets are intended to be used relative to the start of the message payload. But, as implemented, these offsets are incorrectly being used relative to the start of the message. This pull-request corrects that problem.
I also correctly made use of the mavlink_msg_entry_t.flags field to determine if a message contains a target_system or target component field. The previous check incorrectly assumed that they would always be non-zero if present.
Signed-off-by: Mark Owen <maowen801@gmail.com>
The file writer thread could get into a state where it blocked infinitely
on pthread_cond_wait() (or rather until the logging stops).
This is very rare and the following conditions must be met:
- the buffer is almost empty (<4KB filled), so that the writer thread does
not write anything.
- an fsync call is scheduled (happens once every second)
- the fsync call takes a long time (several 100ms), during which time the
complete log buffer fills up.
The main thread would then get into dropout state where it does not call
_writer.notify() anymore.
Notifying the writer thread on every loop update of the main thread fixes
that.
It does not increase resource usage.
* Add kdevelop to gitignore
* Add test stubs
* Rename px4_add_gtest to px4_add_unit_gtest
* Add infrastructure to run functional tests
* Add example tests with parameters and uorb messages
* Fix memory issues in destructors in uORB manager and CDev
* Add a more real-world test of the collision prevention
Also remove crosstrack P controller that produces overshoots when the
acceptance radius is large (crosstrack error is suddenly large at
waypoint switch).
This new airspeed module does:
-runns an airspeed validator for every airspeed sensor present, which checks measurement validity and estimates an airspeed scale
-selects another airspeed sensor if for the current one a failure is detected
-estimates airspeed with groundspeed-windspeed if no valid airspeed sensor is present
-outputs airspeed_validated topic
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>