Peter Barker
f90dd0c156
AP_HAL: add simple tests for null-termination
2018-10-21 07:54:30 +11:00
Peter Barker
9923bd1fd2
AP_BattMonitor: use sizeof(array) in place of constant
2018-10-21 07:54:30 +11:00
Peter Barker
21eacc5e31
AP_Arming: account for snprintf now null-terminating strings
2018-10-21 07:54:30 +11:00
Peter Barker
96b5be0e7d
GCS_MAVLink: account for snprintf now null-terminating strings
2018-10-21 07:54:30 +11:00
Peter Barker
4c794ebba3
DataFlash: account for snprintf now null-terminating strings
2018-10-21 07:54:30 +11:00
Peter Barker
de3244e26c
AP_OSD: account for snprintf now null-terminating strings
2018-10-21 07:54:30 +11:00
Peter Barker
33e3d6e254
AP_HAL: Util: make vsnprintf and snprintf always null-terminate
...
The C++ standard indicates these functions always return a
null-terminated string. We should rename these functions if we're not
going to conform to the standards.
From https://en.cppreference.com/w/cpp/io/c/vfprintf :
"Writes the results to a character string buffer. At most buf_size-1
characters are written. The resulting character string will be
terminated with a null character"
We are still not standards-compliant in the case a length of 0 is passed
in, returning 0 where we should return the space that would be required
to store the formatted string.
2018-10-21 07:54:30 +11:00
Phillip Kocmoud
44fb61da37
HAL_ChibiOS: mRo X2.1-777 / hwdef.dat
...
Set proper sensor orientation.
2018-10-21 07:50:44 +11:00
Peter Barker
0142265f67
AP_Mount: make a copy of ID for mavlink_msg_param_set_send
...
The send function is expecting an array of the full length, so passing i
na null-terminated char* may result in uninitialised data (or
information leak)
2018-10-20 10:17:50 +11:00
vierfuffzig
83f4f5c347
AP_BLHeli: add motor pole parameter
2018-10-20 10:15:34 +11:00
Andrew Tridgell
84d7160128
AP_Compass: use new accumulate functions for UAVCAN
2018-10-19 16:03:45 +11:00
Andrew Tridgell
579a84b53e
AP_Compass: use new accumulate functions for AK8963
2018-10-19 16:03:45 +11:00
Andrew Tridgell
55e4b64755
AP_Compass: don't apply offsets twice in SITL
2018-10-19 16:03:45 +11:00
vierfuffzig
5b955333ce
AP_OSD: fix BLHAMPS current divisor
2018-10-19 15:05:53 +11:00
Peter Barker
b276034c60
APM_Control: correct use of incorrect abs functions
2018-10-19 08:46:43 +11:00
Peter Barker
560f17a570
AP_NavEKF3: use union to alias array and struct access to states
...
This avoids creating two pointers of different types to the same memory.
Having two pointers to the same memory can lead to the compiler
optimising code such that a write to one pointer is rearranged to be
either before or after a read from the other pointer depending on
which is deemed faster - not a good outcome.
2018-10-19 08:46:43 +11:00
Peter Barker
3a79ae4eca
AP_NavEKF2: use union to alias array and struct access to states
...
This avoids creating two pointers of different types to the same memory.
Having two pointers to the same memory can lead to the compiler
optimising code such that a write to one pointer is rearranged to be
either before or after a read from the other pointer depending on which
is deemed faster - not a good outcome.
2018-10-19 08:46:43 +11:00
Peter Barker
154d771e6c
AP_Math: correct compilation when running MATH_CHECK_INDEXES
2018-10-19 08:46:43 +11:00
Peter Barker
27e3a89158
AP_NavEKF3: correct compilation when running MATH_CHECK_INDEXES
2018-10-19 08:46:43 +11:00
Peter Barker
fb176b544f
AP_NavEKF2: correct compilation when running MATH_CHECK_INDEXES
2018-10-19 08:46:43 +11:00
Andrew Tridgell
c622a4c4d6
HAL_ChibiOS: fixed output pins on F100 iomcu
2018-10-17 16:45:37 +11:00
Andrew Tridgell
6ec87528db
AP_IOMCU: fixed RCIN failsafe
2018-10-17 15:11:28 +11:00
Andrew Tridgell
7b67146bc4
HAL_ChibiOS: use less memory in SoftSigReader
2018-10-17 15:11:28 +11:00
Andrew Tridgell
d083cd87d6
HAL_ChibiOS: disable debug code by default for iomcu
...
use --enable-asserts instead
2018-10-17 15:11:28 +11:00
Andrew Tridgell
d7aaaa35bd
HAL_ChibiOS: disable RCIN and timer threads for iomcu
2018-10-17 15:11:28 +11:00
Andrew Tridgell
92d8ef0e76
AP_IOMCU: run the rcin timer tick in main loop
...
we no longer run a separate RCIN thread
2018-10-17 15:11:28 +11:00
Andrew Tridgell
8a4e0bd58c
HAL_ChibiOS: fixed RCIN for iomcu
...
we need to disable/re-enable DMA on each IRQ for the STM32F10x
2018-10-17 15:11:28 +11:00
Andrew Tridgell
15141a6a5a
HAL_ChibiOS: allow for no RCIN or TIMER thread
...
saves memory on iomcu
2018-10-17 15:11:28 +11:00
Andrew Tridgell
4674a1c68d
HAL_ChibiOS: fixed system time for clocks other than 1MHz
...
needed for IOMCU
2018-10-17 15:11:28 +11:00
Andrew Tridgell
298a91ac7c
HAL_ChibiOS: allow reduction of memory for SoftSigReader
...
for IOMCU
2018-10-17 15:11:28 +11:00
Andrew Tridgell
cd9179e733
AP_BoardConfig: fixed for 8 PWM outputs in IOMCU
2018-10-17 15:11:28 +11:00
rain-er
565b370330
UART4 added for BLHeli ESC telemetry
2018-10-17 13:57:19 +11:00
Andrew Tridgell
9b3788c83c
AP_RPM: treat RPM_TYPE 1 as type 2 on non-PX4
...
makes upgrades easier
2018-10-17 13:55:01 +11:00
Andrew Tridgell
925555c995
AP_Compass: move accum fields to frontend
...
this is needed to ensure they are per-instance. Without this the SITL
backend produces zero for all but the first instance. The same would
be true for any multi-instance backend
2018-10-17 12:54:22 +11:00
Andrew Tridgell
83065d5e88
AP_Compass: convert SITL to new accumulate approach
2018-10-17 12:54:22 +11:00
Andrew Tridgell
6af709e617
SRV_Channel: fixed build warnings
2018-10-17 12:54:22 +11:00
Andrew Tridgell
93dbcf88b8
AP_Volz_Protocol: fixed build warnings
2018-10-17 12:54:22 +11:00
Andrew Tridgell
6f480c98cc
AP_SBusOut: fixed build warnings
2018-10-17 12:54:22 +11:00
Andrew Tridgell
672b4be3d2
AP_RSSI: fixed build warnings
2018-10-17 12:54:22 +11:00
Andrew Tridgell
9e17275488
AP_BattMonitor: fixed build warnings
2018-10-17 12:54:22 +11:00
Andrew Tridgell
b1928d959b
AP_Arming: fixed build warnings
2018-10-17 12:54:22 +11:00
Andrew Tridgell
feea73ee1a
SITL: use WITH_SEMAPHORE()
...
and removed usage of hal.util->new_semaphore()
2018-10-17 12:54:22 +11:00
Andrew Tridgell
1d6b58f9ca
DataFlash: use WITH_SEMAPHORE()
...
and removed usage of hal.util->new_semaphore()
2018-10-17 12:54:22 +11:00
Andrew Tridgell
f662cf55e5
AP_UAVCAN: use WITH_SEMAPHORE()
...
and removed usage of hal.util->new_semaphore()
2018-10-17 12:54:22 +11:00
Andrew Tridgell
046bcfa0a9
AP_SmartRTL: use WITH_SEMAPHORE()
...
and removed usage of hal.util->new_semaphore()
2018-10-17 12:54:22 +11:00
Andrew Tridgell
b1e4434332
AP_RangeFinder: use WITH_SEMAPHORE()
...
and removed usage of hal.util->new_semaphore()
2018-10-17 12:54:22 +11:00
Andrew Tridgell
530138ded4
AP_RAMTRON: use WITH_SEMAPHORE()
...
and removed usage of hal.util->new_semaphore()
2018-10-17 12:54:22 +11:00
Andrew Tridgell
68f463b29d
AP_Radio: use WITH_SEMAPHORE()
...
and removed usage of hal.util->new_semaphore()
2018-10-17 12:54:22 +11:00
Andrew Tridgell
17049ff5f5
AP_OSD: use WITH_SEMAPHORE()
...
and removed usage of hal.util->new_semaphore()
2018-10-17 12:54:22 +11:00
Andrew Tridgell
a1f1e7e435
AP_OpticalFlow: use WITH_SEMAPHORE()
...
and removed usage of hal.util->new_semaphore()
2018-10-17 12:54:22 +11:00