void CTFTSerial::setLockoutInt() { // Clear the screen clearScreen(); setFontSize(FONT_LARGE); // Draw MMDVM logo displayBitmap(0U, 0U, "MMDVM_sm.bmp"); gotoPosPixel(20U, 60U); displayText("LOCKOUT"); m_mode = MODE_LOCKOUT; }
void CTFTSerial::writeDMRInt(unsigned int slotNo, const std::string& src, bool group, const std::string& dst, const char* type) { assert(type != NULL); if (m_mode != MODE_DMR) { // Clear the screen clearScreen(); setFontSize(FONT_MEDIUM); // Draw DMR insignia displayBitmap(0U, 0U, "DMR_sm.bmp"); if (slotNo == 1U) { gotoPosPixel(5U, 90U); displayText("2 Listening"); } else { gotoPosPixel(5U, 55U); displayText("1 Listening"); } } if (slotNo == 1U) { char text[30U]; ::sprintf(text, "1 %s %s", type, src.c_str()); gotoPosPixel(5U, 55U); displayText(text); ::sprintf(text, "%s%s", group ? "TG" : "", dst.c_str()); gotoPosPixel(65U, 72U); displayText(text); } else { char text[30U]; ::sprintf(text, "2 %s %s", type, src.c_str()); gotoPosPixel(5U, 90U); displayText(text); ::sprintf(text, "%s%s", group ? "TG" : "", dst.c_str()); gotoPosPixel(65U, 107U); displayText(text); } m_mode = MODE_DMR; }
void info() { // your playground... display variables - meant for testing/verification purposes only std::cout << std::endl << "============ info start ==============" << std::endl; std::cout << "size of board, in bytes = " << sizeof(board) << std::endl; std::cout << "Material value = " << board.Material << std::endl; std::cout << "White castling rights = " << int(board.castleWhite) << std::endl; std::cout << "Black castling rights = " << int(board.castleBlack) << std::endl; std::cout << "En-passant square = " << board.epSquare << std::endl; std::cout << "Fifty move count = " << board.fiftyMove << std::endl; std::cout << "bitCnt of white pawns = " << bitCnt(board.whitePawns) << std::endl; std::cout << std::endl << "bitmap of blackKnights | board.whitePawns:" << std::endl; displayBitmap(board.blackKnights | board.whitePawns); std::cout << "============ info end ================" << std::endl << std::endl; return; }
void CTFTSerial::setIdleInt() { // Clear the screen clearScreen(); setFontSize(FONT_LARGE); // Draw MMDVM logo displayBitmap(0U, 0U, "MMDVM_sm.bmp"); char text[30]; ::sprintf(text, "%-6s / %u", m_callsign.c_str(), m_dmrid); gotoPosPixel(18U, 55U); displayText(text); gotoPosPixel(45U, 90U); displayText("IDLE"); m_mode = MODE_IDLE; }
void CTFTSerial::writeFusionInt(const char* source, const char* dest, const char* type, const char* origin) { assert(source != NULL); assert(dest != NULL); assert(type != NULL); assert(origin != NULL); if (m_mode != MODE_YSF) { // Clear the screen clearScreen(); setFontSize(FONT_MEDIUM); // Draw the System Fusion insignia displayBitmap(0U, 0U, "YSF_sm.bmp"); } char text[30U]; ::sprintf(text, "%s %.10s", type, source); gotoPosPixel(5U, 70U); displayText(text); ::sprintf(text, " %.10s", dest); gotoPosPixel(5U, 90U); displayText(text); if (::strcmp(origin, " ") != 0) { ::sprintf(text, "at %.10s", origin); gotoPosPixel(5U, 110U); displayText(text); } else { gotoPosPixel(5U, 110U); displayText(" "); } m_mode = MODE_YSF; }
void CTFTSerial::writeDStarInt(const char* my1, const char* my2, const char* your, const char* type, const char* reflector) { assert(my1 != NULL); assert(my2 != NULL); assert(your != NULL); assert(type != NULL); assert(reflector != NULL); if (m_mode != MODE_DSTAR) { // Clear the screen clearScreen(); setFontSize(FONT_MEDIUM); // Draw D-Star insignia displayBitmap(0U, 0U, "DStar_sm.bmp"); } char text[30U]; ::sprintf(text, "%s %.8s/%4.4s", type, my1, my2); gotoPosPixel(5U, 70U); displayText(text); ::sprintf(text, "%.8s", your); gotoPosPixel(5U, 90U); displayText(text); if (::strcmp(reflector, " ") != 0) { ::sprintf(text, "via %.8s", reflector); gotoPosPixel(5U, 110U); displayText(text); } else { gotoPosPixel(5U, 110U); displayText(" "); } m_mode = MODE_DSTAR; }
void CTFTSerial::setErrorInt(const char* text) { assert(text != NULL); // Clear the screen clearScreen(); setFontSize(FONT_MEDIUM); // Draw MMDVM logo displayBitmap(0U, 0U, "MMDVM_sm.bmp"); setForeground(COLOUR_RED); gotoPosPixel(18U, 55U); displayText(text); gotoPosPixel(18U, 90U); displayText("ERROR"); setForeground(COLOUR_BLACK); m_mode = MODE_ERROR; }