void ccs_send_info(const uint8_t * mycall, const uint8_t * mycall_ext, int remove_module_char) { if (!ccs_is_connected()) return; if (dcs_is_connected()) { dcs_get_current_reflector_name(ccs_rx_reflector); if (memcmp(ccs_rx_reflector, "DCS", 3) != 0) { memset(ccs_rx_reflector, 0x20, 8); } } else { memset(ccs_rx_reflector, 0x20, 8); } memcpy(ccs_rx_callsign, mycall, 8); if (remove_module_char != 0) { ccs_rx_callsign[7] = 0x20; } memcpy(ccs_rx_callsign_ext, mycall_ext, 4); }
static void show_dcs_state(void) { char buf[10]; dcs_get_current_reflector_name(buf); buf[8] = 32; buf[9] = 0; vdisp_prints_xy( 95, 27, VDISP_FONT_4x6, dcs_is_connected(), buf ); if (dcs_changed() && ((repeater_mode != 0) || (hotspot_mode != 0))) { send_dcs_state(); } }
void ccs_start (void) { if (ccs_state == CCS_DISCONNECTED) { char buf[8]; dcs_get_current_reflector_name(buf); if (memcmp(buf, "DCS", 3) == 0) { ccs_set_dns_name(); ccs_state = CCS_DNS_REQ; } } }
static void phy_send_response(uint8_t * rx_header) { // Schalte UP4DAR auf Senden um send_cmd(tx_on, 1); // Bereite einen Header vor header[0] = 0x20; // send header command header[1] = 0x01; header[2] = 0x00; // "2nd control byte" header[3] = 0x00; // "3rd control byte" // RPT1 and RPT2 for (short i=0; i<CALLSIGN_LENGTH; i++) { header[4+i] = settings.s.my_callsign[i]; } for (short i=0; i<CALLSIGN_LENGTH; i++) { header[12+i] = settings.s.my_callsign[i]; } for (short i=0; i<CALLSIGN_LENGTH; ++i){ header[20+i] = "CQCQCQ "[i]; // UR is calling station } for (short i=0; i<CALLSIGN_LENGTH; ++i){ header[28+i] = settings.s.my_callsign[i]; // MY } for (short i=0; i<CALLSIGN_EXT_LENGTH; ++i){ header[36+i] = "RPTR"[i]; } send_cmd(header, 40); send_voice[0] = 0x21; send_voice[1] = 0x01; memcpy(send_voice+2, ambe_silence_data, 9); send_data[0] = 0x22; send_cmd(send_voice, 11); char txmsg[20]; dcs_get_current_reflector_name(txmsg); txmsg[6] = txmsg[7]; txmsg[7] = ' '; dcs_get_current_statustext(txmsg + 8); int j; for (j=0; j < 8; j++) { send_cmd(send_voice, 11); int i = j >> 1; if ((j & 1) == 0) { send_data[1] = 0x40 + i; send_data[2] = txmsg[ i * 5 + 0 ]; send_data[3] = txmsg[ i * 5 + 1 ]; } else { send_data[1] = txmsg[ i * 5 + 2 ]; send_data[2] = txmsg[ i * 5 + 3 ]; send_data[3] = txmsg[ i * 5 + 4 ]; } send_cmd(send_data, 4); } }