1
0
Fork 0
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:
Bertrand Songis 2016-06-30 22:44:16 +02:00
parent fef4bff9fa
commit 5f03924b5f
8 changed files with 22 additions and 57 deletions

View file

@ -26,6 +26,7 @@
#include <iostream>
#include <bitset>
#include "constants.h"
#include "../../radio/src/definitions.h"
#include "simulatorinterface.h"
#define EESIZE_STOCK 2048

View file

@ -24,12 +24,7 @@
#include <QMap>
#include <algorithm>
#if __GNUC__
#define PACK( __Declaration__ ) __Declaration__ __attribute__((__packed__))
#else
#include "../targets/windows/winbuild.h"
#endif
// TODO can be removed?
template<class t> t LIMIT(t mi, t x, t ma) { return std::min(std::max(mi, x), ma); }
struct TxInputs

View file

@ -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

View file

@ -66,12 +66,6 @@
#define NOBACKUP(...) __VA_ARGS__
#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)
typedef uint16_t source_t;
#else

View file

@ -42,9 +42,24 @@
#endif
#if defined(SIMU) || defined(CPUARM) || GCC_VERSION < 472
typedef int32_t int24_t;
typedef int32_t int24_t;
#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 // _DEFINITIONS_H_

View file

@ -21,10 +21,7 @@
#ifndef _EEPROM_RLC_H_
#define _EEPROM_RLC_H_
// TODO duplicated
#ifndef PACK
#define PACK( __Declaration__ ) __Declaration__ __attribute__((__packed__))
#endif
#include "definitions.h"
#if defined(PCBTARANIS)
#define blkid_t uint16_t

View file

@ -21,6 +21,7 @@
#ifndef _FRSKY_H_
#define _FRSKY_H_
#include "../definitions.h"
#include "telemetry_holders.h"
#define FRSKY_SPORT_BAUDRATE 57600

View file

@ -8,13 +8,9 @@
#ifndef lobject_h
#define lobject_h
#ifndef PACK
#define PACK( __Declaration__ ) __Declaration__ __attribute__((__packed__))
#endif
#include <stdarg.h>
#include "definitions.h"
#include "llimits.h"
#include "lua.h"