mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 14:03:34 +08:00
* Implemented driver for MCP23017 * fixed compatability with mcp23009. (naming of instantiated GPIO-Devices) * removed some comments * removed even more comments * commented out instatntiation of driver since it will not be used with v6x * removed last useless comments * re-activated gpio_mcp23009 driver, removed useless comments and empty lines * removed empty lines at the end of mcp23017.cpp * removed empty line * Implemented driver for MCP23017 * fixed compatability with mcp23009. (naming of instantiated GPIO-Devices) * removed some comments * removed even more comments * commented out instatntiation of driver since it will not be used with v6x * removed last useless comments * re-activated gpio_mcp23009 driver, removed useless comments and empty lines * removed empty lines at the end of mcp23017.cpp * removed empty line * basic working implementation * first improved driver version with shared code base for MCP23009 & MCP23017 (built as state machine with sanity checks) * removed unused imports * changed module name from MCP to MCP230XX * removed debug print statements * adjusted auto start command of driver * removed comments * -added seperate main functions for both derivative modules (mcp23009 and mcp23017) * compile common functions as shared library in src/lib/drivers * fixed cleanup of modules * ->unclean working version with shared common library * used make format * working & cleaned version * -> Added CallbackHandler to be able to use multiple reading GPIO-expanders simultaneously -> Removed old mcap23009 calls and pin registrations -> Adjusted GpioIn.msg to contain MAX_INSTANCES * ->removed unused imports ->used make format * Fix: Re-enabled platform_mcp_gpio for accton-godwit, cuav, fmu-v5x * Fix: enabled platform_mcp_gpio in px4/fmu-v5x * added depency to fmu-v5x * Fix: removed new lines * Fix: fixed linker errors * removed unused linkage against mcp-library * Made mcp start calls consistent for fmu-v5x and fmu-v6x * moved logging of comm errors to read/write function directly * added perf_count for sanity_check * removed error message * ensured member variables follow naming convention * added retries to probe function * simplyfied state-logic * add break to terminate loop early * ensured clean state when register_gpios() fails * add registered-flag to pins * used path from top dir instead of relative path in CMakeLists * used constexpr to set parameters instead of calculating them at runtime * style: used make format * fix: corrected i2c_bus assignment * style: init input of callbackhandler to 0 * fix: mark pin as registered if successful * style: made arguments const type --------- Co-authored-by: Alexander Lerach <alexander@auterion.com>
29 lines
763 B
Bash
29 lines
763 B
Bash
#!/bin/sh
|
|
#
|
|
# board specific defaults
|
|
#------------------------------------------------------------------------------
|
|
|
|
# Skynode: use the "custom participant", IP=10.41.10.1 config for uxrce_dds_client
|
|
param set-default UXRCE_DDS_PTCFG 2
|
|
param set-default UXRCE_DDS_AG_IP 170461697
|
|
param set-default UXRCE_DDS_CFG 1000
|
|
|
|
# The buzzer draws too much power (0.2A) on the GPS power rail (limit 0.45A).
|
|
param set-default CBRK_BUZZER 782097
|
|
|
|
# Update default IP config if needed
|
|
netman update_default -i eth0
|
|
|
|
safety_button start
|
|
|
|
# GPIO Expander driver on external I2C3
|
|
if ver hwbasecmp 009 010 011
|
|
then
|
|
# No USB
|
|
mcp23009 start -b 3 -X -D 0xf0 -O 0xf0 -P 0x0f -M 0 -U 10
|
|
fi
|
|
if ver hwbasecmp 00a 008
|
|
then
|
|
mcp23009 start -b 3 -X -D 0xf1 -O 0xf0 -P 0x0f -M 0 -U 10
|
|
fi
|