From 7fde24bbdc2208dca6c2436f62ee1cb5eb9eb7b0 Mon Sep 17 00:00:00 2001
From: Janis Streib <me@janis-streib.de>
Date: Fri, 19 May 2023 17:25:10 +0200
Subject: [PATCH] ADD: digio support

---
 src/G4Export.cpp |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/G4Export.cpp b/src/G4Export.cpp
index 515caae..40cf212 100644
--- a/src/G4Export.cpp
+++ b/src/G4Export.cpp
@@ -56,6 +56,16 @@
 			if(!use_text) {
 				p << osc::BeginBundleImmediate;
 			}
+			p << osc::BeginMessage( (string("/g4/hub/") + std::to_string(prs->hubList[i].GetId()) + string("/digio")).c_str());
+			std::ostringstream ss;
+			if(use_text) {
+				ss << prs->hubList[i].GetDigIOData();
+				auto res = ss.str();
+				p << res.c_str();
+			} else {
+				p << osc::int64(prs->hubList[i].GetDigIOData());
+			}
+			p << osc::EndMessage;
 			auto dat = prs->hubList[i].GetPnoData();
 			for(int j=0;j<G4_SENSORS_PER_HUB;j++) {
 				if(!prs->hubList[i].IsSenActive(j)){

--
Gitblit v1.9.1