Compilation fixes
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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
|
||||
|
||||
+12
-2
@@ -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,15 +43,23 @@ struct TimerState {
|
||||
uint8_t val_10ms;
|
||||
};
|
||||
|
||||
#if defined(TIMERS)
|
||||
extern TimerState timersStates[TIMERS];
|
||||
#endif
|
||||
|
||||
void timerReset(uint8_t idx);
|
||||
|
||||
void timerSet(int idx, int val);
|
||||
|
||||
void saveTimers();
|
||||
void restoreTimers();
|
||||
void saveTimers();
|
||||
void restoreTimers();
|
||||
|
||||
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_
|
||||
|
||||
Reference in New Issue
Block a user