Issue 486. Maybe.

This commit is contained in:
wb2osz 2023-08-16 15:00:10 +01:00
parent a87b72e040
commit 7a8e4320ac
3 changed files with 52 additions and 3 deletions

View File

@ -300,7 +300,7 @@ int main (int argc, char *argv[])
text_color_init(t_opt);
text_color_set(DW_COLOR_INFO);
dw_printf ("Dire Wolf version %d.%d (%s) BETA TEST 4\n", MAJOR_VERSION, MINOR_VERSION, __DATE__);
dw_printf ("Dire Wolf version %d.%d (%s) BETA TEST 5\n", MAJOR_VERSION, MINOR_VERSION, __DATE__);
//dw_printf ("Dire Wolf DEVELOPMENT version %d.%d %s (%s)\n", MAJOR_VERSION, MINOR_VERSION, "G", __DATE__);
//dw_printf ("Dire Wolf version %d.%d\n", MAJOR_VERSION, MINOR_VERSION);

View File

@ -51,8 +51,8 @@
#define MAGIC2 0x56788765
static int new_count = 0;
static int delete_count = 0;
volatile static int new_count = 0;
volatile static int delete_count = 0;
/***********************************************************************************
@ -425,6 +425,50 @@ alevel_t rrbb_get_audio_level (rrbb_t b)
/***********************************************************************************
*
* Name: rrbb_set_speed_error
*
* Purpose: Set speed error of the received frame.
*
* Inputs: b Handle for bit array.
* speed_error In percentage.
*
***********************************************************************************/
void rrbb_set_speed_error (rrbb_t b, float speed_error)
{
assert (b != NULL);
assert (b->magic1 == MAGIC1);
assert (b->magic2 == MAGIC2);
b->speed_error = speed_error;
}
/***********************************************************************************
*
* Name: rrbb_get_speed_error
*
* Purpose: Get speed error of the received frame.
*
* Inputs: b Handle for bit array.
*
* Returns: speed error in percentage.
*
***********************************************************************************/
float rrbb_get_speed_error (rrbb_t b)
{
assert (b != NULL);
assert (b->magic1 == MAGIC1);
assert (b->magic2 == MAGIC2);
return (b->speed_error);
}
/***********************************************************************************
*
* Name: rrbb_get_is_scrambled
@ -488,6 +532,7 @@ int rrbb_get_prev_descram (rrbb_t b)
}
/* end rrbb.c */

View File

@ -33,6 +33,7 @@ typedef struct rrbb_s {
int slice; /* Which slicer. */
alevel_t alevel; /* Received audio level at time of frame capture. */
float speed_error; /* Received data speed error as percentage. */
unsigned int len; /* Current number of samples in array. */
int is_scrambled; /* Is data scrambled G3RUH / K9NG style? */
@ -84,6 +85,9 @@ int rrbb_get_slice (rrbb_t b);
void rrbb_set_audio_level (rrbb_t b, alevel_t alevel);
alevel_t rrbb_get_audio_level (rrbb_t b);
void rrbb_set_speed_error (rrbb_t b, float speed_error);
float rrbb_get_speed_error (rrbb_t b);
int rrbb_get_is_scrambled (rrbb_t b);
int rrbb_get_descram_state (rrbb_t b);
int rrbb_get_prev_descram (rrbb_t b);