* src/drivers/cdcacm_autostart: Include posix.h for px4_close
Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
* platforms/nuttx/CMakeLists.txt: Fix linking of nuttx libaries for memalign
This fixes memalign not found in linking step for some boards
Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
* Add "flock" to macos.sh setup script
"flock" is not standard on macOS, and a dependency was missing from the
macOS setup path.
Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
* Fix clang-tidy errors in Bitset.hpp and in src/lib/matrix
Fix the "bugprone-dynamic-static-initializers" linter errors.
Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
* systemlib/hardfault_log: Fix clang-diagnostics error
Fix for
"[error] clang-diagnostic-error [error]
use of undeclared identifier XCPTCONTEXT_REGS".
XCPTCONTEXT_REGS is defined in nuttx irq.h, so include that.
Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
* uORB: Fix clang-tidy error "bugprone-dynamic-static-initializers"
Fix the clang-tidy error appearing on uORBManager _Instance variable by
adding a getter for the reference to the _Instance and using that instead.
Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
* CI: Add default ubuntu mirrors as fallback
In case of specified aws mirror doesn't have the package idicated by the
metadata, a the default ubuntu mirror as a backup.
Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
---------
Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
math::expo_deadzone generates ~240bytes of code for 32-bit arm
platform, and it gets currently inlined several times.
Localizing the function in Sticks.cpp saves ~2KB of flash, measured
on px4_fmu-v5_default target.
Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
GCC13 does aggresive optimizations that causes a RWW violation.
Causing the bootloader to crash while updating.
Add compiler arguements to reduce optimizations fixing the issue.
Add support for the MAVLink FTP ListDirectoryWithTime command (opcode 16),
which returns directory listings with each file's last-modification time
appended as decimal seconds since the UNIX epoch (0 if unknown).
This lets a GCS retrieve file timestamps without downloading the files,
which is useful for log download. The plain ListDirectory output is
unchanged, and clients fall back to it when the server NAKs with
UnknownCommand.
Signed-off-by: Julian Oes <julian@oes.ch>
On a non-secure bootloader the VERIFY_SIG opcode was answered explicitly
instead of falling through like an older bootloader without the opcode,
which could desync the following BOOT command and fail the upload.
Compile the case only when BOOTLOADER_USE_SECURITY is set so non-secure
builds reject it via the default unknown-command path.
Signed-off-by: Julian Oes <julian@oes.ch>
The DSHOT bit width was selected at compile time from a single timer
clock (STM32_APB1_TIM5_CLKIN) and applied board-wide. On boards whose
timers run on different clocks (e.g. APB1 vs APB2) the non-APB1 timers
could emit DSHOT at the wrong rate; this was only flagged with a
#pragma message rather than handled.
Compute the bit width per timer from that timer's own clock_freq (which
io_timers[] already carries), using a fixed DSHOT600 reference so the
width depends only on the timer clock, not the selected DSHOT rate. The
selection rule is unchanged, so register values are identical for every
current board.
Keeping the width rate-independent is what preserves the duty cycle:
MOTOR_PWM_BIT_0/1 are absolute CCR counts calibrated for the fixed ARR,
so a rate-varying ARR would distort them.
Signed-off-by: Julian Oes <julian@oes.ch>
The failure injector is SITL-only; the system-wide enable gate isn't
needed here. Gating will be revisited when extending injection to the
real GPS driver in a follow-up.
Implements FAILURE_UNIT_SENSOR_GPS support in the SITL sensor_gps_sim module, mirroring the existing motor failure injection pattern in FailureInjector.
Supported failure types per GPS instance (param3=0 all, 1=GPS0, 2=GPS1):
- FAILURE_TYPE_OFF, stop publishing (simulates dead receiver)
- FAILURE_TYPE_STUCK, freeze last known position (simulates frozen fix)
- FAILURE_TYPE_WRONG, corrupt position by +1 deg (~111 km offset, triggers gpsRedundancyCheck divergence gate)
- FAILURE_TYPE_OK, recover all active failures for that instance
Requires SYS_FAILURE_EN=1. The enable gate is re-read every cycle so runtime parameter changes take effect without restarting the module.
The ArmingCheckReply uORB queue was sized to 4 (ORB_QUEUE_LENGTH) while
ExternalChecks supports up to MAX_NUM_REGISTRATIONS (8) external modes,
each of which publishes a reply for every ArmingCheckRequest. With more
than 4 registered modes the replies from the 5th+ mode overwrote earlier
ones within a single request cycle, so those modes were flagged
"unresponsive" and silently failed to activate.
Increase ORB_QUEUE_LENGTH to 8 to match MAX_NUM_REGISTRATIONS, and add a
static_assert so the two limits cannot drift apart again.
Fixes#27271
Signed-off-by: Marko T <marko.tavcar@c-astral.com>
limits.h is included before the definition in some locations and not others
(which would trigger a setting of 1024) resulting in conflicting definitions.
* feat(logger): append topics defined in logger_topics.txt instead of replacing logging profile
* docs(logger): Explain how logger_topics.txt topics are being used
* refactor(logger): squash initialize functions into a single one
* docs(docs): Subedit
---------
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
VitePress externalizes node_modules during SSR, causing Node.js to
try loading .vue source files directly and throw
ERR_UNKNOWN_FILE_EXTENSION. Setting ssr.noExternal ensures Vite
processes vp-dynamic-nav through its transform pipeline instead.
vp-dynamic-nav 0.0.3 exports a vpDynamicNavPlugin() helper from the
./plugin subpath for consumers who prefer the programmatic approach.
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
* fix(docs): bypass VitePress router interception in DynamicNav links
VitePress installs a global click interceptor that catches same-origin
<a> clicks and routes them through Vue Router. Cross-version links
(e.g. /v1.17/en/ from /main/en/) share the origin but are separate
deployments, so Vue Router fails to resolve them and navigation is
silently swallowed. Fix by calling window.location.href directly with
@click.prevent on all nav links.
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
* refactor(docs): use VitePress internal nav components in DynamicNav
Replace the hand-rolled dropdown/link rendering with VitePress's own
VPNavBarMenuLink, VPNavBarMenuGroup, VPNavScreenMenuLink, and
VPNavScreenMenuGroup. This removes ~140 lines of custom CSS and all
manual click/flyout handling; VitePress styles and VPFlyout behaviour
are inherited for free.
The navigation bug (same-origin links swallowed by Vue Router) is also
fixed by this approach: VPLink classifies any https:// href as external
and renders a plain <a> tag, bypassing the router interceptor entirely.
Remote URL and localStorage key are now read from themeConfig
(dynamicNavUrl, dynamicNavCacheKey) so the component can be dropped
into any VitePress repo with just a config change.
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
* refactor(docs): derive DynamicNav cache key from URL by default
Use the remote URL as the localStorage key when dynamicNavCacheKey is
not set. This avoids the need to declare a key in config, keeps the
key unique per data source automatically, and means all deployed
versions of a site (same origin, different base paths) naturally share
one cache entry — which is the desired behaviour.
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
* chore(docs): remove redundant nav:[] from themeConfig
VitePress renders no menu items when nav is omitted, so the explicit
empty array adds no value now that all items come from DynamicNav.
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
* fix(docs): restore display:flex on DynamicNav bar wrapper
Removing the scoped styles during the VitePress-internal-components
refactor also removed the flex layout on the wrapper div, causing nav
items to stack vertically instead of in a row.
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
* refactor(docs): replace local DynamicNav with vp-dynamic-nav npm package
Removes the in-tree DynamicNav.vue and wires up the published
vp-dynamic-nav package instead. navbar.json is imported in config.mjs
and passed as dynamicNavInitial so it remains the single source of
truth for both the initial render and the remote fetch target.
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
---------
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
* always warn about new less severe failsafes as warning
* Prevent notification of disabled failsafes
---------
Co-authored-by: Matthias Grob <maetugr@gmail.com>