AP_JSButton: simplifies logic

Less code make people happy

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
This commit is contained in:
Patrick José Pereira 2017-12-01 20:08:48 -02:00 committed by Tom Pittenger
parent 42e5b180cb
commit bd1110f444
1 changed files with 1 additions and 2 deletions

View File

@ -28,9 +28,8 @@ uint8_t JSButton::function(bool shift) const
{ {
if (shift) { if (shift) {
return _sfunction; return _sfunction;
} else {
return _function;
} }
return _function;
} }
void JSButton::set_default(button_function_t f, button_function_t sf) void JSButton::set_default(button_function_t f, button_function_t sf)