>               // From this point sync clk
>               //
>               d_sign_last = (clk[0] > 0 ? 1: -1);
>               for (i = 0; i < n_clk_in ; i++) {
>                       sign_current = (clk[i] > 0 ? 1: -1);
>                       if(sign_current != d_sign_last) {
>                               // zc in clock
>                               consume(1, i);
>                               break;
>                       }
>                       d_sign_last = sign_current;
>               }
>
>               enter_locked();
>               return 0;       // No output produced, but now sync...
>
>
> The break after consume may be incorrect.  If it's executed you do not
> set d_sign_last to the new sign (sign_current).
>
> Eric
>
>

If the break is executed, we have clock and signal aligned; enter_locked()
and return are executed after break and on next work invocation we will be
in the sync state, that is the other case of the switch.

Matteo



_______________________________________________
Discuss-gnuradio mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to