{"comment":{"url":"https://api.github.com/repos/gmorph/ardupilot/comments/14103146","html_url":"https://github.com/gmorph/ardupilot/commit/7cc1165a9af973ba33e7024beb0df5d55c438afe#commitcomment-14103146","id":14103146,"user":{"login":"lucasdemarchi","id":31864,"avatar_url":"https://avatars.githubusercontent.com/u/31864?v=3","gravatar_id":"","url":"https://api.github.com/users/lucasdemarchi","html_url":"https://github.com/lucasdemarchi","followers_url":"https://api.github.com/users/lucasdemarchi/followers","following_url":"https://api.github.com/users/lucasdemarchi/following{/other_user}","gists_url":"https://api.github.com/users/lucasdemarchi/gists{/gist_id}","starred_url":"https://api.github.com/users/lucasdemarchi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucasdemarchi/subscriptions","organizations_url":"https://api.github.com/users/lucasdemarchi/orgs","repos_url":"https://api.github.com/users/lucasdemarchi/repos","events_url":"https://api.github.com/users/lucasdemarchi/events{/privacy}","received_events_url":"https://api.github.com/users/lucasdemarchi/received_events","type":"User","site_admin":false},"position":null,"line":null,"path":"","commit_id":"7cc1165a9af973ba33e7024beb0df5d55c438afe","created_at":"2015-10-30T20:19:30Z","updated_at":"2015-10-30T20:19:30Z","body":"It's ok like you did, but here is a suggestion that I already missed in other parts of the code: what do you think about a `bounded()` or `is_bounded()` function so we can reduce code like this to:\r\n\r\n```c++\r\nbool RC_Channel::in_trim_dz()\r\n{\r\n    return is_bounded(radio_in, radio_trim - _dead_zone, radio_trim + _dead_zone);\r\n}\r\n```\r\n\r\nthoughts?"}}