void Copter::report_flight_modes() { cliSerial->printf("Flight modes\n"); print_divider(); for(int16_t i = 0; i < 6; i++ ) { print_switch(i, (control_mode_t)flight_modes[i].get(), BIT_IS_SET(g.simple_modes, i)); } print_blanks(2); }
void Copter::report_flight_modes() { cliSerial->printf_P(PSTR("Flight modes\n")); print_divider(); for(int16_t i = 0; i < 6; i++ ) { print_switch(i, flight_modes[i], BIT_IS_SET(g.simple_modes, i)); } print_blanks(2); }
/* Print help for a specific front-end, etc. */ static void print_filtered_help (unsigned int flag) { unsigned int i, len, filter, indent = 0; bool duplicates = false; const char *help, *opt, *tab; static char *printed; /* APPLE LOCAL mainline */ if (flag == CL_COMMON || flag == CL_TARGET) { filter = flag; if (!printed) printed = xmalloc (cl_options_count); memset (printed, 0, cl_options_count); } else { /* Don't print COMMON options twice. */ filter = flag | CL_COMMON; for (i = 0; i < cl_options_count; i++) { if ((cl_options[i].flags & filter) != flag) continue; /* Skip help for internal switches. */ if (cl_options[i].flags & CL_UNDOCUMENTED) continue; /* Skip switches that have already been printed, mark them to be listed later. */ if (printed[i]) { duplicates = true; indent = print_switch (cl_options[i].opt_text, indent); } } if (duplicates) { putchar ('\n'); putchar ('\n'); } } for (i = 0; i < cl_options_count; i++) { if ((cl_options[i].flags & filter) != flag) continue; /* Skip help for internal switches. */ if (cl_options[i].flags & CL_UNDOCUMENTED) continue; /* Skip switches that have already been printed. */ if (printed[i]) continue; printed[i] = true; help = cl_options[i].help; if (!help) help = undocumented_msg; /* Get the translation. */ help = _(help); tab = strchr (help, '\t'); if (tab) { len = tab - help; opt = help; help = tab + 1; } else { opt = cl_options[i].opt_text; len = strlen (opt); } wrap_help (help, opt, len); } putchar ('\n'); }