1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-26 01:35:21 +03:00

Compilation fixes

This commit is contained in:
Bertrand Songis 2019-04-16 21:23:09 +02:00
parent e47603dcf7
commit 6676e98a92
6 changed files with 18 additions and 13 deletions

View file

@ -70,8 +70,6 @@ const uint8_t modn12x3[] = {
3, 1, 2, 0,
3, 2, 1, 0 };
volatile tmr10ms_t g_tmr10ms;
volatile uint8_t rtc_count = 0;
uint32_t watchdogTimeout = 0;

View file

@ -311,12 +311,6 @@ void memswap(void * a, void * b, uint8_t size);
#include "fifo.h"
#include "io/frsky_sport.h"
extern volatile tmr10ms_t g_tmr10ms;
static inline tmr10ms_t get_tmr10ms()
{
return g_tmr10ms;
}
#if defined(CLI)
#include "cli.h"
#endif

View file

@ -290,10 +290,10 @@ class TelemetryData {
void setSwr(uint8_t module, uint8_t value)
{
if (module == EXTERNAL_MODULE)
swrExternal.set(value);
else
if (module == 0)
swrInternal.set(value);
else
swrExternal.set(value);
}
};

View file

@ -22,6 +22,7 @@
#define _TELEMETRY_HOLDERS_H_
#include <inttypes.h>
#include "../timers.h"
#define TELEMETRY_AVERAGE_COUNT 3 // we actually average one more reading!
#define RAW_FRSKY_MINMAX(v) v.values[TELEMETRY_AVERAGE_COUNT-1]

View file

@ -21,6 +21,8 @@
#include "opentx.h"
#include "timers.h"
volatile tmr10ms_t g_tmr10ms;
#if TIMERS > MAX_TIMERS
#error "Timers cannot exceed " .. MAX_TIMERS
#endif

View file

@ -21,6 +21,8 @@
#ifndef _TIMERS_H_
#define _TIMERS_H_
#include "opentx_types.h"
#define TMR_OFF 0
#define TMR_RUNNING 1
#define TMR_NEGATIVE 2
@ -41,7 +43,9 @@ struct TimerState {
uint8_t val_10ms;
};
#if defined(TIMERS)
extern TimerState timersStates[TIMERS];
#endif
void timerReset(uint8_t idx);
@ -52,4 +56,10 @@ void timerSet(int idx, int val);
void evalTimers(int16_t throttle, uint8_t tick10ms);
extern volatile tmr10ms_t g_tmr10ms;
static inline tmr10ms_t get_tmr10ms()
{
return g_tmr10ms;
}
#endif // _TIMERS_H_