Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Networking #23886

Closed
wants to merge 29 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
0afc17b
AP_Networking: added networking support
magicrub May 30, 2023
99e1a67
AP_Networking: added macInit() call when enabled
tridge May 30, 2023
0e07122
AP_AccelCal: only enable accel cal if we have IMUs enabled
magicrub May 30, 2023
4d1115f
AP_Arming: allow for builds without AP_InertialSensor
magicrub May 30, 2023
1727ae3
AP_BoardConfig: added vehicle serial number accessor
magicrub May 30, 2023
7495a3f
HAL_ChibiOS: added memory for ethernet and ETH device types
magicrub May 30, 2023
80b7e99
AP_RTC: added NTP clock source
magicrub May 30, 2023
678e75c
AP_Vehicle: added networking object
magicrub May 30, 2023
b92544b
Tools: added networking to AP_Periph
magicrub May 30, 2023
0ac5360
hwdef: add all Ethernet capable hwdefs
magicrub May 25, 2023
dfcd28a
AP_HAL: add AP_SERIAL_EXTENSION_ENABLED
bugobliterator Mar 28, 2023
83fb243
AP_SerialManager: add support for IP serial over Serial Extensions
magicrub May 26, 2023
2eea5b2
AP_HAL_SITL: add extra uarts
magicrub May 27, 2023
108de03
AP_Networking: IPv4-only, check health, disable apps
magicrub May 30, 2023
bff0460
AP_HAL_ChibiOS: hwdef kha_eth update params
magicrub May 30, 2023
5547ae5
AP_SerialManager: fix IP param indexes
magicrub Jun 5, 2023
68a058d
AP_SerialManager: fix Ext Serial IP passthrough
magicrub Jun 6, 2023
8bc8c9f
hwdef: kha_eth periph musical SERIAL_ORDER
magicrub Jun 6, 2023
58251ec
AP_PiccoloCAN: driver to require HAL_CANMANAGER_ENABLED
magicrub Jun 9, 2023
056dda8
AP_SerialManager: bum-up param storage size for port/ip settings
magicrub Jun 9, 2023
74aab8b
hwdef: add kha_eth bootloader
magicrub Jun 14, 2023
ee41fc6
hwdef: add kha_eth bootloader
magicrub Jun 14, 2023
64c7299
update kha_eth
magicrub Jun 22, 2023
eef4fcc
KHA: float the enable pin on boot
magicrub Jun 22, 2023
6ba9391
module ChibiOS: Add LwIP
magicrub Jul 3, 2023
f24ec1d
module
magicrub Jul 3, 2023
59279a5
GCS_MAVLink: uartstate to use SerialState
magicrub Jul 3, 2023
8a4ed8f
AP_Networking: fix send_text casts
magicrub Jul 3, 2023
a94d33e
hwdef: add AUTOBUILD_TARGETS None to kha_eth
magicrub Jul 3, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 9 additions & 1 deletion Tools/AP_Periph/AP_Periph.cpp
Expand Up @@ -100,6 +100,10 @@ void AP_Periph_FW::init()

can_start();

#if AP_NETWORKING_ENABLED
networking.init();
#endif

#if HAL_GCS_ENABLED
stm32_watchdog_pat();
gcs().init();
Expand Down Expand Up @@ -245,7 +249,7 @@ void AP_Periph_FW::init()
#ifdef HAL_PERIPH_ENABLE_ESC_APD
for (uint8_t i = 0; i < ESC_NUMBERS; i++) {
const uint8_t port = g.esc_serial_port[i];
if (port < SERIALMANAGER_NUM_PORTS) { // skip bad ports
if (port < SERIALMANAGER_MAX_PORTS) { // skip bad ports
apd_esc_telem[i] = new ESC_APD_Telem (hal.serial(port), g.pole_count[i]);
}
}
Expand Down Expand Up @@ -476,6 +480,10 @@ void AP_Periph_FW::update()

can_update();

#if AP_NETWORKING_ENABLED
networking.update();
#endif

#if (defined(HAL_PERIPH_NEOPIXEL_COUNT_WITHOUT_NOTIFY) && HAL_PERIPH_NEOPIXEL_COUNT_WITHOUT_NOTIFY == 8) || defined(HAL_PERIPH_ENABLE_NOTIFY)
update_rainbow();
#endif
Expand Down
5 changes: 5 additions & 0 deletions Tools/AP_Periph/AP_Periph.h
Expand Up @@ -25,6 +25,7 @@
#include <AP_Scripting/AP_Scripting.h>
#include <AP_HAL/CANIface.h>
#include <AP_Stats/AP_Stats.h>
#include <AP_Networking/AP_Networking.h>
#include <AP_SerialManager/AP_SerialManager.h>
#include <AP_ESC_Telem/AP_ESC_Telem_config.h>
#if HAL_WITH_ESC_TELEM
Expand Down Expand Up @@ -300,6 +301,10 @@ class AP_Periph_FW {
AP_Logger logger;
#endif

#if AP_NETWORKING_ENABLED
AP_Networking networking;
#endif

#if HAL_GCS_ENABLED
GCS_Periph _gcs;
#endif
Expand Down
6 changes: 6 additions & 0 deletions Tools/AP_Periph/Parameters.cpp
Expand Up @@ -551,6 +551,12 @@ const AP_Param::Info AP_Periph_FW::var_info[] = {
#endif
#endif

#if AP_NETWORKING_ENABLED
// @Group: NET
// @Path: ../libraries/AP_Networking/AP_Networking.cpp
GOBJECT(networking, "NET", AP_Networking),
#endif

AP_VAREND
};

Expand Down
1 change: 1 addition & 0 deletions Tools/AP_Periph/Parameters.h
Expand Up @@ -76,6 +76,7 @@ class Parameters {
k_param_esc_number1,
k_param_pole_count1,
k_param_esc_serial_port1,
k_param_networking,
};

AP_Int16 format_version;
Expand Down
2 changes: 1 addition & 1 deletion Tools/AP_Periph/can.cpp
Expand Up @@ -1526,7 +1526,7 @@ void AP_Periph_FW::can_start()

// ensure there's a serial port mapped to SLCAN
if (!periph.serial_manager.have_serial(AP_SerialManager::SerialProtocol_SLCAN, 0)) {
periph.serial_manager.set_protocol_and_baud(SERIALMANAGER_NUM_PORTS-1, AP_SerialManager::SerialProtocol_SLCAN, 1500000);
periph.serial_manager.set_protocol_and_baud(SERIALMANAGER_MAX_PORTS-1, AP_SerialManager::SerialProtocol_SLCAN, 1500000);
}
}
#endif
Expand Down
1 change: 1 addition & 0 deletions Tools/AP_Periph/wscript
Expand Up @@ -44,6 +44,7 @@ def build(bld):
'AP_FlashStorage',
'AP_RAMTRON',
'AP_GPS',
'AP_Networking',
'AP_SerialManager',
'AP_RTC',
'AP_Compass',
Expand Down
1 change: 1 addition & 0 deletions Tools/ardupilotwaf/ardupilotwaf.py
Expand Up @@ -64,6 +64,7 @@
'AP_Module',
'AP_Button',
'AP_ICEngine',
'AP_Networking',
'AP_Frsky_Telem',
'AP_FlashStorage',
'AP_Relay',
Expand Down
Binary file added Tools/bootloaders/kha_eth_bl.bin
Binary file not shown.