mirror of https://github.com/drowe67/pirip.git
remove debug functions
parent
38c0a20449
commit
e7f5105b46
|
@ -44,21 +44,14 @@ static int terminate_calls = 0;
|
||||||
ngfmdmasync *fmmod = NULL;
|
ngfmdmasync *fmmod = NULL;
|
||||||
float initial_frequency = 0.0;
|
float initial_frequency = 0.0;
|
||||||
|
|
||||||
|
// Signals like Ctrl-C or segfaults get handled here
|
||||||
static void terminate(int num) {
|
static void terminate(int num) {
|
||||||
terminate_calls++;
|
terminate_calls++;
|
||||||
running=false;
|
running=false;
|
||||||
fprintf(stderr,"Caught signal %d - Terminating\n", num);
|
fprintf(stderr,"Caught signal %d - Terminating\n", num);
|
||||||
fmmod->clkgpio::HaveLock();
|
|
||||||
if (terminate_calls >= 5) {
|
if (terminate_calls >= 5) {
|
||||||
fprintf(stderr, "finishing....\n");
|
fprintf(stderr, "Too many signals - finishing....\n");
|
||||||
fmmod->clkgpio::HaveLock();
|
|
||||||
fmmod->clkgpio::print_clock_tree();
|
fmmod->clkgpio::print_clock_tree();
|
||||||
|
|
||||||
for(int i=0; i<100; i++) {
|
|
||||||
fprintf(stderr, "getcbposition: 0x%x GetCurrentSample: %d GetBufferAvailable: %d isrunning: %d\n",
|
|
||||||
(uint32_t)fmmod->getcbposition(), fmmod->GetCurrentSample(), fmmod->GetBufferAvailable(), fmmod->isrunning());
|
|
||||||
usleep(1000);
|
|
||||||
}
|
|
||||||
// make sure TX is off if we have to abort
|
// make sure TX is off if we have to abort
|
||||||
if (fmmod) delete fmmod;
|
if (fmmod) delete fmmod;
|
||||||
exit(1);
|
exit(1);
|
||||||
|
@ -368,7 +361,7 @@ int main(int argc, char **argv)
|
||||||
uint8_t tx_frame[bits_per_frame];
|
uint8_t tx_frame[bits_per_frame];
|
||||||
|
|
||||||
if (testframes) {
|
if (testframes) {
|
||||||
/* FSK_LDPC Tx in test frame mode */
|
/* FSK_LDPC Tx in test frame mode -------------------------------------------*/
|
||||||
|
|
||||||
assert(fsk_ldpc);
|
assert(fsk_ldpc);
|
||||||
ofdm_generate_payload_data_bits(data_bits, data_bits_per_frame);
|
ofdm_generate_payload_data_bits(data_bits, data_bits_per_frame);
|
||||||
|
@ -431,7 +424,7 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* regular FSK or FSK_LDPC Tx operation with bits/bytes from stdin */
|
/* regular FSK or FSK_LDPC Tx operation with bits/bytes from stdin ----------------------*/
|
||||||
int nframes = 0;
|
int nframes = 0;
|
||||||
while(1) {
|
while(1) {
|
||||||
uint8_t burst_control;
|
uint8_t burst_control;
|
||||||
|
@ -552,16 +545,8 @@ int main(int argc, char **argv)
|
||||||
finished:
|
finished:
|
||||||
check_pllc();
|
check_pllc();
|
||||||
fprintf(stderr, "finishing....\n");
|
fprintf(stderr, "finishing....\n");
|
||||||
fmmod->clkgpio::HaveLock();
|
|
||||||
fmmod->clkgpio::print_clock_tree();
|
|
||||||
for(int i=0; i<100; i++) {
|
|
||||||
fprintf(stderr, "getcbposition: 0x%x GetCurrentSample: %d GetBufferAvailable: %d isrunning: %d\n",
|
|
||||||
(uint32_t)fmmod->getcbposition(), fmmod->GetCurrentSample(), fmmod->GetBufferAvailable(), fmmod->isrunning());
|
|
||||||
usleep(1000);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fmmod) delete fmmod;
|
if (fmmod) delete fmmod;
|
||||||
|
|
||||||
if (fsk_ldpc) freedv_close(freedv);
|
if (fsk_ldpc) freedv_close(freedv);
|
||||||
|
|
||||||
if (*ant_switch_gpio) {
|
if (*ant_switch_gpio) {
|
||||||
|
|
Loading…
Reference in New Issue