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;
}