Skip to content
Snippets Groups Projects
Commit 983cff56 authored by Lorenz Meier's avatar Lorenz Meier
Browse files

Added int cast to handle arithmetic correctly

parent 06b69b70
No related branches found
No related tags found
No related merge requests found
......@@ -387,7 +387,7 @@ dsm_decode(hrt_abstime frame_time, uint16_t *values, uint16_t *num_values)
*/
/* scaled integer for decent accuracy while staying efficient */
value = (((value - 1024) * 1000) / 1700) + 1500;
value = ((((int)value - 1024) * 1000) / 1700) + 1500;
/*
* Store the decoded channel into the R/C input buffer, taking into
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment