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

Change license from GPLv3+ to LGPLv3+ #96

Merged
merged 7 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ pkg_check_modules(GST REQUIRED gstreamer-1.0 gstreamer-app-1.0)
add_library(ArduPilotPlugin
SHARED
src/ArduPilotPlugin.cc
src/Socket.cpp
src/SocketUDP.cc
src/Util.cc
)
target_include_directories(ArduPilotPlugin PRIVATE
Expand Down
830 changes: 161 additions & 669 deletions LICENSE.md

Large diffs are not rendered by default.

68 changes: 0 additions & 68 deletions include/ArduCopterIRLockPlugin.hh

This file was deleted.

4 changes: 2 additions & 2 deletions include/CameraZoomPlugin.hh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Copyright (C) 2023 ArduPilot.org

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Expand All @@ -11,7 +11,7 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CAMERAZOOMPLUGIN_HH_
Expand Down
28 changes: 14 additions & 14 deletions include/ParachutePlugin.hh
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
/*
Copyright (C) 2022 ardupilot.org
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef PARACHUTEPLUGIN_HH_
#define PARACHUTEPLUGIN_HH_

Expand Down
73 changes: 0 additions & 73 deletions include/Socket.h

This file was deleted.

75 changes: 75 additions & 0 deletions include/SocketUDP.hh
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
/*
Copyright (C) 2024 ardupilot.org

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef SOCKETUDP_HH_
#define SOCKETUDP_HH_

#include <fcntl.h>
#include <unistd.h>
#ifdef _WIN32
#include <winsock2.h>
#include <Ws2tcpip.h>
#else
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
#include <sys/select.h>
#endif

/// \brief Simple UDP socket handling class.
class SocketUDP {
public:
/// \brief Constructor.
SocketUDP(bool reuseaddress, bool blocking);

/// \brief Destructor.
~SocketUDP();

/// \brief Bind socket to address and port.
bool bind(const char *address, uint16_t port);

/// \brief Set reuse address option.
bool set_reuseaddress();

/// \brief Set blocking state.
bool set_blocking(bool blocking);

/// \brief Send data to address and port.
ssize_t sendto(const void *buf, size_t size, const char *address, uint16_t port);

/// \brief Receive data.
ssize_t recv(void *pkt, size_t size, uint32_t timeout_ms);

/// \brief Get last client address and port
void get_client_address(const char *&ip_addr, uint16_t &port);

private:
/// \brief File descriptor.
struct sockaddr_in in_addr {};

/// \brief File descriptor.
int fd = -1;

/// \brief Poll for incoming data with timeout.
bool pollin(uint32_t timeout_ms);

/// \brief Make a sockaddr_in struct from address and port.
void make_sockaddr(const char *address, uint16_t port, struct sockaddr_in &sockaddr);
};
#endif // SOCKETUDP_HH_
4 changes: 2 additions & 2 deletions include/Util.hh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Copyright (C) 2022 ardupilot.org

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Expand All @@ -11,7 +11,7 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

Expand Down
2 changes: 1 addition & 1 deletion package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<version>0.0.0</version>
<description>Plugins and models for vehicle simulation in Gazebo Sim with ArduPilot SITL controllers</description>
<maintainer email="[email protected]">Rhys Mainwaring</maintainer>
<license>GPL-3.0</license>
<license>LGPL-3.0</license>
<author>Rhys Mainwaring</author>

<buildtool_depend>ament_cmake</buildtool_depend>
Expand Down
Loading
Loading