From 356933f0bf45b4837206e34866c628c964af4946 Mon Sep 17 00:00:00 2001 From: bsongis Date: Fri, 6 Jul 2012 18:08:16 +0000 Subject: [PATCH] simu compilation broken --- src/open9x.cpp | 10 ++++++++++ src/open9x.h | 10 +--------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/open9x.cpp b/src/open9x.cpp index 9e29a0ccf..9d71a19d1 100644 --- a/src/open9x.cpp +++ b/src/open9x.cpp @@ -416,6 +416,16 @@ void applyExpos(int16_t *anas) } } +int16_t calc1000toRESX(int16_t x) +{ + // return x + x/32 - x/128 + x/512; + int16_t y = x>>5; + x+=y; + y=y>>2; + x-=y; + return x+(y>>2); +} + int16_t applyLimits(uint8_t channel, int32_t value) { int16_t ofs = g_model.limitData[channel].offset; diff --git a/src/open9x.h b/src/open9x.h index ceb4ca5fb..721ee2b08 100644 --- a/src/open9x.h +++ b/src/open9x.h @@ -717,15 +717,7 @@ inline int16_t calc100toRESX(int8_t x) return ((x*41)>>2) - x/64; } -int16_t calc1000toRESX(int16_t x) -{ - // return x + x/32 - x/128 + x/512; - int16_t y = x>>5; - x+=y; - y=y>>2; - x-=y; - return x+(y>>2); -} +extern int16_t calc1000toRESX(int16_t x); #endif extern volatile uint16_t g_tmr10ms;