Remove dependencies between debug, displays and mncc-console
Test functions are cleaned up, due to removed dependencies.
This commit is contained in:
@@ -69,11 +69,9 @@ void get_win_size(int *w, int *h);
|
||||
|
||||
void display_wave_init(sender_t *sender, int samplerate);
|
||||
void display_wave_on(int on);
|
||||
void display_wave_limit_scroll(int on);
|
||||
void display_wave(sender_t *sender, sample_t *samples, int length, double range);
|
||||
|
||||
void display_status_on(int on);
|
||||
void display_status_limit_scroll(int on);
|
||||
void display_status_start(void);
|
||||
void display_status_channel(int channel, const char *type, const char *state);
|
||||
void display_status_subscriber(const char *number, const char *state);
|
||||
@@ -82,18 +80,15 @@ void display_status_end(void);
|
||||
void display_measurements_init(sender_t *sender, int samplerate);
|
||||
void display_measurements_exit(sender_t *sender);
|
||||
void display_measurements_on(int on);
|
||||
void display_measurements_limit_scroll(int on);
|
||||
dispmeasparam_t *display_measurements_add(sender_t *sender, char *name, char *format, enum display_measurements_type type, enum display_measurements_bar bar, double min, double max, double mark);
|
||||
void display_measurements_update(dispmeasparam_t *param, double value, double value2);
|
||||
void display_measurements(double elapsed);
|
||||
|
||||
void display_iq_init(int samplerate);
|
||||
void display_iq_on(int on);
|
||||
void display_iq_limit_scroll(int on);
|
||||
void display_iq(float *samples, int length);
|
||||
|
||||
void display_spectrum_init(int samplerate, double center_frequency);
|
||||
void display_spectrum_on(int on);
|
||||
void display_spectrum_limit_scroll(int on);
|
||||
void display_spectrum(float *samples, int length);
|
||||
|
||||
|
@@ -25,6 +25,7 @@
|
||||
#include <stdlib.h>
|
||||
#include "../libsample/sample.h"
|
||||
#include "../libmobile/sender.h"
|
||||
#include "../libdebug/debug.h"
|
||||
|
||||
/* must be odd value! */
|
||||
#define SIZE 23
|
||||
@@ -70,20 +71,11 @@ void display_iq_on(int on)
|
||||
iq_on = 0;
|
||||
} else
|
||||
iq_on = on;
|
||||
}
|
||||
|
||||
void display_iq_limit_scroll(int on)
|
||||
{
|
||||
int w, h;
|
||||
|
||||
if (!iq_on)
|
||||
return;
|
||||
|
||||
get_win_size(&w, &h);
|
||||
|
||||
printf("\0337");
|
||||
printf("\033[%d;%dr", (on) ? SIZE + 1 : 1, h);
|
||||
printf("\0338");
|
||||
if (iq_on)
|
||||
debug_limit_scroll = SIZE;
|
||||
else
|
||||
debug_limit_scroll = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@@ -26,6 +26,7 @@
|
||||
#include <math.h>
|
||||
#include "../libsample/sample.h"
|
||||
#include "../libmobile/sender.h"
|
||||
#include "../libdebug/debug.h"
|
||||
|
||||
#define MAX_NAME_LEN 16
|
||||
#define MAX_UNIT_LEN 16
|
||||
@@ -240,6 +241,8 @@ static void print_measurements(int on)
|
||||
}
|
||||
/* reset color and position */
|
||||
printf("\033[0;39m\0338"); fflush(stdout);
|
||||
|
||||
debug_limit_scroll = lines_total;
|
||||
}
|
||||
|
||||
void display_measurements_on(int on)
|
||||
@@ -251,20 +254,8 @@ void display_measurements_on(int on)
|
||||
measurements_on = 1 - measurements_on;
|
||||
else
|
||||
measurements_on = on;
|
||||
}
|
||||
|
||||
void display_measurements_limit_scroll(int on)
|
||||
{
|
||||
int w, h;
|
||||
|
||||
if (!measurements_on)
|
||||
return;
|
||||
|
||||
get_win_size(&w, &h);
|
||||
|
||||
printf("\0337");
|
||||
printf("\033[%d;%dr", (on) ? lines_total + 1 : 1, h);
|
||||
printf("\0338");
|
||||
debug_limit_scroll = 0;
|
||||
}
|
||||
|
||||
/* add new parameter on startup to the list of measurements */
|
||||
|
@@ -25,6 +25,7 @@
|
||||
#include "../libsample/sample.h"
|
||||
#include "../libmobile/sender.h"
|
||||
#include "../libfft/fft.h"
|
||||
#include "../libdebug/debug.h"
|
||||
|
||||
#define HEIGHT 20
|
||||
|
||||
@@ -74,20 +75,11 @@ void display_spectrum_on(int on)
|
||||
spectrum_on = 0;
|
||||
} else
|
||||
spectrum_on = on;
|
||||
}
|
||||
|
||||
void display_spectrum_limit_scroll(int on)
|
||||
{
|
||||
int w, h;
|
||||
|
||||
if (!spectrum_on)
|
||||
return;
|
||||
|
||||
get_win_size(&w, &h);
|
||||
|
||||
printf("\0337");
|
||||
printf("\033[%d;%dr", (on) ? HEIGHT + 1 : 1, h);
|
||||
printf("\0338");
|
||||
if (spectrum_on)
|
||||
debug_limit_scroll = HEIGHT;
|
||||
else
|
||||
debug_limit_scroll = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@@ -24,6 +24,7 @@
|
||||
#include <sys/ioctl.h>
|
||||
#include "../libsample/sample.h"
|
||||
#include "../libmobile/sender.h"
|
||||
#include "../libdebug/debug.h"
|
||||
|
||||
static int status_on = 0;
|
||||
static int line_count = 0;
|
||||
@@ -70,20 +71,11 @@ void display_status_on(int on)
|
||||
|
||||
if (status_on)
|
||||
print_status(1);
|
||||
}
|
||||
|
||||
void display_status_limit_scroll(int on)
|
||||
{
|
||||
int w, h;
|
||||
|
||||
if (!status_on)
|
||||
return;
|
||||
|
||||
get_win_size(&w, &h);
|
||||
|
||||
printf("\0337");
|
||||
printf("\033[%d;%dr", (on) ? lines_total + 1 : 1, h);
|
||||
printf("\0338");
|
||||
if (status_on)
|
||||
debug_limit_scroll = lines_total;
|
||||
else
|
||||
debug_limit_scroll = 0;
|
||||
}
|
||||
|
||||
/* start status display */
|
||||
@@ -142,6 +134,8 @@ void display_status_end(void)
|
||||
print_status(1);
|
||||
/* set new total lines */
|
||||
lines_total = line_count;
|
||||
if (status_on)
|
||||
debug_limit_scroll = lines_total;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -25,6 +25,7 @@
|
||||
#include <sys/ioctl.h>
|
||||
#include "../libsample/sample.h"
|
||||
#include "../libmobile/sender.h"
|
||||
#include "../libdebug/debug.h"
|
||||
|
||||
#define HEIGHT 11
|
||||
|
||||
@@ -82,20 +83,11 @@ void display_wave_on(int on)
|
||||
wave_on = 1 - wave_on;
|
||||
else
|
||||
wave_on = on;
|
||||
}
|
||||
|
||||
void display_wave_limit_scroll(int on)
|
||||
{
|
||||
int w, h;
|
||||
|
||||
if (!wave_on)
|
||||
return;
|
||||
|
||||
get_win_size(&w, &h);
|
||||
|
||||
printf("\0337");
|
||||
printf("\033[%d;%dr", (on) ? num_sender * HEIGHT + 1 : 1, h);
|
||||
printf("\0338");
|
||||
if (wave_on)
|
||||
debug_limit_scroll = HEIGHT * num_sender;
|
||||
else
|
||||
debug_limit_scroll = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user