Browse Source

removed parameters from actuate functions

videowall-pc-user 5 years ago
parent
commit
7905509a6e

+ 9 - 9
SketchAssistant/SketchAssistantWPF/LocalArmbandInterface.cs

@@ -14,7 +14,7 @@ namespace SketchAssistantWPF
      CallingConvention = CallingConvention.Cdecl)]
         public static extern int setupArmband();
 
-        [DllImport(@"../Debug/StaticLibMotors.dll", EntryPoint = "?startVibrate@ArmbandInterface@@QAAXHM@Z",
+       [DllImport(@"../Debug/StaticLibMotors.dll", EntryPoint = "?startVibrate@ArmbandInterface@@QAAXHM@Z",
      CallingConvention = CallingConvention.Cdecl)]
         public static extern void startVibrate(int motorNumber, float intensity);
 
@@ -22,21 +22,21 @@ namespace SketchAssistantWPF
      CallingConvention = CallingConvention.Cdecl)]
         public static extern void stopVibration(int motorNumber);
 
-        [DllImport(@"../Debug/StaticLibMotors.dll", EntryPoint = "?actuate100@ArmbandInterface@@QAAXHMH@Z",
+        [DllImport(@"../Debug/StaticLibMotors.dll", EntryPoint = "?actuate100@ArmbandInterface@@QAAXXZ",
      CallingConvention = CallingConvention.Cdecl)]
-        public static extern void actuate100(int motorNumber, double intensity, int duration);
+        public static extern void actuate100();
 
-        [DllImport(@"../Debug/StaticLibMotors.dll", EntryPoint = "?actuate66@ArmbandInterface@@QAAXHMH@Z",
+        [DllImport(@"../Debug/StaticLibMotors.dll", EntryPoint = "?actuate66@ArmbandInterface@@QAAXXZ",
      CallingConvention = CallingConvention.Cdecl)]
-        public static extern void actuate66(int motorNumber, double intensity, int duration);
+        public static extern void actuate66();
 
-        [DllImport(@"../Debug/StaticLibMotors.dll", EntryPoint = "?actuate33@ArmbandInterface@@QAAXHMH@Z",
+        [DllImport(@"../Debug/StaticLibMotors.dll", EntryPoint = "?actuate33@ArmbandInterface@@QAAXXZ",
      CallingConvention = CallingConvention.Cdecl)]
-        public static extern void actuate33(int motorNumber, double intensity, int duration);
+        public static extern void actuate33();
 
-        [DllImport(@"../Debug/StaticLibMotors.dll", EntryPoint = "?deleteArmband@ArmbandInterface@@QAAXXZ",
+      /*  [DllImport(@"../Debug/StaticLibMotors.dll", EntryPoint = "?deleteArmband@ArmbandInterface@@QAAXXZ",
      CallingConvention = CallingConvention.Cdecl)]
-        public static extern void deleteArmband();
+        public static extern void deleteArmband(); */
 
         //public void Vibrate()
 

+ 2 - 2
SketchAssistant/SketchAssistantWPF/MVP_Model.cs

@@ -362,7 +362,7 @@ namespace SketchAssistantWPF
             }
             //TODO remove
             //LocalArmbandInterface.startVibrate(0, 1);
-            LocalArmbandInterface.actuate33(0, 1.0, 1000);
+            LocalArmbandInterface.actuate100();
             Console.WriteLine("StartVibrate");
         }
 
@@ -393,7 +393,7 @@ namespace SketchAssistantWPF
             }
             UpdateUI();
             //TODO remove
-            LocalArmbandInterface.stopVibration(0);
+           // LocalArmbandInterface.stopVibration(0);
         }
 
         /// <summary>

+ 1 - 1
SketchAssistant/SketchAssistantWPF/MainWindow.xaml.cs

@@ -104,7 +104,7 @@ namespace SketchAssistantWPF
         /// <param name="e"></param>
         private void Window_Closed(object sender, EventArgs e)
         {
-            LocalArmbandInterface.deleteArmband();
+           // LocalArmbandInterface.deleteArmband();
             Console.WriteLine("armband deleted 2");
         }
 

BIN
SketchAssistant/SketchAssistantWPF/StaticLibMotors.dll


+ 3 - 3
SketchAssistant/StaticLib1/ArmbandInterface.cpp

@@ -72,15 +72,15 @@ extern "C" {
 			(stopFunctionHandle)(armband, (uint8_t)tactor);
 		}
 		
-		DllExport void __cdecl ArmbandInterface::actuate100(int tactor, float intensity, int duration) {
+		DllExport void __cdecl ArmbandInterface::actuate100() {
 			(actuateFunctionHandle)(armband, 0, 1.0, 20);
 		}
 
-		DllExport void __cdecl ArmbandInterface::actuate66(int tactor, float intensity, int duration) {
+		DllExport void __cdecl ArmbandInterface::actuate66() {
 		(actuateFunctionHandle)(armband, 0, 0.66, 20);
 		}
 
-		DllExport void __cdecl ArmbandInterface::actuate33(int tactor, float intensity, int duration) {
+		DllExport void __cdecl ArmbandInterface::actuate33() {
 		(actuateFunctionHandle)(armband, 0, 0.33, 20);
 		}
 	

+ 6 - 6
SketchAssistant/StaticLib1/ArmbandInterface.h

@@ -12,9 +12,9 @@ extern "C" {
 DllExport int setupArmband();
 DllExport void startVibrate(int tactor, float intensity);
 DllExport void stopVibrate(int tactor);
-DllExport void actuate100(int tactor, float intensity, int duration);
-DllExport void actuate66(int tactor, float intensity, int duration);
-DllExport void actuate33(int tactor, float intensity, int duration);
+DllExport void actuate100();
+DllExport void actuate66();
+DllExport void actuate33();
 DllExport void deleteArmband();
 
 class ArmbandInterface
@@ -31,9 +31,9 @@ class ArmbandInterface
 		__declspec(dllexport) int __cdecl  setupArmband();
 		__declspec(dllexport) void __cdecl startVibrate(int tactor, float intensity);
 		__declspec(dllexport) void __cdecl stopVibrate(int tactor);
-		__declspec(dllexport) void __cdecl actuate100(int tactor, float intensity, int duration);
-		__declspec(dllexport) void __cdecl actuate66(int tactor, float intensity, int duration);
-		__declspec(dllexport) void __cdecl actuate33(int tactor, float intensity, int duration);
+		__declspec(dllexport) void __cdecl actuate100();
+		__declspec(dllexport) void __cdecl actuate66();
+		__declspec(dllexport) void __cdecl actuate33();
 		__declspec(dllexport) void __cdecl deleteArmband();
 		void setupMotors();
 	//	void actuate(int tactor, double intensity, int duration);