From 9df7956a269525b545f0f9d570702765c5ff4b9c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Malte=20K=C3=B6gel?= <koegel@vr.rwth-aachen.de>
Date: Fri, 6 Oct 2023 16:33:45 +0200
Subject: [PATCH] Added DEBUG MODE message to csv-logs

---
 Source/StudyFrameworkPlugin/Private/HUD/SFHUDWidget.cpp | 4 ----
 Source/StudyFrameworkPlugin/Private/SFGameInstance.cpp  | 3 +++
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/Source/StudyFrameworkPlugin/Private/HUD/SFHUDWidget.cpp b/Source/StudyFrameworkPlugin/Private/HUD/SFHUDWidget.cpp
index df79be0..1d611f4 100644
--- a/Source/StudyFrameworkPlugin/Private/HUD/SFHUDWidget.cpp
+++ b/Source/StudyFrameworkPlugin/Private/HUD/SFHUDWidget.cpp
@@ -89,7 +89,6 @@ void USFHUDWidget::AddLogMessage(const FString& Text)
 
 void USFHUDWidget::ClearWidget()
 {
-	//TODO Clear Debug as well? When is this called?
 	SetCondition({});
 	SetParticipant("???");
 	SetPhase("???");
@@ -99,7 +98,6 @@ void USFHUDWidget::ClearWidget()
 FHUDSavedData USFHUDWidget::GetData()
 {
 	FHUDSavedData Data;
-	//Data.bInDebugMode = bInDebugMode; // TODO: Do we want to save, whether data has been collected in debug mode? Or should we treat it the same? What happens, if the first half is collected in debug mode, the second half in normal mode
 	Data.Status = StatusTextBox->GetText().ToString();
 	Data.Participant = ParticipantTextBox->GetText().ToString();
 	Data.Phase = PhaseTextBox->GetText().ToString();
@@ -110,8 +108,6 @@ FHUDSavedData USFHUDWidget::GetData()
 
 void USFHUDWidget::SetData(FHUDSavedData Data)
 {
-	//TODO Do we want this?
-	//SetbInDebugMode(bInDebugMode);
 	if (Data.Status.StartsWith("Status:"))
 		StatusTextBox->SetText(FText::FromString(Data.Status));
 	else
diff --git a/Source/StudyFrameworkPlugin/Private/SFGameInstance.cpp b/Source/StudyFrameworkPlugin/Private/SFGameInstance.cpp
index 992ac5a..9f5c1e7 100644
--- a/Source/StudyFrameworkPlugin/Private/SFGameInstance.cpp
+++ b/Source/StudyFrameworkPlugin/Private/SFGameInstance.cpp
@@ -765,6 +765,9 @@ void USFGameInstance::OnFadedIn()
 	if(Participant && Participant->GetCurrentCondition())
 	{
 		//this should be logged first
+		if (bInDebugMode) {
+			USFLoggingBPLibrary::LogComment("Running in DEBUG MODE");
+		}
 		USFLoggingBPLibrary::LogComment("Start Condition: " + Participant->GetCurrentCondition()->GetPrettyName());
 	}
 
-- 
GitLab