1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-24 16:55:20 +03:00

[sky9x] Compilation problem

This commit is contained in:
bsongis 2012-09-09 17:36:25 +00:00
parent 993eba0af5
commit f72926fb74

View file

@ -829,7 +829,7 @@ inline int32_t calc100toRESX(register int8_t x)
return ((uint32_t)x*655)>>6 ;
}
inline int16_t calc1000toRESX( register int32_t x) // improve calc time by Pat MacKenzie
inline int16_t calc1000toRESX(register int32_t x) // improve calc time by Pat MacKenzie
{
register int32_t y = x>>5;
x+=y;
@ -838,6 +838,13 @@ inline int16_t calc1000toRESX( register int32_t x) // improve calc time by Pat
return x+(y>>2);
// return x + x/32 - x/128 + x/512;
}
inline int16_t calcRESXto1000(register int32_t x)
{
// *1000/1024 = x - x/32 + x/128
return (x - x/32 + x/128 - x/512);
}
#else
extern int16_t calc100toRESX(int8_t x);
extern int16_t calc1000toRESX(int16_t x);