Commit Graph

26775 Commits

Author SHA1 Message Date
Jacob Walser 4465d4ba69 Sub: Add some comments to describe failsafe functions 2017-03-24 16:31:09 -04:00
Jacob Walser 45328f220c Sub: set_leak_status() -> failsafe_leak_check() 2017-03-24 16:31:09 -04:00
Jacob Walser 7859f6426e Sub: Implement battery failsafe 2017-03-24 16:31:09 -04:00
Jacob Walser 6bd05e4bac Sub: failsafe_battery_event() -> failsafe_battery_check() 2017-03-24 16:31:09 -04:00
Jacob Walser 16fedbb9c9 Sub: Consolidate failsafe settings in defines.h 2017-03-24 16:31:09 -04:00
Lucas De Marchi 5809e2465b AP_RPM: replace board ifdef with feature ifdef 2017-03-24 12:06:19 +11:00
Lucas De Marchi f91d23daab AP_HAL: add HAL_PX4_HAVE_PWM_INPUT 2017-03-24 12:06:19 +11:00
Lucas De Marchi 7c246847de AP_HAL_PX4: replace board ifdef with feature ifdef 2017-03-24 12:06:19 +11:00
Lucas De Marchi 7ca9c7a443 AP_HAL: add HAL_HAVE_SAFETY_SWITCH 2017-03-24 12:06:19 +11:00
Lucas De Marchi ef1672befc AP_BoardConfig: replace board ifdef with feature ifdef 2017-03-24 12:06:19 +11:00
Lucas De Marchi d3e9f7ce66 AP_HAL: add HAL_PX4_HAVE_PX4IO 2017-03-24 12:06:19 +11:00
Lucas De Marchi 7f5b551050 AP_HAL: add HAL_PX4_HAVE_MTD_SUPPORT 2017-03-24 12:06:19 +11:00
Lucas De Marchi fab0358a0f build: document special fields in px4 boards 2017-03-24 12:06:19 +11:00
Lucas De Marchi cc7633f272 ArduCopter: replace board ifdef with feature ifdef 2017-03-24 12:06:19 +11:00
Lucas De Marchi c7fc3ffbc4 AP_HAL: add HAL_HAVE_BOARD_VOLTAGE 2017-03-24 12:06:19 +11:00
Lucas De Marchi 37a050eed9 AP_HAL: add comments and allow for board overrides 2017-03-24 12:06:19 +11:00
Lucas De Marchi 2e4e4365d0 AP_InertialSensor: enable fast sampling for aerofc 2017-03-24 12:06:19 +11:00
Lucas De Marchi 1018129ed9 PX4Firmware: submodule update
Enable fast sampling for aerofc's IMU.
2017-03-24 12:06:19 +11:00
Lucas De Marchi 2ff720f99f Frame_params: add default params for Intel Aero RTF 2017-03-24 12:06:19 +11:00
Lucas De Marchi 9a83f05714 AP_BoardConfig: enable voltage monitoring on aerofc 2017-03-24 12:06:19 +11:00
Lucas De Marchi 7c1f255258 AP_HAL_PX4: add pin to monitor battery 2017-03-24 12:06:19 +11:00
Lucas De Marchi 05c5a2ac9b build: add adc driver for aerofc 2017-03-24 12:06:19 +11:00
Lucas De Marchi ca8a9955fd PX4Firmware: update submodule
Implement adc for aerofc
2017-03-24 12:06:19 +11:00
Lucas De Marchi 5787b5a5c5 AP_Compass: IST8310: rename macros
Having "BIT" in the name gives the impression we are using the macro is
the bit position; however they have the values for those actions, not
the bit position. Rename BIT to VAL to be less confusing.
2017-03-24 12:06:19 +11:00
Lucas De Marchi 4bba643abb AP_Compass: IST8310: use variable periodic callback
This is the equivalent of sleep and wait for the conversion time,
after had triggered a new sample request. However it also has the added
benefits of sharing a thread with other sensors on the same bus.

Now we don't read the status register anymore since we have a guaranteed
wait time.
2017-03-24 12:06:19 +11:00
Lucas De Marchi ce1a13aa8f AP_Compass: IST8310: use FSR to reject samples 2017-03-24 12:06:19 +11:00
Lucas De Marchi d84851d8fa AP_Compass: IST8310: improve initialization
- Make sure device is reset while initializing.
 - Give better names to register macros
 - Average X, Y and Z by 16: sensor is internally running at 200 sps
   (theoretical, ~160 pratical). The wait time is ~6msec averaging
   by 16. We do 10msec.
2017-03-24 12:06:19 +11:00
Tom Pittenger c0691afc1f AP_Compass: reject outlier data in IST8310 data by detecting >14bit data 2017-03-24 12:06:19 +11:00
Lucas De Marchi 91dabbe418 AP_HAL_PX4: implement method to ajust periodic callback
Just setting up the periodic callback sampling time on initialization
may not work well for sensors that need to request for a sample with a
bus transaction, sleep and then read the new data. That's because the
function will be kept calling at a periodic rate, while the time in
which we can read the value is not really that sampling time, but rather
the time in which sensor was last read + the time spent in the function
before sending a new sample request.

Instead of creating a new type of thread to handle this case, just
implement the minimal and easy case of updating the period for this
callback, that can only be called from inside the callback function.
2017-03-24 12:06:19 +11:00
Tom Pittenger 8415fde697 AP_Compass: IST8310 chip does not follow right-hand rule format, flip z 2017-03-24 12:06:19 +11:00
Lucas De Marchi b339050e45 AP_Compass: IST8310: account for errors in measurment requests
If we don't recover for errors in the request for new sample, we may get
stuck with no sample anymore. Recover from bad transfers.
2017-03-24 12:06:19 +11:00
Lucas De Marchi 18ba1aa166 gitignore: do not ignore *.d inside PX4 build files
We have files inside a init.d directory which were being ignored due to
the .d suffix.
2017-03-24 12:06:19 +11:00
Lucas De Marchi fd6df40745 ROMFS: do not connect USB for aerofc 2017-03-24 12:06:19 +11:00
Lucas De Marchi 81a9a70910 ROMFS: use different UART for errors in aerofc 2017-03-24 12:06:19 +11:00
Lucas De Marchi 3eb16fd881 build: PX4: install rc.<board-name> as init script 2017-03-24 12:06:19 +11:00
Lucas De Marchi b1b07f4e70 build: make bootloader path relative to ROMFS
Differentiating if the path should be relative to the build dir or the
ROMFS dir based purely on the type of the item is not a good approach.
This prepares the way to have more files on ROMFS with different names
on src and dst.
2017-03-24 12:06:19 +11:00
Lucas De Marchi 7d8bed8a55 ROMFS: standardize board-override script
Standardize on the following sequence for allowing different startup
sequences:

    board-specific file
    etc/rc on microSD card
    etc/rc.txt on microSD card

Also remove comment about MODE variable that is not used by ArduPilot
2017-03-24 12:06:19 +11:00
Lucas De Marchi 8db111e0a0 build: do not add sercon for aerofc 2017-03-24 12:06:19 +11:00
Lucas De Marchi 2349909033 AP_BoardConfig: start mtd driver 2017-03-24 12:06:19 +11:00
Lucas De Marchi da68612f4b AP_BoardConfig: make error function public and static
So it can be used by other parts of the code calling px4_start_driver().
2017-03-24 12:06:19 +11:00
Tom Pittenger fb24a03faf AP_Baro: don't compile drivers for devices that don't use them 2017-03-24 12:06:19 +11:00
Lucas De Marchi 156efd6fec AP_Compass: use IST8310 for aerofc 2017-03-24 12:06:19 +11:00
Lucas De Marchi fad583b259 AP_HAL_PX4: RCOoutput_Tap: map to [ RPMSTOPPED, RPMMAX ] range
When it's not armed we get _esc_pwm_min from the AP_Motors library,
which would cause motors to start spinning.  Map it to start from
RPMSTOPPED so it doesn't spin when it's not armed.
2017-03-24 12:06:19 +11:00
Lucas De Marchi 5e26940070 AP_HAL_PX4: disable safety switch for aerofc 2017-03-24 12:06:19 +11:00
Lucas De Marchi a682bb837a AP_SerialManager: uartA with 460800 baud for aerofc 2017-03-24 12:06:19 +11:00
Lucas De Marchi b1a6b03cbf PX4Firmware: add upload tool to aerofc 2017-03-24 12:06:19 +11:00
Lucas De Marchi d3df9c8d39 build: use dummy tone_alarm on aerofc
This allows us to use tone_alarm in the init script besides the calls
from ArduPilot code.
2017-03-24 12:06:19 +11:00
Lucas De Marchi 721e85c151 PX4Firmware: add dummy tone_alarm
For boards that don't have a tone_alarm.
2017-03-24 12:06:19 +11:00
Lucas De Marchi 20c5e9ec08 Add support for external mag on aerofc 2017-03-24 12:06:19 +11:00
Lucas De Marchi 327de91b5c AP_HAL_Px4: use RCOutput_Tap for aerofc 2017-03-24 12:06:19 +11:00