]> git.rkrishnan.org Git - pihpsdr.git/commitdiff
Maintain metis_offset for USB/OYZ as well!
authorc vw <dl1ycf@darc.de>
Thu, 13 Jan 2022 09:04:56 +0000 (10:04 +0100)
committerc vw <dl1ycf@darc.de>
Thu, 13 Jan 2022 09:04:56 +0000 (10:04 +0100)
old_protocol.c

index 7d982061df62cb8e9799bec847cd6e1ccaa95102..687757a535c01cb4b99f1522fa64793e3d94c46a 100644 (file)
@@ -1338,7 +1338,6 @@ void ozy_send_buffer() {
   if(metis_offset==8) {
     //
     // Every second packet is a "C0=0" packet
-    // Note for USB devices metis_offest is ALWAYS 8 (!)
     //
     output_buffer[C0]=0x00;
     output_buffer[C1]=0x00;
@@ -2053,6 +2052,17 @@ static void ozyusb_write(unsigned char* buffer,int length)
       break;
   }
 */
+  //
+  // DL1YCF:
+  // Although the METIS offset is not used for OZY, we have to maintain it
+  // since it triggers the "alternating" sending of C0=0 and C0!=0 
+  // C+C packets in ozy_send_buffer().
+  //
+  if (metis_offset == 8) {
+    metis_offset = 520;
+  } else {
+    metis_offset = 8;
+  }
 }
 #endif