Update main.c moved copy

fc-4
Alan Johnston 11 months ago committed by GitHub
parent 818c680015
commit 2a6ace7ade
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -2337,14 +2337,21 @@ void get_tlm_fc() {
while (!Encode_AllDataCollected() && ((millis() - start_timer) < 2000))
{
bpsk_size = 0;
if (Encode_CanCollect())
{
bpsk_size = 1280;
Encode_CollectSamples(&bpsk_buffer[0], &bpsk_size);
if (bpsk_size == 0) {
start_timer = 0; // exit while loop
printf("0");
fflush(stdout);
}
else
{
printf("~");
fflush(stdout);
// copy to main buffer
}
int count = 0;
while (count < bpsk_size) {
if ((ctr % 24000) == 0)
@ -2352,6 +2359,10 @@ void get_tlm_fc() {
buffer[ctr++] = (int)( (float)bpsk_buffer[count] );
count += 4;
}
}
}
if (bpsk_size == 0)
sleep(0.01);
// printf("\n");
}
printf("Encode collected time: %d\n", millis() - start_timer);

Loading…
Cancel
Save

Powered by TurnKey Linux.