Plane: send GCS message on relay change

makes it easier to debug
This commit is contained in:
Andrew Tridgell 2013-08-30 15:05:16 +10:00
parent 45cf82ba15
commit a00e4a1e83
2 changed files with 4 additions and 0 deletions

View File

@ -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();
}
}

View File

@ -127,6 +127,7 @@ static void update_events(void)
break;
case EVENT_TYPE_RELAY:
gcs_send_text_fmt(PSTR("Relay toggle"));
relay.toggle();
break;
}