mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-25 08:36:08 +08:00
Cleanup of copyright headers
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
+19
-16
@@ -54,19 +54,22 @@
|
||||
#include <stdio.h>
|
||||
#include "HAP_farf.h"
|
||||
|
||||
//#define PX4_DEBUG(...) __px4_log_omit("DEBUG", __VA_ARGS__);
|
||||
//#define PX4_DEBUG(...) __px4_log("DEBUG", __VA_ARGS__);
|
||||
//#define PX4_INFO(...) __px4_log("INFO", __VA_ARGS__);
|
||||
//#define PX4_WARN(...) __px4_log_verbose("WARN", __VA_ARGS__);
|
||||
//#define PX4_ERR(...) __px4_log_verbose("ERROR", __VA_ARGS__);
|
||||
#define PX4_DEBUG(...) FARF(HIGH, __VA_ARGS__);
|
||||
#define PX4_INFO(...) FARF(HIGH, __VA_ARGS__);
|
||||
#define PX4_WARN(...) FARF(HIGH, __VA_ARGS__);
|
||||
#define PX4_ERR(...) FARF(HIGH, __VA_ARGS__);
|
||||
#define __FARF_omit(level, ...) { }
|
||||
#define __FARF_log(level, ...) { \
|
||||
FARF("%-5s ", level);\
|
||||
FARF(__VA_ARGS__);\
|
||||
FARF("\n");\
|
||||
}
|
||||
#define __FARF_log_verbose(level, ...) { \
|
||||
FARF("%-5s ", level);\
|
||||
FARF(__VA_ARGS__);\
|
||||
FARF(" (file %s line %d)\n", __FILE__, __LINE__);\
|
||||
}
|
||||
|
||||
//#define PX4_INFO(...) __px4_log_omit("INFO", __VA_ARGS__);
|
||||
//#define PX4_WARN(...) __px4_log_omit("WARN", __VA_ARGS__);
|
||||
//#define PX4_ERR(...) __px4_log_omit("ERROR", __VA_ARGS__);
|
||||
#define PX4_DEBUG(...) __FARF_omit(HIGH, __VA_ARGS__)
|
||||
#define PX4_INFO(...) __FARF_log(HIGH, __VA_ARGS__)
|
||||
#define PX4_WARN(...) __FARF_log_verbose(HIGH, __VA_ARGS__)
|
||||
#define PX4_ERR(...) __FARF_log_verbose(HIGH, __VA_ARGS__)
|
||||
|
||||
#elif defined(__PX4_LINUX)
|
||||
#include <stdio.h>
|
||||
@@ -78,10 +81,10 @@
|
||||
printf(" (file %s line %d)\n", __FILE__, __LINE__);\
|
||||
}
|
||||
|
||||
#define PX4_DEBUG(...) __px4_log_omit("DEBUG", __VA_ARGS__);
|
||||
#define PX4_INFO(...) __px4_log("INFO", __VA_ARGS__);
|
||||
#define PX4_WARN(...) __px4_log_verbose("WARN", __VA_ARGS__);
|
||||
#define PX4_ERR(...) __px4_log_verbose("ERROR", __VA_ARGS__);
|
||||
#define PX4_DEBUG(...) __px4_log_omit("DEBUG", __VA_ARGS__)
|
||||
#define PX4_INFO(...) __px4_log("INFO", __VA_ARGS__)
|
||||
#define PX4_WARN(...) __px4_log_verbose("WARN", __VA_ARGS__)
|
||||
#define PX4_ERR(...) __px4_log_verbose("ERROR", __VA_ARGS__)
|
||||
|
||||
#elif defined(__PX4_ROS)
|
||||
|
||||
|
||||
@@ -1,3 +1,35 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2015 Mark Charlebois. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
#include <stdio.h>
|
||||
#include <dlfcn.h>
|
||||
|
||||
|
||||
@@ -1,3 +1,35 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2015 Mark Charlebois. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
//extern "C" {
|
||||
|
||||
|
||||
@@ -1,4 +1,36 @@
|
||||
//#pragma once
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2015 Mark Charlebois. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
#include <px4_log.h>
|
||||
#include <semaphore.h>
|
||||
#include <stdio.h>
|
||||
#include "work_lock.h"
|
||||
@@ -8,12 +40,12 @@ extern sem_t _work_lock[];
|
||||
|
||||
void work_lock(int id)
|
||||
{
|
||||
//printf("work_lock %d\n", id);
|
||||
//PX4_INFO("work_lock %d", id);
|
||||
sem_wait(&_work_lock[id]);
|
||||
}
|
||||
|
||||
void work_unlock(int id)
|
||||
{
|
||||
//printf("work_unlock %d\n", id);
|
||||
//PX4_INFO("work_unlock %d", id);
|
||||
sem_post(&_work_lock[id]);
|
||||
}
|
||||
|
||||
@@ -31,12 +31,6 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/**
|
||||
* @file hello_example.h
|
||||
* Example app for Linux
|
||||
*
|
||||
* @author Mark Charlebois <charlebm@gmail.com>
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <px4_app.h>
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
****************************************************************************/
|
||||
|
||||
/**
|
||||
* @file hello_main.cpp
|
||||
* Example for Linux
|
||||
* @file muorb_test_main.cpp
|
||||
* Test of Multi-uORB supoprt
|
||||
*
|
||||
* @author Mark Charlebois <charlebm@gmail.com>
|
||||
*/
|
||||
@@ -41,7 +41,6 @@
|
||||
#include <px4_log.h>
|
||||
#include <px4_app.h>
|
||||
#include "muorb_test_example.h"
|
||||
#include <stdio.h>
|
||||
|
||||
int PX4_MAIN(int argc, char **argv)
|
||||
{
|
||||
|
||||
@@ -32,9 +32,8 @@
|
||||
****************************************************************************/
|
||||
|
||||
/**
|
||||
* @file hello_start_linux.cpp
|
||||
* @file muorb_test_start_qurt.cpp
|
||||
*
|
||||
* @author Thomas Gubler <thomasgubler@gmail.com>
|
||||
* @author Mark Charlebois <mcharleb@gmail.com>
|
||||
*/
|
||||
#include "muorb_test_example.h"
|
||||
|
||||
Reference in New Issue
Block a user