// from only transition waves are 1s to phase shifts change bit
void psk2TOpsk1(uint8_t *BitStream, size_t size)
{
- size_t i;
- uint8_t phase=BitStream[0];
- //uint8_t lastBit=BitStream[0];
- for (i=1; i<size; i++){
- if (phase!=BitStream[i]){
+ uint8_t phase=0;
+ for (size_t i=0; i<size; i++){
+ if (BitStream[i]==1){
phase ^=1;
}
BitStream[i]=phase;
*clock = DetectPSKClock(dest, *size, *clock);
if (*clock==0) return -1;
int avgWaveVal=0, lastAvgWaveVal=0;
- //find first full wave
+ //find first phase shift
for (i=0; i<loopCnt; i++){
if (dest[i]+fc < dest[i+1] && dest[i+1] >= dest[i+2]){
if (waveStart == 0) {