+// by marshmellow
+// convert psk1 demod to psk2 demod
+// only transition waves are 1s
+void psk1TOpsk2(uint8_t *BitStream, size_t size)
+{
+ size_t i=1;
+ uint8_t lastBit=BitStream[0];
+ for (; i<size; i++){
+ if (lastBit!=BitStream[i]){
+ lastBit=BitStream[i];
+ BitStream[i]=1;
+ } else {
+ BitStream[i]=0;
+ }
+ }
+ return;
+}