try frameTime - 100 instead of 500

pull/105/head
alanbjohnston 5 years ago committed by GitHub
parent 44b370a740
commit 1f56695531
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1405,9 +1405,9 @@ void get_tlm_fox() {
/**/ /**/
// while ((millis() - sampleTime) < (unsigned int)samplePeriod) // while ((millis() - sampleTime) < (unsigned int)samplePeriod)
int startSleep = millis(); int startSleep = millis();
if ((millis() - sampleTime) < ((unsigned int)frameTime - 500)) // was 100 if ((millis() - sampleTime) < ((unsigned int)frameTime - 100)) // was 500 for FSK
sleep(3.8); // 0.5); // 25); // initial period sleep(3.8); // 0.5); // 25); // initial period
while ((millis() - sampleTime) < ((unsigned int)frameTime - 500)) // was 100 while ((millis() - sampleTime) < ((unsigned int)frameTime - 100)) // was 100
sleep(0.25); // 0.5); // 25); sleep(0.25); // 0.5); // 25);
// sleep((unsigned int)sleepTime); // sleep((unsigned int)sleepTime);
/**/ /**/
@ -2202,7 +2202,7 @@ void get_tlm_fox() {
{ {
start = millis(); // send frame until buffer fills start = millis(); // send frame until buffer fills
sock_ret = send(sock, buffer, (unsigned int)(ctr * 2 + 2), 0); sock_ret = send(sock, buffer, (unsigned int)(ctr * 2 + 2), 0);
printf("socket send %d in %d ms bytes: %d \n\n",times + 1, (unsigned int)millis() - start, sock_ret); printf("socket send %d in %d ms bytes: %d \n\n",times + 2, (unsigned int)millis() - start, sock_ret);
if ((millis() - start) > 500) { if ((millis() - start) > 500) {
printf("Buffer over filled!\n"); printf("Buffer over filled!\n");

Loading…
Cancel
Save

Powered by TurnKey Linux.