Commit Graph

35 Commits

Author SHA1 Message Date
Grant Morphett 8e69b66cf0 Rover: added the VIBE logging to the Dataflash logs. 2016-04-05 15:41:53 +10:00
Tom Pittenger 92fea608f3 Rover: add item_reached_msg to GUIDED 2016-02-14 16:12:56 -08:00
Andrew Tridgell eed575886c APMrover2: update for changed AP_Camera API 2016-01-29 09:19:43 +11:00
Dario Lindo Andres f731a0dc53 APMrover2: Added precise camera trigger logging
included update_trigger function
added camera trigger precise time mark
detect camera feedback pin status
added support for TRIGGER MSG
corrected according to defines.h
2016-01-29 09:19:43 +11:00
Siddharth Bharat Purohit 53d3e7dc61 Rover: wire up accel calibrator for Rover 2015-12-29 10:46:35 -08:00
Andrew Tridgell 7daab1ee62 Rover: convert to Hz based task table 2015-12-27 14:57:24 +09:00
Andre Kjellstrup 80f19aefc7 APMrover2: Camera options for better camera control
All on one because they would not pass autotest if split up.
2015-12-18 18:16:11 +11:00
Caio Marcelo de Oliveira Filho ee073787c8 Rover: use millis/micros/panic functions
Instead of going through 'hal' then 'scheduler', use directly the AP_HAL
functions. Besides removing indirection that is not necessary for such
functions, this patch ends up reducing the code size in the call sites.

For example, building ArduCopter for PX4 with this change (compared to
before introduction of the functions) yields almost 3k bytes of code
size.

    # ArduCopter build before the functions (1b29a1af46)
       text	   data	    bss	    dec	    hex	filename
     895264	   2812	  62732	 960808	  ea928	/.../px4fmu-v2_APM.build/firmware.elf

    # ArduCopter build after this patch
       text	   data	    bss	    dec	    hex	filename
     892264	   2812	  62732	 957808	  e9d70	/.../px4fmu-v2_APM.build/firmware.elf

A later patch will remove the unused functions in the Schedulers.
2015-11-20 12:26:14 +09:00
Grant Morphett bbbbd07935 Rover: GPS fix to ensure we only look at new GPS messages 2015-11-11 13:39:39 +11:00
Grant Morphett 3636b53313 Rover: Implementation of the ARMING functionality 2015-11-11 13:39:38 +11:00
Grant Morphett 2d1745ab6a Rover: Implemented the HOME state update from Plane 2015-11-11 13:39:38 +11:00
Lucas De Marchi 20c6ffc5e3 Replace use of UARTDriver::printf_P() with UARTDriver::printf()
This also starts to show warnings on places that were already using
wrong printf format strings.
2015-10-30 14:35:25 +09:00
Lucas De Marchi 831d8acca5 Remove use of PROGMEM
Now variables don't have to be declared with PROGMEM anymore, so remove
them. This was automated with:

    git grep -l -z PROGMEM | xargs -0 sed -i 's/ PROGMEM / /g'
    git grep -l -z PROGMEM | xargs -0 sed -i 's/PROGMEM//g'

The 2 commands were done so we don't leave behind spurious spaces.

AVR-specific places were not changed.
2015-10-30 14:35:16 +09:00
Lucas De Marchi 2c38e31c93 Remove use of PSTR
The PSTR is already define as a NOP for all supported platforms. It's
only needed for AVR so here we remove all the uses throughout the
codebase.

This was automated with a simple python script so it also converts
places which spans to multiple lines, removing the matching parentheses.

AVR-specific places were not changed.
2015-10-30 14:35:04 +09:00
Caio Marcelo de Oliveira Filho 06b2c966c1 APMrover2: implement HAL::Callbacks
Also removes includes for each board since they are not necessary
anymore.
2015-10-21 09:16:09 +11:00
Caio Marcelo de Oliveira Filho 2e464a53c2 AP_HAL: make code not depend on concrete HAL implementations
The switching between different AP_HAL was happening by giving different
definitions of AP_HAL_BOARD_DRIVER, and the programs would use it to
instantiate.

A program or library code would have to explicitly include (and depend)
on the concrete implementation of the HAL, even when using it only via
interface.

The proposed change move this dependency to be link time. There is a
AP_HAL::get_HAL() function that is used by the client code. Each
implementation of HAL provides its own definition of this function,
returning the appropriate concrete instance.

Since this replaces the job of AP_HAL_BOARD_DRIVER, the definition was
removed.

The static variables for PX4 and VRBRAIN were named differently to avoid
shadowing the extern symbol 'hal'.
2015-10-21 09:16:07 +11:00
Siddharth Bharat Purohit b8a9f9ebc5 APMrover2: implement on-board compass calibration for APMrover 2015-09-03 16:59:14 +10:00
Peter Barker 6e3687f8af Rover: DFMessageWriter; ability to trickle messages out to DF 2015-09-03 15:20:20 +10:00
Gustavo Jose de Sousa d6778fbf53 APMrover2: use function name for AP_Scheduler task name
That makes it easier to identify tasks when debug is enabled in AP_Scheduler.
2015-09-01 20:22:18 +10:00
Gustavo Jose de Sousa 30ffd0cbd2 APMrover2: use designated initializers for tasks structs
Makes code less prone to break build and semantics (e.g., when a new field is
added).
2015-09-01 20:22:18 +10:00
Stewart Loving-Gibbard a315b980bf Rover: Moving to RSSI library for reading various kinds of RSSI, with the possibility of adding more.
* Retains ability to read from Analog Pin
* Adds ability to read RSSI from PWM channel value as is done in OpenLRSng, EazyUHF, and various other LRS.
* Handles any type of RSSI that provides RSSI values inverted - i.e. when the low value is the best signal and the high value is the worst signal.
* Has different key names from all existing RSSI parameters to provide for a clean break and easier distinguishing.
* Existing parameters are marked as obsolete
2015-08-29 08:05:59 +10:00
Grant Morphett 92a7a3e6ff Rover: Lets put Rover into BETA - v2.2.51
I also made myself the maintainer - ssshhh - don't tell Tridge.
2015-08-06 17:13:30 +10:00
Grant Morphett 5044189ac9 Rover: scheduler remaining time loop calc made common
Just making the improved scheduler loop remaining time calculation in line with
Plane and Copter.
2015-08-05 15:31:44 +09:00
Grant Morphett 224d45000b Rover: fixed a bug going into guided and rover still moving
When the rover goes into guided mode it sets the current location as
the guided point to goto.  If the rover is stationary when this
happens no problem.  If however the rover is still rolling (say going
from AUTO to GUIDED) then the rover would go past its guided position
and get confused and begin to circle it.  This change resolves that issue.
2015-07-30 12:41:02 +10:00
Grant Morphett 873e6c8e29 Rover: Doubled the rate at which read_control_switch is called.
As the previous commit as doubled the number of reads required to
confirm that the mode change switch has been changed this means it
will halve the speed it changes at.  So we double the rate at which we
read it to keep things consistent.
2015-07-22 21:26:37 +10:00
Randy Mackay 14561f04b0 Rover: log IMUDT 2015-07-14 13:31:58 +09:00
Lucas De Marchi 8f74d7d982 APMrover2: use ARRAY_SIZE macro 2015-07-07 07:56:29 +10:00
Lucas De Marchi b9b921fc38 Rover: stop using alias FUNCTOR_BIND_VOID 2015-06-04 13:37:37 +09:00
Andrew Tridgell 530c9c988f Rover: removed unused pragmas 2015-06-01 18:05:59 +10:00
Andrew Tridgell 7d51817716 Rover: fix for scheduler API change 2015-05-26 14:33:43 +10:00
Lucas De Marchi 2f5314a1a6 APMrover2: use functor macros
Functor is not yet being used but let's make is macro fallback to the
previous Delegate implementation for easy of transition between the two.
2015-05-26 13:46:54 +10:00
Lucas De Marchi e24c5349c8 APMrover2: cleanup in tabs and trailing whitespace
While doing other changes, fix the coding style of this file so the
commits are more readable.
2015-05-26 13:46:51 +10:00
Andrew Tridgell 3a28811909 Rover: removed remaining warnings from PX4 build 2015-05-21 07:48:50 +10:00
Andrew Tridgell b47a09b709 Rover: fixed build of .cpp files 2015-05-21 07:48:49 +10:00
Andrew Tridgell 2b6835d187 Rover: rename all .pde files to .cpp files 2015-05-21 07:48:49 +10:00