summaryrefslogtreecommitdiff
path: root/macros/Scilab-Arduino
diff options
context:
space:
mode:
Diffstat (limited to 'macros/Scilab-Arduino')
-rw-r--r--macros/Scilab-Arduino/GenerateSetupFunction.binbin4288 -> 4540 bytes
-rw-r--r--macros/Scilab-Arduino/GetArduinoFunctions.binbin1832 -> 2100 bytes
-rw-r--r--macros/Scilab-Arduino/GetArduinoFunctions.sci15
-rw-r--r--macros/Scilab-Arduino/GetArduinoSetupFunctions.binbin1456 -> 1640 bytes
-rw-r--r--macros/Scilab-Arduino/GetArduinoSetupFunctions.sci4
-rw-r--r--macros/Scilab-Arduino/InsertSetupInList.binbin6068 -> 6320 bytes
-rw-r--r--macros/Scilab-Arduino/InsertSetupInList.sci118
-rw-r--r--macros/Scilab-Arduino/libbin772 -> 768 bytes
8 files changed, 75 insertions, 62 deletions
diff --git a/macros/Scilab-Arduino/GenerateSetupFunction.bin b/macros/Scilab-Arduino/GenerateSetupFunction.bin
index 7a5052d..ea2bdec 100644
--- a/macros/Scilab-Arduino/GenerateSetupFunction.bin
+++ b/macros/Scilab-Arduino/GenerateSetupFunction.bin
Binary files differ
diff --git a/macros/Scilab-Arduino/GetArduinoFunctions.bin b/macros/Scilab-Arduino/GetArduinoFunctions.bin
index 82b0d45..fe9e204 100644
--- a/macros/Scilab-Arduino/GetArduinoFunctions.bin
+++ b/macros/Scilab-Arduino/GetArduinoFunctions.bin
Binary files differ
diff --git a/macros/Scilab-Arduino/GetArduinoFunctions.sci b/macros/Scilab-Arduino/GetArduinoFunctions.sci
index 19d59ca..1af351b 100644
--- a/macros/Scilab-Arduino/GetArduinoFunctions.sci
+++ b/macros/Scilab-Arduino/GetArduinoFunctions.sci
@@ -12,11 +12,14 @@ function ArduinoFunctions = GetArduinoFunctions()
// -----------------------------------------------------------------
ArduinoFunctions = [
- "cmd_digital_out"
- "cmd_digital_in"
- "cmd_analog_out"
- "cmd_analog_in"
- "cmd_dcmotor_setup"
- "cmd_dcmotor_run"];
+ "cmd_digital_out"
+ "cmd_digital_in"
+ "cmd_analog_out"
+ "cmd_analog_in"
+ "cmd_dcmotor_setup"
+ "cmd_dcmotor_run"
+ "cmd_servo_attach"
+ "cmd_servo_detach"
+ "cmd_servo_move"];
endfunction
diff --git a/macros/Scilab-Arduino/GetArduinoSetupFunctions.bin b/macros/Scilab-Arduino/GetArduinoSetupFunctions.bin
index 048da7d..67f9fad 100644
--- a/macros/Scilab-Arduino/GetArduinoSetupFunctions.bin
+++ b/macros/Scilab-Arduino/GetArduinoSetupFunctions.bin
Binary files differ
diff --git a/macros/Scilab-Arduino/GetArduinoSetupFunctions.sci b/macros/Scilab-Arduino/GetArduinoSetupFunctions.sci
index f377d38..c992057 100644
--- a/macros/Scilab-Arduino/GetArduinoSetupFunctions.sci
+++ b/macros/Scilab-Arduino/GetArduinoSetupFunctions.sci
@@ -12,6 +12,8 @@ function ArduinoSetupFunctions = GetArduinoSetupFunctions()
// -----------------------------------------------------------------
ArduinoSetupFunctions = [
- "cmd_dcmotor_setup"];
+ "cmd_dcmotor_setup"
+ "cmd_servo_attach"
+ "cmd_servo_detach"];
endfunction
diff --git a/macros/Scilab-Arduino/InsertSetupInList.bin b/macros/Scilab-Arduino/InsertSetupInList.bin
index 41c1a3f..44e688c 100644
--- a/macros/Scilab-Arduino/InsertSetupInList.bin
+++ b/macros/Scilab-Arduino/InsertSetupInList.bin
Binary files differ
diff --git a/macros/Scilab-Arduino/InsertSetupInList.sci b/macros/Scilab-Arduino/InsertSetupInList.sci
index 5c6be8b..b73910f 100644
--- a/macros/Scilab-Arduino/InsertSetupInList.sci
+++ b/macros/Scilab-Arduino/InsertSetupInList.sci
@@ -1,58 +1,66 @@
function InsertSetupInList(FunName,InArg,NInArg,SetupListFile,FunType)
-load(SetupListFile,'SetupList');
-
-//Check first if current input function already exists in the list
-nelements = size(SetupList);
-found=%F;
-
-if(FunType=='Setup')
- for i=1:nelements
- if(SetupList(i)(1) == FunName)
- for j=1:NInArg
- if(SetupList(i)(j+1) ~= InArg(j).Name)
- found = %F
- break;
- else
- found = %T;
- end
- end
- end
- if (found == %T)
- break; //One match found. No need to check further.
- end
- end
-
- if(found == %F)
- temp = list(FunName);
- for i=1:NInArg
- temp($+1) = InArg(i).Name;
- end
- end
- SetupList($+1) = temp;
-elseif((FunType=='Init')&((FunName=='cmd_digital_out')|(FunName=='cmd_analog_out')|(FunName=='cmd_digital_in')))
- for i=1:nelements
- if(SetupList(i)(1) == FunName)
- if(SetupList(i)(2) == InArg(2).Name)
- found = %T
- break;
- else
- found = %F;
- end
- end
- end
-
- if(found == %F)
- temp = list('pinMode');
- temp($+1) = InArg(2).Name;
- if ((FunName=='cmd_digital_out')|(FunName=='cmd_analog_out'))
- temp($+1) = 'OUTPUT';
- elseif (FunName == 'cmd_digital_in')
- temp($+1) = 'INPUT';
- end
- end
- SetupList($+1) = temp;
-end
-
-save(SetupListFile,'SetupList');
+ load(SetupListFile,'SetupList');
+
+ //Check first if current input function already exists in the list
+ nelements = size(SetupList);
+
+ found=%F;
+ if(FunType=='Setup')
+ for i=1:nelements
+ if(SetupList(i)(1) == FunName)
+ for j=1:NInArg
+ if(SetupList(i)(j+1) ~= InArg(j).Name)
+ found = %F
+ break;
+ else
+ found = %T;
+ end
+ end
+ end
+ if (found == %T)
+ break; //One match found. No need to check further.
+ end
+ end
+
+ if(found == %F)
+ temp = list(FunName);
+ for i=1:NInArg
+ temp($+1) = InArg(i).Name;
+ end
+ end
+ SetupList($+1) = temp;
+ elseif((FunType=='Init')&((FunName=='cmd_digital_out')|(FunName=='cmd_analog_out')|(FunName=='cmd_digital_in')))
+ for i=1:nelements
+ if(SetupList(i)(1) == "pinMode")
+ if(SetupList(i)(2) == InArg(2).Name)
+ found = %T
+ break;
+ else
+ found = %F;
+ end
+ else
+
+ found = %F;
+
+ end
+
+ end
+
+ if(found == %F)
+ temp = list('pinMode');
+ temp($+1) = InArg(2).Name;
+ if ((FunName=='cmd_digital_out')|(FunName=='cmd_analog_out'))
+ temp($+1) = 'OUTPUT';
+ elseif ((FunName == 'cmd_digital_in') | (FunName=='cmd_analog_in'))
+ temp($+1) = 'INPUT';
+ end
+ SetupList($+1) = temp;
+
+ end
+
+
+ end
+ save(SetupListFile,'SetupList');
+
endfunction
diff --git a/macros/Scilab-Arduino/lib b/macros/Scilab-Arduino/lib
index bd0cb70..824ce45 100644
--- a/macros/Scilab-Arduino/lib
+++ b/macros/Scilab-Arduino/lib
Binary files differ