void _mds_render(uint8_t current_item){ if (flagGimbalMode){ MenuState->selected_item = 0; }else { MenuState->selected_item &= 0x03; } if (!flagGimbalMode){ print_string(&sux1, 0, 12); print_string(&sux2, 0, 21); print_string(&sux3, 0, 30); print_string(&sux4, 0, 39); }else { print_string(&sux3, 0, 12); } if (!flagGimbalMode){ print_string_2(eepromP_read_byte(eeLinkRollPitch) ? &yes : &no, 102, 12, current_item == 0 ? HIGHLIGHT_TO_THE_END_OF_LINE : HIGHLIGHT_NONE); print_string_2(eepromP_read_byte(eeButtonBeep) ? &yes : &no, 102, 30, current_item == 2 ? HIGHLIGHT_TO_THE_END_OF_LINE : HIGHLIGHT_NONE); print_string_2(eepromP_read_byte(eeAutoDisarm) ? &yes : &no, 102, 21, current_item == 1 ? HIGHLIGHT_TO_THE_END_OF_LINE : HIGHLIGHT_NONE); print_string_2(eepromP_read_byte(eeArmingBeeps) ? &yes : &no, 102, 39, current_item == 3 ? HIGHLIGHT_TO_THE_END_OF_LINE : HIGHLIGHT_NONE); }else { print_string_2(eepromP_read_byte(eeButtonBeep) ? &yes : &no, 102, 12, MenuState->selected_item == 0 ? HIGHLIGHT_TO_THE_END_OF_LINE : HIGHLIGHT_NONE); } }
int main(void) { char *str; str = "0123456789\n"; print_string_2(str); return (0); }
void __render_options(uint8_t total, const char* volatile title, char * volatile str_addr){ uint8_t volatile op = 0; FontSelector = f6x8; PixelType = 0; lcd_clear(); print_title(title); print_std_footer(); for (op=0; op < total; op++){ print_string_2((char *) pgm_read_word(str_addr + op*2), 0, 11 + 9*op, op == MenuState->selected_item ? HIGHLIGHT_FULL_LINE : HIGHLIGHT_NONE); } lcd_update(); }
void _brd_render(uint8_t board_orientation){ lcd_clear12x16(); print_string(&brd1, 34, 11); _print_arrow(board_orientation); FontSelector = f6x8; print_string(&backprev, 0, 57); print_string(&nextsel, X1, 57); print_string_2(&affects_all_profiles, 3, 48, HIGHLIGHT_FULL_LINE); }