From 1cc5344dd35a09911bac1db687e4d2c550c117c8 Mon Sep 17 00:00:00 2001
From: c vw <dl1ycf@darc.de>
Date: Thu, 13 Jan 2022 10:04:56 +0100
Subject: [PATCH] Maintain metis_offset for USB/OYZ as well!

---
 old_protocol.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/old_protocol.c b/old_protocol.c
index 7d98206..687757a 100644
--- a/old_protocol.c
+++ b/old_protocol.c
@@ -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
 
-- 
2.45.2