mirror of
https://github.com/opentx/opentx.git
synced 2025-07-23 16:25:16 +03:00
Compilation error fixed
This commit is contained in:
parent
fef4bff9fa
commit
5f03924b5f
8 changed files with 22 additions and 57 deletions
|
@ -26,6 +26,7 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <bitset>
|
#include <bitset>
|
||||||
#include "constants.h"
|
#include "constants.h"
|
||||||
|
#include "../../radio/src/definitions.h"
|
||||||
#include "simulatorinterface.h"
|
#include "simulatorinterface.h"
|
||||||
|
|
||||||
#define EESIZE_STOCK 2048
|
#define EESIZE_STOCK 2048
|
||||||
|
|
|
@ -24,12 +24,7 @@
|
||||||
#include <QMap>
|
#include <QMap>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#if __GNUC__
|
// TODO can be removed?
|
||||||
#define PACK( __Declaration__ ) __Declaration__ __attribute__((__packed__))
|
|
||||||
#else
|
|
||||||
#include "../targets/windows/winbuild.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
template<class t> t LIMIT(t mi, t x, t ma) { return std::min(std::max(mi, x), ma); }
|
template<class t> t LIMIT(t mi, t x, t ma) { return std::min(std::max(mi, x), ma); }
|
||||||
|
|
||||||
struct TxInputs
|
struct TxInputs
|
||||||
|
|
|
@ -1,34 +0,0 @@
|
||||||
/*
|
|
||||||
* Author - Bertrand Songis <bsongis@gmail.com>
|
|
||||||
*
|
|
||||||
* Based on th9x -> http://code.google.com/p/th9x/
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License version 2 as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* 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.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef WINBUILD_H
|
|
||||||
#define WINBUILD_H
|
|
||||||
|
|
||||||
#define PACK( __Declaration__ ) __pragma( pack(push, 1) ) __Declaration__ __pragma( pack(pop) )
|
|
||||||
#undef FORCEINLINE
|
|
||||||
#define FORCEINLINE inline
|
|
||||||
#define NOINLINE
|
|
||||||
|
|
||||||
#define strcasecmp _stricmp
|
|
||||||
#define strncasecmp _tcsnicmp
|
|
||||||
#define snprintf _snprintf
|
|
||||||
|
|
||||||
inline double round(double number)
|
|
||||||
{
|
|
||||||
return number < 0.0 ? ceil(number - 0.5) : floor(number + 0.5);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -66,12 +66,6 @@
|
||||||
#define NOBACKUP(...) __VA_ARGS__
|
#define NOBACKUP(...) __VA_ARGS__
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __GNUC__
|
|
||||||
#define PACK( __Declaration__ ) __Declaration__ __attribute__((__packed__))
|
|
||||||
#else
|
|
||||||
#define PACK( __Declaration__ ) __pragma( pack(push, 1) ) __Declaration__ __pragma( pack(pop) )
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(PCBTARANIS) || defined(PCBHORUS)
|
#if defined(PCBTARANIS) || defined(PCBHORUS)
|
||||||
typedef uint16_t source_t;
|
typedef uint16_t source_t;
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -42,9 +42,24 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(SIMU) || defined(CPUARM) || GCC_VERSION < 472
|
#if defined(SIMU) || defined(CPUARM) || GCC_VERSION < 472
|
||||||
typedef int32_t int24_t;
|
typedef int32_t int24_t;
|
||||||
#else
|
#else
|
||||||
typedef __int24 int24_t;
|
typedef __int24 int24_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if __GNUC__
|
||||||
|
#define PACK( __Declaration__ ) __Declaration__ __attribute__((__packed__))
|
||||||
|
#else
|
||||||
|
#define PACK( __Declaration__ ) __pragma( pack(push, 1) ) __Declaration__ __pragma( pack(pop) )
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(WIN32)
|
||||||
|
#define FORCEINLINE inline
|
||||||
|
#define NOINLINE
|
||||||
|
#define round(x) floor(x+0.5)
|
||||||
|
#define strcasecmp _stricmp
|
||||||
|
#define strncasecmp _tcsnicmp
|
||||||
|
#define snprintf _snprintf
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // _DEFINITIONS_H_
|
#endif // _DEFINITIONS_H_
|
||||||
|
|
|
@ -21,10 +21,7 @@
|
||||||
#ifndef _EEPROM_RLC_H_
|
#ifndef _EEPROM_RLC_H_
|
||||||
#define _EEPROM_RLC_H_
|
#define _EEPROM_RLC_H_
|
||||||
|
|
||||||
// TODO duplicated
|
#include "definitions.h"
|
||||||
#ifndef PACK
|
|
||||||
#define PACK( __Declaration__ ) __Declaration__ __attribute__((__packed__))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(PCBTARANIS)
|
#if defined(PCBTARANIS)
|
||||||
#define blkid_t uint16_t
|
#define blkid_t uint16_t
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#ifndef _FRSKY_H_
|
#ifndef _FRSKY_H_
|
||||||
#define _FRSKY_H_
|
#define _FRSKY_H_
|
||||||
|
|
||||||
|
#include "../definitions.h"
|
||||||
#include "telemetry_holders.h"
|
#include "telemetry_holders.h"
|
||||||
|
|
||||||
#define FRSKY_SPORT_BAUDRATE 57600
|
#define FRSKY_SPORT_BAUDRATE 57600
|
||||||
|
|
6
radio/src/thirdparty/Lua/src/lobject.h
vendored
6
radio/src/thirdparty/Lua/src/lobject.h
vendored
|
@ -8,13 +8,9 @@
|
||||||
#ifndef lobject_h
|
#ifndef lobject_h
|
||||||
#define lobject_h
|
#define lobject_h
|
||||||
|
|
||||||
#ifndef PACK
|
|
||||||
#define PACK( __Declaration__ ) __Declaration__ __attribute__((__packed__))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
#include "definitions.h"
|
||||||
#include "llimits.h"
|
#include "llimits.h"
|
||||||
#include "lua.h"
|
#include "lua.h"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue