Problem with d>ofs A1 [negative ofs]

This commit is contained in:
bsongis
2012-08-29 15:18:32 +00:00
parent 60c3d2f3ae
commit 3223b890ad
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -140,7 +140,7 @@ uint16_t getChannelRatio(uint8_t channel)
return (uint16_t)g_model.frsky.channels[channel].ratio << g_model.frsky.channels[channel].multiplier;
}
int16_t applyChannelRatio(uint8_t channel, uint8_t val)
int16_t applyChannelRatio(uint8_t channel, int16_t val)
{
return ((int32_t)val+g_model.frsky.channels[channel].offset) * getChannelRatio(channel) * 2 / 51;
}
+1 -1
View File
@@ -215,7 +215,7 @@ int16_t convertTelemValue(uint8_t channel, uint8_t value);
NOINLINE uint8_t getRssiAlarmValue(uint8_t alarm);
extern const pm_uint8_t bchunit_ar[];
int16_t applyChannelRatio(uint8_t channel, uint8_t val);
int16_t applyChannelRatio(uint8_t channel, int16_t val);
void putsTelemetryChannel(uint8_t x, uint8_t y, uint8_t channel, int16_t val, uint8_t att);
#endif