diff --git a/libraries/AP_Networking/AP_Networking.cpp b/libraries/AP_Networking/AP_Networking.cpp index 1c80fd9187..5f05dfcd4d 100644 --- a/libraries/AP_Networking/AP_Networking.cpp +++ b/libraries/AP_Networking/AP_Networking.cpp @@ -51,7 +51,7 @@ const AP_Param::GroupInfo AP_Networking::var_info[] = { AP_SUBGROUPINFO(param.gwaddr, "GWADDR", 5, AP_Networking, AP_Networking_IPV4), // @Group: MACADDR - // @Path: AP_Networking_address.cpp + // @Path: AP_Networking_macaddr.cpp AP_SUBGROUPINFO(param.macaddr, "MACADDR", 6, AP_Networking, AP_Networking_MAC), AP_GROUPEND diff --git a/libraries/AP_Networking/AP_Networking_address.cpp b/libraries/AP_Networking/AP_Networking_address.cpp index 675b9159f4..622e6f919a 100644 --- a/libraries/AP_Networking/AP_Networking_address.cpp +++ b/libraries/AP_Networking/AP_Networking_address.cpp @@ -1,5 +1,5 @@ /* - classes for holding IPv4 and ethernet MAC address parameters + class for holding IPv4 address parameters */ #include "AP_Networking_Config.h" @@ -17,21 +17,21 @@ const AP_Param::GroupInfo AP_Networking_IPV4::var_info[] = { AP_GROUPINFO("0", 1, AP_Networking_IPV4, addr[0], 0), // @Param: 1 - // @DisplayName: IPv4 Address MSB + // @DisplayName: IPv4 Address 2nd byte // @Description: IPv4 address. Example: xxx.168.xxx.xxx // @Range: 0 255 // @RebootRequired: True AP_GROUPINFO("1", 2, AP_Networking_IPV4, addr[1], 0), // @Param: 2 - // @DisplayName: IPv4 Address MSB + // @DisplayName: IPv4 Address 3rd byte // @Description: IPv4 address. Example: xxx.xxx.13.xxx // @Range: 0 255 // @RebootRequired: True AP_GROUPINFO("2", 3, AP_Networking_IPV4, addr[2], 0), // @Param: 3 - // @DisplayName: IPv4 Address MSB + // @DisplayName: IPv4 Address 4th byte // @Description: IPv4 address. Example: xxx.xxx.xxx.14 // @Range: 0 255 // @RebootRequired: True @@ -40,57 +40,6 @@ const AP_Param::GroupInfo AP_Networking_IPV4::var_info[] = { AP_GROUPEND }; -const AP_Param::GroupInfo AP_Networking_MAC::var_info[] = { - // @Param: 0 - // @DisplayName: MAC Address 1st byte - // @Description: MAC address 1st byte - // @Range: 0 255 - // @RebootRequired: True - // @User: Advanced - AP_GROUPINFO("0", 1, AP_Networking_MAC, addr[0], 0), - - // @Param: 1 - // @DisplayName: MAC Address 2nd byte - // @Description: MAC address 2nd byte - // @Range: 0 255 - // @RebootRequired: True - // @User: Advanced - AP_GROUPINFO("1", 2, AP_Networking_MAC, addr[1], 0), - - // @Param: 2 - // @DisplayName: MAC Address 3rd byte - // @Description: MAC address 3rd byte - // @Range: 0 255 - // @RebootRequired: True - // @User: Advanced - AP_GROUPINFO("2", 3, AP_Networking_MAC, addr[2], 0), - - // @Param: 3 - // @DisplayName: MAC Address 4th byte - // @Description: MAC address 4th byte - // @Range: 0 255 - // @RebootRequired: True - // @User: Advanced - AP_GROUPINFO("3", 4, AP_Networking_MAC, addr[3], 0), - - // @Param: 4 - // @DisplayName: MAC Address 5th byte - // @Description: MAC address 5th byte - // @Range: 0 255 - // @RebootRequired: True - // @User: Advanced - AP_GROUPINFO("4", 5, AP_Networking_MAC, addr[4], 0), - - // @Param: 5 - // @DisplayName: MAC Address 6th byte - // @Description: MAC address 6th byte - // @Range: 0 255 - // @RebootRequired: True - // @User: Advanced - AP_GROUPINFO("5", 6, AP_Networking_MAC, addr[5], 0), - - AP_GROUPEND -}; /* IPV4 address parameter class @@ -119,32 +68,4 @@ void AP_Networking_IPV4::set_default_uint32(uint32_t v) } } -/* - ethernet MAC address parameter class - */ -AP_Networking_MAC::AP_Networking_MAC(const char *default_addr) -{ - AP_Param::setup_object_defaults(this, var_info); - uint8_t b[6]; - if (AP_Networking::convert_str_to_macaddr(default_addr, b)) { - for (uint8_t i=0; i