evil ass bug

git-svn-id: http://svn.openzap.org/svn/openzap/trunk@260 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
Anthony Minessale committed 2007-06-15 08:16:38 +00:00
1 parent 8d50ec5b9c
commit f4b07092fc
6 files changed
+37 -24

No files matched your search

+25 -19
View File
@@ -309,30 +309,36 @@ dsp_fsk_sample (dsp_fsk_handle_t *handle, double normalized_sample)
switch (handle->state) {
case FSK_STATE_DATA:
(*handle->attr.bithandler) (handle->attr.bithandler_arg, handle->current_bit);
{
(*handle->attr.bithandler) (handle->attr.bithandler_arg, handle->current_bit);
}
break;
case FSK_STATE_CHANSEIZE:
if (handle->last_bit != handle->current_bit) {
handle->conscutive_state_bits++;
} else {
handle->conscutive_state_bits = 0;
}
if (handle->conscutive_state_bits > 15) {
handle->state = FSK_STATE_CARRIERSIG;
handle->conscutive_state_bits = 0;
{
if (handle->last_bit != handle->current_bit) {
handle->conscutive_state_bits++;
} else {
handle->conscutive_state_bits = 0;
}
if (handle->conscutive_state_bits > 15) {
handle->state = FSK_STATE_CARRIERSIG;
handle->conscutive_state_bits = 0;
}
}
break;
case FSK_STATE_CARRIERSIG:
if (handle->current_bit) {
handle->conscutive_state_bits++;
} else {
handle->conscutive_state_bits = 0;
}
if (handle->conscutive_state_bits > 15) {
handle->state = FSK_STATE_DATA;
handle->conscutive_state_bits = 0;
{
if (handle->current_bit) {
handle->conscutive_state_bits++;
} else {
handle->conscutive_state_bits = 0;
}
if (handle->conscutive_state_bits > 15) {
handle->state = FSK_STATE_DATA;
handle->conscutive_state_bits = 0;
}
}
break;
}