Sub: Add joystick button functions for relays 3 & 4

This commit is contained in:
dheideman 2017-10-26 09:32:56 -07:00 committed by Jacob Walser
parent 9085a353bb
commit 5bfd486b4e

View File

@ -358,6 +358,28 @@ void Sub::handle_jsbutton_press(uint8_t button, bool shift, bool held)
relay.toggle(1);
}
break;
case JSButton::button_function_t::k_relay_3_on:
relay.on(2);
break;
case JSButton::button_function_t::k_relay_3_off:
relay.off(2);
break;
case JSButton::button_function_t::k_relay_3_toggle:
if (!held) {
relay.toggle(2);
}
break;
case JSButton::button_function_t::k_relay_4_on:
relay.on(3);
break;
case JSButton::button_function_t::k_relay_4_off:
relay.off(3);
break;
case JSButton::button_function_t::k_relay_4_toggle:
if (!held) {
relay.toggle(3);
}
break;
////////////////////////////////////////////////
// Servo functions