mirror of
https://github.com/dj0abr/SSB_HighSpeed_Modem.git
synced 2026-06-02 05:54:39 -04:00
update
This commit is contained in:
+1
-1
@@ -128,7 +128,7 @@ uint16_t *make_waterfall(float fre, int *retlen)
|
||||
|
||||
// check if signal detected or not
|
||||
if (idiff > 100) sig = 0;
|
||||
if (idiff < 20) sig = 1;
|
||||
if (idiff < 30) sig = 1;
|
||||
|
||||
rxlevel_deteced = sig;
|
||||
|
||||
|
||||
+14
-16
@@ -307,11 +307,6 @@ void bc_rxdata(uint8_t* pdata, int len, struct sockaddr_in* rxsock)
|
||||
* 110 .. 209 ... CAP device name
|
||||
*/
|
||||
|
||||
//printf("%d %d %d %d %d %d %d \n",pdata[1], pdata[2], pdata[3], pdata[4], pdata[5], pdata[6], pdata[7]);
|
||||
io_setAudioDevices(pdata[1], pdata[2], pdata[3], pdata[4], pdata[5], (char *)(pdata + 10), (char *)(pdata + 110));
|
||||
|
||||
safemode = pdata[6];
|
||||
|
||||
char rxip[20];
|
||||
strcpy(rxip, inet_ntoa(rxsock->sin_addr));
|
||||
|
||||
@@ -336,14 +331,19 @@ void bc_rxdata(uint8_t* pdata, int len, struct sockaddr_in* rxsock)
|
||||
if (!strcmp(appIP, rxip))
|
||||
{
|
||||
//printf("app (%s) is searching modem. Sending modem IP to the app\n",appIP);
|
||||
restart_modems = 1;
|
||||
// App searches for the modem IP, mirror the received messages
|
||||
// so the app gets an UDP message with this local IP
|
||||
int alen;
|
||||
uint8_t* txdata = io_getAudioDevicelist(&alen);
|
||||
sendUDP(appIP, UdpDataPort_ModemToApp, txdata, alen);
|
||||
}
|
||||
else
|
||||
return;
|
||||
}
|
||||
|
||||
//printf("%d %d %d %d %d %d %d \n",pdata[1], pdata[2], pdata[3], pdata[4], pdata[5], pdata[6], pdata[7]);
|
||||
io_setAudioDevices(pdata[1], pdata[2], pdata[3], pdata[4], pdata[5], (char*)(pdata + 10), (char*)(pdata + 110));
|
||||
safemode = pdata[6];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -560,16 +560,14 @@ void GRdata_rxdata(uint8_t* pdata, int len, struct sockaddr_in* rxsock)
|
||||
uint8_t* pl = unpack_data(pdata, len);
|
||||
if (pl != NULL)
|
||||
{
|
||||
if (VoiceAudioMode != VOICEMODE_DV_FULLDUPLEX)
|
||||
{
|
||||
// complete frame received
|
||||
// send payload to app
|
||||
uint8_t txpl[PAYLOADLEN + 10 + 1];
|
||||
memcpy(txpl + 1, pl, PAYLOADLEN + 10);
|
||||
txpl[0] = 1; // type 1: payload data follows
|
||||
sendUDP(appIP, UdpDataPort_ModemToApp, txpl, PAYLOADLEN + 10 + 1);
|
||||
}
|
||||
else
|
||||
// complete frame received
|
||||
// send payload to app
|
||||
uint8_t txpl[PAYLOADLEN + 10 + 1];
|
||||
memcpy(txpl + 1, pl, PAYLOADLEN + 10);
|
||||
txpl[0] = 1; // type 1: payload data follows
|
||||
sendUDP(appIP, UdpDataPort_ModemToApp, txpl, PAYLOADLEN + 10 + 1);
|
||||
|
||||
if (VoiceAudioMode == VOICEMODE_DV_FULLDUPLEX)
|
||||
{
|
||||
// send to Codec decoder
|
||||
if (*(pl + 3) != 0) // minfo=0 ... just a filler, ignore
|
||||
|
||||
@@ -429,7 +429,7 @@ static int ccol_idx = 0;
|
||||
// we have about 2000 S/s, but this many points would make the GUI slow
|
||||
// so we send only every x
|
||||
static int ev = 0;
|
||||
if (++ev >= 10)
|
||||
if (++ev >= 5)//10)
|
||||
{
|
||||
ev = 0;
|
||||
int32_t re = (int32_t)(syms.real * 16777216.0);
|
||||
|
||||
Reference in New Issue
Block a user