Commit Graph

20768 Commits

Author SHA1 Message Date
Lucas De Marchi 872b255384 AP_HAL: Add interface for I2CDevice
This is a new interface to replace I2CDriver in future, when all drivers
are converted.
2016-02-16 19:49:08 -02:00
Lucas De Marchi 0eb450d379 AP_HAL: Add interface for I2C/SPI devices
These interfaces are intended to abstract I2C and SPI devices for
drivers.
2016-02-16 19:49:08 -02:00
Lucas De Marchi 2e60e1b1f2 AP_HAL: utility: Add OwnPtr implementation
This is very similar to std::unique_ptr, but doesn't require including
the <memory> header which pulls lots of c++ headers and cause problems
with nuttx headers. It's header-only. It contains an explanation on what
it solves, how to use and unit tests.
2016-02-16 19:49:08 -02:00
Lucas De Marchi ae5da864e7 mk: make PX4, QURT and QFLIGHT use wrapper cstddef 2016-02-16 19:49:08 -02:00
Lucas De Marchi e1ae79688d AP_Common: add directory to add missing C/C++ symbols
Add a cstddef header to allow using std::nullptr_t with those toolchains
that don't provide it. The idea is to make these platforms to use our
wrapper header (see https://gcc.gnu.org/onlinedocs/cpp/Wrapper-Headers.html)
and then we add the missing bits to the header.
2016-02-16 19:49:08 -02:00
Tom Pittenger 7fda3ba178 mk: fix SITL windows build
fixes https://github.com/diydrones/ardupilot/issues/3586
2016-02-15 16:42:06 -08:00
Julien Beraud c2db6bfb9d AP_Param: Fix warning
Cast to the original type to use get function.
Still a hack but better than casting a pointer to an object which
memory mapping we are not supposed to know
2016-02-15 15:48:35 -02:00
Lucas De Marchi f4bc5c60ba mk: px4: replace cp -f with cp
-f is only needed for rm because it fails when the file being removed
doesn't exist. cp doesn't need it.
2016-02-15 13:36:28 -02:00
Peter Barker 529a0166d5 mk: px4: correct manipulation of files
- remove useless file copy
 - replace rm/cp idiom with cp -f
2016-02-15 13:35:43 -02:00
Tom Pittenger 92fea608f3 Rover: add item_reached_msg to GUIDED 2016-02-14 16:12:56 -08:00
Tom Pittenger 786d14cd3c AP_RangeFinder: For LightWareSerial, write 'd' to support more devices 2016-02-14 16:05:50 -08:00
Andrew Tridgell b76aff2dcb AP_Arming: allow unconfigured GPS in SITL arming checks
the SITL GPS does not implement the needed protocol negotiation
2016-02-15 07:49:19 +11:00
Lucas De Marchi 7debd14683 AP_HAL_Linux: Scheduler: remove unused _in_io_proc 2016-02-12 23:42:34 -02:00
Lucas De Marchi fbb3bb2fd0 AP_HAL_Linux: Scheduler: remove unused _timer_event_missed 2016-02-12 23:42:34 -02:00
Lucas De Marchi f39a6745d1 Global: remove unused _timer_pending from scheduler 2016-02-12 23:42:34 -02:00
Lucas De Marchi 0ad436c337 AP_HAL_Linux: Scheduler: bring back scheduler table
Use a scheduler table to list threads' properties in a single place.
2016-02-12 23:42:34 -02:00
Lucas De Marchi a1b62b4984 AP_HAL_Linux: Scheduler: use PeriodicThread
Some tasks were not accounting for the time to execute the tasks. Now
that we are using the infra from PeriodicThread all of them are.
2016-02-12 23:42:34 -02:00
Lucas De Marchi 48e81c8589 AP_HAL_Linux: Thread: add PeriodicThread helper
This is a helper class to run a single periodic function like the ones
used in the scheduler.
2016-02-12 23:42:34 -02:00
Lucas De Marchi 860d5aaf84 AP_HAL_Linux: Scheduler: move rpcmem initialization to setup phase
This was the only piece remaining in the timer thread that was used only
to setup the thread.
2016-02-12 23:42:34 -02:00
Lucas De Marchi 0282ebb8ff AP_HAL_Linux: add method to check caller same as thread 2016-02-12 23:42:34 -02:00
Lucas De Marchi e3beef0f77 AP_HAL_Linux: Scheduler: remove unused parameter 2016-02-12 23:42:34 -02:00
Lucas De Marchi 2b61eaf9f2 Global: remove {begin,end}_atomic from scheduler
These are never used and largely not implemented.
2016-02-12 23:42:34 -02:00
Lucas De Marchi 9aa49cda93 Global: remove system_initializing() from scheduler
This is not used anymore.
2016-02-12 23:42:34 -02:00
Lucas De Marchi 9cf9fc152b AP_HAL_Linux: use pthread's barrier instead of polling
Use pthread's barrier so we don't keep waking up threads with possibly
higher priority during initialization phase.

This also synchronizes all of them to a single point. With the previous
approach it was possible (but unlikely) that a thread hadn't reach the
synchronization point when main thread signalize "system initialized".
2016-02-12 23:42:34 -02:00
Lucas De Marchi 2b0e214168 AP_HAL_Linux: Scheduler: move synchronization to common method 2016-02-12 23:42:34 -02:00
Lucas De Marchi 66e6cd60d8 AP_HAL_Linux: Thread: allow to override run method 2016-02-12 23:42:34 -02:00
Lucas De Marchi a183ff8d32 AP_HAL_Linux: Scheduler: use Thread abstraction 2016-02-12 23:42:34 -02:00
Lucas De Marchi 3e0a83ede9 AP_HAL_Linux: add Thread abstraction class 2016-02-12 23:42:34 -02:00
Lucas De Marchi 5e9b45ebc2 AP_HAL_Linux: Scheduler: make microsleep() public
This will be used outside of scheduler class.
2016-02-12 23:42:34 -02:00
Andrew Tridgell 8ecf54bf75 Plane: use throttle slew when in quadplane assisted flight
this prevents a sudden throttle change on a petrol motor when
transitioning
2016-02-13 11:38:33 +11:00
Tom Pittenger 12fab6c59a AP_GPS: save cfg only when needed
added GPS_SAVE_CFG param option 2
2016-02-12 15:33:33 -08:00
Tom Pittenger 18163bd01f AP_GPS_UBLOX: save cfg only when needed
added GPS_SAVE_CFG param option 2
2016-02-12 15:33:18 -08:00
Michael du Breuil 55e64b3622 AP_GPS: u-blox: copy paste typo in a #else 2016-02-12 15:33:08 -08:00
Michael du Breuil 217a06322b AP_GPS: u-blox: don't throw 5hz update warnings if no fix
5hz update warnings are only valid if you have a fix, without a fix it adds load
to the GPS without any benefit. Our _5hz time messages are depenend upon GPS fix
time which isn't available yet
2016-02-12 15:32:41 -08:00
Tom Pittenger da01ceee53 AP_TECS: change order of update_speed() so it's not using the previous EAS_dem
bug reported by @NUAAFLY https://github.com/diydrones/ardupilot/issues/1547
2016-02-12 13:23:02 -08:00
Tom Pittenger afe9f544e5 AP_TECS: remove incorrect comment about TECS running at 5Hz, it runs at 10Hz. 2016-02-12 13:04:11 -08:00
Tom Pittenger a280396645 Plane: nonfunctional change, comment only. Units were in old in comment 2016-02-12 12:14:38 -08:00
Tom Pittenger c837fbca2f Plane: 3/3 new param TECS_LAND_SRC for Land Sink Rate Change
// @Description: When zero, the flare sink rate (TECS_LAND_SINK) is a fixed sink demand. With this enabled the flare sinkrate will increase/decrease the flare sink demand as you get further beyond the LAND waypoint. Has no effect before the waypoint. This value is added to TECS_LAND_SINK proportional to distance traveled after wp. With an increasing sink rate you can still land in a given distance if you're traveling too fast and cruise passed the land point. A positive value will force the plane to land sooner proportional to distance passed land point. A negative number will tell the plane to slowly climb allowing for a pitched-up stall landing. Recommend 0.2 as initial value.
2016-02-12 11:39:27 -08:00
Tom Pittenger b38e27cadc AP_SpdHgtControl: 2/3 Land Sink Rate Change 2016-02-12 11:39:12 -08:00
Tom Pittenger 67ce22660e AP_TECS: 1/3 new param TECS_LAND_SRC for Land Sink Rate Change
// @Description: When zero, the flare sink rate (TECS_LAND_SINK) is a fixed sink demand. With this enabled the flare sinkrate will increase/decrease the flare sink demand as you get further beyond the LAND waypoint. Has no effect before the waypoint. This value is added to TECS_LAND_SINK proportional to distance traveled after wp. With an increasing sink rate you can still land in a given distance if you're traveling too fast and cruise passed the land point. A positive value will force the plane to land sooner proportional to distance passed land point. A negative number will tell the plane to slowly climb allowing for a pitched-up stall landing. Recommend 0.2 as initial value.
2016-02-12 11:38:40 -08:00
Tom Pittenger 8ac6343730 Plane: removing mission_cmd in TECS and making it bool is_landing
this is reverse-thrust cleanup suggested by Tridge
2016-02-12 11:22:59 -08:00
Tom Pittenger e40bba3d13 AP_TECS: removing mission_cmd in TECS and making it bool is_landing
this is reverse-thrust cleanup
2016-02-12 11:08:47 -08:00
Tom Pittenger 215ecb6b71 AP_SpdHgtControl: removing mission_cmd in TECS and making it bool is_landing 2016-02-12 10:59:35 -08:00
Lucas De Marchi bac29be0b7 AP_Common: remove warnings from headers
Let the warning flag be added by the build system and not when/if the
header AP_Common.h is included. Both waf and make were already updated
to contain these warnings. Besides being in the wrong place, with
clang++ we actually can't add "-Wno-" definitions in build system
because we enable all of the in the header with -Wall.
2016-02-12 20:41:30 +11:00
Lucas De Marchi 517a7f0f35 mk: add missing warnings from AP_Common.h
Copy the missing warnings from AP_Common.h and reorder the warnings to
be more clear on intent. This will later let us remove the warnings from
the header.
2016-02-12 20:41:29 +11:00
Lucas De Marchi a01b933cb9 waf: add missing warnings from AP_Common.h
Copy the missing warnings from AP_Common.h and reorder the warnings to
be more clear on intent. This will later let us remove the warnings from
the header.
2016-02-12 20:41:29 +11:00
Andrew Tridgell 6515a15843 mavlink: submodule update 2016-02-12 20:39:20 +11:00
Tom Pittenger a0755a84e7 AP_TECS: change param TECS_LAND_SPDWGT default from +1 to -1 2016-02-12 20:36:18 +11:00
Andrew Tridgell 358dcd56e8 mk: put FMUv4 bootloader in ROMFS for Pixracer 2016-02-12 20:36:18 +11:00
Michael du Breuil 726bf110cc AP_GPS: update save_cfg description
Saving config is not expected to work on a LEA-6H based on user reports, so the parameter should warn of this
2016-02-12 00:37:05 -08:00