summaryrefslogtreecommitdiff
path: root/2.3-1/macros/SymbolTable/ST_GetInArgInfo.sci
diff options
context:
space:
mode:
authorsiddhu89902017-06-20 15:34:06 +0530
committersiddhu89902017-06-20 15:34:06 +0530
commit0051253bc224286c118c080c79eaed5bf611bd35 (patch)
treeb8198628efac2024ac0592b4a1a14ad1b0233f5c /2.3-1/macros/SymbolTable/ST_GetInArgInfo.sci
parent633deb856914bd374d62b3fb3b63447bd81bc03c (diff)
parent2859e00d3f1da2d4b5b47514161bf0c63fcef83f (diff)
downloadScilab2C-0051253bc224286c118c080c79eaed5bf611bd35.tar.gz
Scilab2C-0051253bc224286c118c080c79eaed5bf611bd35.tar.bz2
Scilab2C-0051253bc224286c118c080c79eaed5bf611bd35.zip
Merged with Yash's work. Gui modified for Arduino board selection. Arduino I2C functions added
Diffstat (limited to '2.3-1/macros/SymbolTable/ST_GetInArgInfo.sci')
-rw-r--r--2.3-1/macros/SymbolTable/ST_GetInArgInfo.sci15
1 files changed, 13 insertions, 2 deletions
diff --git a/2.3-1/macros/SymbolTable/ST_GetInArgInfo.sci b/2.3-1/macros/SymbolTable/ST_GetInArgInfo.sci
index 9f5cbd4e..4c85408c 100644
--- a/2.3-1/macros/SymbolTable/ST_GetInArgInfo.sci
+++ b/2.3-1/macros/SymbolTable/ST_GetInArgInfo.sci
@@ -49,13 +49,13 @@ for cntinarg = 1:NInArg
tmpname = InArg(cntinarg).Name;
tmpscope = InArg(cntinarg).Scope;
lengthNumber = length('Number_');
- if (part(tmpscope,1:lengthNumber) == 'Number_')
+ if (part(tmpscope,1:lengthNumber) == 'Number_')
// #RNU_RES_B
PrintStringInfo('Input Argument '+string(cntinarg)+' is a number: '+tmpname+'.',FileInfo.Funct(nxtscifunnumber).ReportFileName,'file');
// #RNU_RES_E
UpdatedInArg(cntinarg).Type = part(tmpscope,lengthNumber+1:lengthNumber+1);
if (UpdatedInArg(cntinarg).Type == 'x')
- UpdatedInArg(cntinarg).Type = SharedInfo.DefaultPrecision; // It is the default.
+ UpdatedInArg(cntinarg).Type = SharedInfo.DefaultPrecision; // It is the default
elseif (UpdatedInArg(cntinarg).Type == 'X')
if (SharedInfo.DefaultPrecision == 's')
UpdatedInArg(cntinarg).Type = 'c'; // It is the default.
@@ -101,6 +101,17 @@ for cntinarg = 1:NInArg
UpdatedInArg(cntinarg).FindLike = 0;
UpdatedInArg(cntinarg).Dimension = 0;
UpdatedInArg(cntinarg).Scope = 'Number';
+ if((ASTFunName == 'cmd_analog_in' | ASTFunName == 'cmd_analog_in_volt' ) & cntinarg == 2)
+ numvalue = eval(tmpname);
+ if (SharedInfo.Board_name == 'mega' | SharedInfo.Board_name == 'mega2560') then
+ tmpname = string(numvalue + 54)
+ UpdatedInArg(cntinarg).Value = 54 + numvalue;
+ else
+ tmpname = string(numvalue + 14)
+ UpdatedInArg(cntinarg).Value = 14 + numvalue;
+ end
+ UpdatedInArg(cntinarg).Name = tmpname; // Change the name.
+ end
elseif (tmpscope == 'String')
// #RNU_RES_B