Browse Source

Cleanup of copyright headers

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
sbg
Mark Charlebois 10 years ago
parent
commit
82b90281e9
  1. 37
      src/platforms/px4_log.h
  2. 32
      src/platforms/qurt/dspal/dspal_stub.c
  3. 32
      src/platforms/qurt/px4_layer/qurt_stubs.c
  4. 38
      src/platforms/qurt/px4_layer/work_lock.c
  5. 6
      src/platforms/qurt/tests/muorb/muorb_test_example.h
  6. 5
      src/platforms/qurt/tests/muorb/muorb_test_main.cpp
  7. 3
      src/platforms/qurt/tests/muorb/muorb_test_start_qurt.cpp

37
src/platforms/px4_log.h

@ -54,19 +54,22 @@ @@ -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 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 __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_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 @@ @@ -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)

32
src/platforms/qurt/dspal/dspal_stub.c

@ -1,3 +1,35 @@ @@ -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>

32
src/platforms/qurt/px4_layer/qurt_stubs.c

@ -1,3 +1,35 @@ @@ -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" {

38
src/platforms/qurt/px4_layer/work_lock.c

@ -1,4 +1,36 @@ @@ -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[]; @@ -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]);
}

6
src/platforms/qurt/tests/muorb/muorb_test_example.h

@ -31,12 +31,6 @@ @@ -31,12 +31,6 @@
*
****************************************************************************/
/**
* @file hello_example.h
* Example app for Linux
*
* @author Mark Charlebois <charlebm@gmail.com>
*/
#pragma once
#include <px4_app.h>

5
src/platforms/qurt/tests/muorb/muorb_test_main.cpp

@ -32,8 +32,8 @@ @@ -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 @@ @@ -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)
{

3
src/platforms/qurt/tests/muorb/muorb_test_start_qurt.cpp

@ -32,9 +32,8 @@ @@ -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"

Loading…
Cancel
Save