From 30624c61433343a0049c6322111e11c5c887ff9c Mon Sep 17 00:00:00 2001 From: Shawn Ferry Date: Tue, 17 Oct 2023 01:05:14 -0400 Subject: [PATCH] Don't set operation to read before writing segment --- Software/LogicAnalyzer/I2CProtocolAnalyzer/I2CAnalyzer.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Software/LogicAnalyzer/I2CProtocolAnalyzer/I2CAnalyzer.cs b/Software/LogicAnalyzer/I2CProtocolAnalyzer/I2CAnalyzer.cs index 32006cd..a96a825 100644 --- a/Software/LogicAnalyzer/I2CProtocolAnalyzer/I2CAnalyzer.cs +++ b/Software/LogicAnalyzer/I2CProtocolAnalyzer/I2CAnalyzer.cs @@ -98,10 +98,11 @@ namespace I2CProtocolAnalyzer { // Reset addressByte from repeat start addressByte = false; - op = "Read"; segment.Value += "10b Op Change"; segment.Value += $"\r\nAddress: {addr}"; segment.Value += $" Op: {op}"; + // Don't change op until after adding current segment value + op = "Read"; } // else This is a new start with a new address