From 7ba4e67dd36f3a00ffed4a4bc0085d0beeab2595 Mon Sep 17 00:00:00 2001 From: giggletech <124131450+giggletech@users.noreply.github.com> Date: Mon, 24 Jul 2023 10:54:19 +1000 Subject: [PATCH 1/3] Update Names --- config.ini | 6 +++--- giggletech-router/src/giggletech_osc.rs | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/config.ini b/config.ini index c423635..e35ca59 100644 --- a/config.ini +++ b/config.ini @@ -14,10 +14,10 @@ port_rx = 9001 # # IP Address of Headpat Device - device_ips = 192.168.1.151 192.168.1.157 192.168.1.153 + device_ips = 192.168.1.186 # # Unity Proximity parameter[s] - proximity_parameters_multi = proximity_01 proximity_02 proximity_03 + proximity_parameters_multi = proximity_01 # max_speed_parameter = max_speed # @@ -33,5 +33,5 @@ max_speed_scale = 100 # # OSC Timeout [seconds] - timeout = 5 + timeout = 5000 diff --git a/giggletech-router/src/giggletech_osc.rs b/giggletech-router/src/giggletech_osc.rs index f09071b..65d8c9f 100644 --- a/giggletech-router/src/giggletech_osc.rs +++ b/giggletech-router/src/giggletech_osc.rs @@ -7,6 +7,7 @@ use async_osc::{ OscSocket, Result}; // OSC Address Setup const TX_OSC_MOTOR_ADDRESS: &str = "/avatar/parameters/motor"; +const TX_OSC_GIGGLESPARK: &str = "/motor"; //const TX_OSC_LED_ADDRESS_2: &str = "/avatar/parameters/led"; pub(crate) fn create_socket_address(host: &str, port: &str) -> String { @@ -38,5 +39,6 @@ pub(crate) async fn send_data(device_ip: &str, value: i32) -> Result<()> { let tx_socket = setup_tx_socket(tx_socket_address.clone()).await?; tx_socket.connect(tx_socket_address).await?; tx_socket.send((TX_OSC_MOTOR_ADDRESS, (value,))).await?; + tx_socket.send((TX_OSC_GIGGLESPARK, (value,))).await?; Ok(()) } \ No newline at end of file From c9c9f656f65cdfec28154f4e77a5c07bc7e0bf8f Mon Sep 17 00:00:00 2001 From: giggletech <124131450+giggletech@users.noreply.github.com> Date: Mon, 24 Jul 2023 11:12:11 +1000 Subject: [PATCH 2/3] Giggle_spark and puck working toghther --- config.ini | 6 +++--- giggletech-router/src/osc_timeout.rs | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/config.ini b/config.ini index e35ca59..871155a 100644 --- a/config.ini +++ b/config.ini @@ -14,10 +14,10 @@ port_rx = 9001 # # IP Address of Headpat Device - device_ips = 192.168.1.186 + device_ips = 192.168.1.186 192.168.1.157 # # Unity Proximity parameter[s] - proximity_parameters_multi = proximity_01 + proximity_parameters_multi = proximity_01 proximity_02 # max_speed_parameter = max_speed # @@ -33,5 +33,5 @@ max_speed_scale = 100 # # OSC Timeout [seconds] - timeout = 5000 + timeout = 5 diff --git a/giggletech-router/src/osc_timeout.rs b/giggletech-router/src/osc_timeout.rs index 920ad03..fc108ad 100644 --- a/giggletech-router/src/osc_timeout.rs +++ b/giggletech-router/src/osc_timeout.rs @@ -18,6 +18,7 @@ pub async fn osc_timeout(device_ip: &str, timeout: u64) -> Result<()> { let elapsed_time = Instant::now().duration_since(*DEVICE_LAST_SIGNAL_TIME.lock().unwrap().get(device_ip).unwrap_or(&Instant::now())); //println!("Device Ip {} Elapsed Time {:?}", device_ip, elapsed_time); if elapsed_time >= Duration::from_secs(timeout) { + //println!("Timeout"); giggletech_osc::send_data(device_ip, 0i32).await?; let mut device_last_signal_times = DEVICE_LAST_SIGNAL_TIME.lock().unwrap(); device_last_signal_times.insert(device_ip.to_string(), Instant::now()); From 461efadecf874dd03d112536dbc3d1873b692f38 Mon Sep 17 00:00:00 2001 From: giggletech Date: Thu, 10 Aug 2023 15:12:08 +1000 Subject: [PATCH 3/3] Send Production --- config.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config.ini b/config.ini index 871155a..f2be6c3 100644 --- a/config.ini +++ b/config.ini @@ -14,10 +14,10 @@ port_rx = 9001 # # IP Address of Headpat Device - device_ips = 192.168.1.186 192.168.1.157 + device_ips = GIGGLE.TECH.DEVICE.IP # # Unity Proximity parameter[s] - proximity_parameters_multi = proximity_01 proximity_02 + proximity_parameters_multi = proximity_01 # max_speed_parameter = max_speed #