mirror of https://github.com/ArduPilot/ardupilot
Plane: send GCS message on relay change
makes it easier to debug
This commit is contained in:
parent
45cf82ba15
commit
a00e4a1e83
|
@ -617,10 +617,13 @@ static void do_set_servo()
|
|||
static void do_set_relay()
|
||||
{
|
||||
if (next_nonnav_command.p1 == 1) {
|
||||
gcs_send_text_fmt(PSTR("Relay on"));
|
||||
relay.on();
|
||||
} else if (next_nonnav_command.p1 == 0) {
|
||||
gcs_send_text_fmt(PSTR("Relay off"));
|
||||
relay.off();
|
||||
}else{
|
||||
gcs_send_text_fmt(PSTR("Relay toggle"));
|
||||
relay.toggle();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -127,6 +127,7 @@ static void update_events(void)
|
|||
break;
|
||||
|
||||
case EVENT_TYPE_RELAY:
|
||||
gcs_send_text_fmt(PSTR("Relay toggle"));
|
||||
relay.toggle();
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue