From 52de97290366abe6cfb0576ca19d9c1732c1f0ea Mon Sep 17 00:00:00 2001 From: siddhu8990 Date: Tue, 18 Oct 2016 10:31:23 +0530 Subject: Suppressed declaration of not required variables and functions --- Doc/.~lock.SCI2CUserGuidev4.doc# | 1 + macros/ASTManagement/AST2Ccode.bin | Bin 31996 -> 32492 bytes macros/ASTManagement/AST2Ccode.sci | 5 + macros/ASTManagement/AST_ExtractNameAndScope.bin | Bin 13180 -> 13184 bytes macros/ASTManagement/AST_ExtractNameAndScope.sci | 1 + macros/ASTManagement/AST_GetPrecAndLhsArg.bin | Bin 12360 -> 12552 bytes macros/ASTManagement/AST_GetPrecAndLhsArg.sci | 4 +- macros/ASTManagement/AST_HandleEndGenFun.bin | Bin 93256 -> 96888 bytes macros/ASTManagement/AST_HandleEndGenFun.sci | 32 +++- macros/ASTManagement/AST_HandleHeader.bin | Bin 40400 -> 39124 bytes macros/ASTManagement/AST_HandleHeader.sci | 8 - macros/FunctionAnnotation/FA_GetFunAnn.bin | Bin 30680 -> 31780 bytes macros/FunctionAnnotation/FA_GetFunAnn.sci | 15 +- macros/SymbolTable/ST_GetInArgInfo.sci | 2 +- .../ToolInitialization/INIT_FillSCI2LibCDirs.bin | Bin 1283828 -> 1279656 bytes .../ToolInitialization/INIT_FillSCI2LibCDirs.sci | 164 +++++++++------------ macros/findDeps/getAllSources.bin | Bin 196164 -> 195712 bytes macros/findDeps/getAllSources.sci | 4 +- macros/scilab2c.bin | Bin 20180 -> 19980 bytes macros/scilab2c.sci | 4 +- src/c/hardware/avr/adc/u8AVRADCSetups.c | 3 +- src/c/hardware/avr/gpio/u8AVRDigitalOuts.c | 3 +- src/c/hardware/avr/gpio/u8AVRDigitalSetups.c | 3 +- src/c/hardware/avr/includes/AVRPeripheralADC.h | 2 +- src/c/hardware/avr/includes/AVRPeripheralGPIO.h | 4 +- src/c/hardware/avr/includes/AVRPeripheralPWM.h | 4 +- src/c/hardware/avr/pwm/u8AVRPWMSetDutys.c | 2 +- src/c/hardware/avr/pwm/u8AVRPWMSetups.c | 4 +- src/c/hardware/rasberrypi/gpio/u8RPIDigitalOuts.c | 4 +- .../hardware/rasberrypi/gpio/u8RPIDigitalSetups.c | 4 +- .../rasberrypi/includes/RPIPeripheralDigital.h | 4 +- .../rasberrypi/includes/RPIPeripheralPWM.h | 8 +- .../rasberrypi/includes/RPIPeripheralSerial.h | 34 ++--- .../rasberrypi/includes/RPIPeripheralTiming.h | 4 +- .../interfaces/int_RPIPeripheralSerial.h | 30 ++-- .../rasberrypi/pwm/u8RPIHardPWMSetClocks.c | 4 +- .../hardware/rasberrypi/pwm/u8RPIHardPWMSetModes.c | 4 +- .../rasberrypi/pwm/u8RPIHardPWMSetRanges.c | 4 +- src/c/hardware/rasberrypi/pwm/u8RPIHardPWMWrites.c | 4 +- .../rasberrypi/serial/dRPISerialSendDataa.c | 3 +- .../rasberrypi/serial/dRPISerialSendDatas.c | 3 +- .../rasberrypi/serial/gRPISerialSendDatas.c | 3 +- .../rasberrypi/serial/i16RPISerialSendDataa.c | 4 +- .../rasberrypi/serial/i16RPISerialSendDatas.c | 3 +- .../rasberrypi/serial/i8RPISerialSendDataa.c | 4 +- .../rasberrypi/serial/i8RPISerialSendDatas.c | 3 +- .../rasberrypi/serial/sRPISerialSendDataa.c | 4 +- .../rasberrypi/serial/sRPISerialSendDatas.c | 3 +- .../rasberrypi/serial/u16RPISerialSendDataa.c | 3 +- .../rasberrypi/serial/u16RPISerialSendDatas.c | 4 +- .../hardware/rasberrypi/serial/u8RPISerialCloses.c | 4 +- .../hardware/rasberrypi/serial/u8RPISerialFlushs.c | 4 +- .../rasberrypi/serial/u8RPISerialSendChars.c | 4 +- .../rasberrypi/serial/u8RPISerialSendDataa.c | 4 +- .../rasberrypi/serial/u8RPISerialSendDatas.c | 3 +- .../hardware/rasberrypi/serial/u8RPISerialSetups.c | 2 +- .../hardware/rasberrypi/timing/u16RPIDelayMicros.c | 3 +- .../hardware/rasberrypi/timing/u16RPIDelayMillis.c | 4 +- src/c/imageProcessing/interfaces/int_cvhighgui.hpp | 15 +- src/c/matrixOperations/tril/dtrila.c | 2 +- src/c/matrixOperations/tril/i16trila.c | 2 +- src/c/matrixOperations/tril/i8trila.c | 2 +- src/c/matrixOperations/tril/strila.c | 2 +- src/c/matrixOperations/tril/u16trila.c | 2 +- src/c/matrixOperations/tril/u8trila.c | 2 +- .../cmd_analog_out/u8cmd_analog_outs.c | 4 +- .../cmd_dcmotor_run/u8cmd_dcmotor_runs.c | 3 +- .../cmd_dcmotor_setup/u8cmd_dcmotor_setups.c | 3 +- .../cmd_digital_out/u8cmd_digital_outs.c | 4 +- .../cmd_servo_attach/u8cmd_servo_attach.cpp | 26 ---- .../cmd_servo_attach/u8cmd_servo_attachs.cpp | 25 ++++ .../cmd_servo_detach/u8cmd_servo_detach.cpp | 24 --- .../cmd_servo_detach/u8cmd_servo_detachs.cpp | 23 +++ .../cmd_servo_move/u8cmd_servo_move.cpp | 27 ---- .../cmd_servo_move/u8cmd_servo_moves.cpp | 26 ++++ src/c/scilab-arduino/includes/cmd_analog_out.h | 2 +- src/c/scilab-arduino/includes/cmd_dcmotor_run.h | 2 +- src/c/scilab-arduino/includes/cmd_dcmotor_setup.h | 2 +- src/c/scilab-arduino/includes/cmd_digital_out.h | 2 +- src/c/scilab-arduino/includes/cmd_servo_attach.h | 2 +- src/c/scilab-arduino/includes/cmd_servo_detach.h | 2 +- src/c/scilab-arduino/includes/cmd_servo_move.h | 2 +- src/c/scilab-arduino/includes/sleep.h | 2 +- .../scilab-arduino/interfaces/int_cmd_analog_out.h | 4 +- src/c/scilab-arduino/interfaces/int_cmd_dcmotor.h | 6 +- .../interfaces/int_cmd_digital_out.h | 4 +- src/c/scilab-arduino/interfaces/int_cmd_servo.h | 6 +- src/c/scilab-arduino/interfaces/int_sleep.h | 2 +- src/c/scilab-arduino/sleep/u16sleeps.c | 3 +- src/c/string/interfaces/int_disp.h | 36 ++--- 90 files changed, 338 insertions(+), 365 deletions(-) create mode 100644 Doc/.~lock.SCI2CUserGuidev4.doc# delete mode 100644 src/c/scilab-arduino/cmd_servo_attach/u8cmd_servo_attach.cpp create mode 100644 src/c/scilab-arduino/cmd_servo_attach/u8cmd_servo_attachs.cpp delete mode 100644 src/c/scilab-arduino/cmd_servo_detach/u8cmd_servo_detach.cpp create mode 100644 src/c/scilab-arduino/cmd_servo_detach/u8cmd_servo_detachs.cpp delete mode 100644 src/c/scilab-arduino/cmd_servo_move/u8cmd_servo_move.cpp create mode 100644 src/c/scilab-arduino/cmd_servo_move/u8cmd_servo_moves.cpp diff --git a/Doc/.~lock.SCI2CUserGuidev4.doc# b/Doc/.~lock.SCI2CUserGuidev4.doc# new file mode 100644 index 0000000..ba5d180 --- /dev/null +++ b/Doc/.~lock.SCI2CUserGuidev4.doc# @@ -0,0 +1 @@ +,siddhesh,Lenovo-PC,07.10.2016 13:07,file:///home/siddhesh/.config/libreoffice/4; \ No newline at end of file diff --git a/macros/ASTManagement/AST2Ccode.bin b/macros/ASTManagement/AST2Ccode.bin index 5f8c96b..f931fd3 100644 Binary files a/macros/ASTManagement/AST2Ccode.bin and b/macros/ASTManagement/AST2Ccode.bin differ diff --git a/macros/ASTManagement/AST2Ccode.sci b/macros/ASTManagement/AST2Ccode.sci index 275aadf..b42fe95 100644 --- a/macros/ASTManagement/AST2Ccode.sci +++ b/macros/ASTManagement/AST2Ccode.sci @@ -152,6 +152,11 @@ while ~meof(fidAST) case 'Lhs :' then SharedInfo.Equal.Lhs = 1; // 1 means that we are inside the Lhs block of the Equal [EqualInArgName,EqualInArgScope,EqualNInArg] = AST_ReadEqualRhsNames(FileInfo,SharedInfo); + + lengthNumber = length('Number_'); + if (part(EqualInArgScope,1:lengthNumber) == 'Number_') + SharedInfo.SkipNextEqual = 1 + end SharedInfo.Equal.NInArg = EqualNInArg; for tmpcnt = 1:SharedInfo.Equal.NInArg SharedInfo.Equal.InArg(tmpcnt).Name = EqualInArgName(tmpcnt); diff --git a/macros/ASTManagement/AST_ExtractNameAndScope.bin b/macros/ASTManagement/AST_ExtractNameAndScope.bin index 260f69a..1944d88 100644 Binary files a/macros/ASTManagement/AST_ExtractNameAndScope.bin and b/macros/ASTManagement/AST_ExtractNameAndScope.bin differ diff --git a/macros/ASTManagement/AST_ExtractNameAndScope.sci b/macros/ASTManagement/AST_ExtractNameAndScope.sci index fe5dc05..1dbaaad 100644 --- a/macros/ASTManagement/AST_ExtractNameAndScope.sci +++ b/macros/ASTManagement/AST_ExtractNameAndScope.sci @@ -75,6 +75,7 @@ if (SCI2Cstrncmps1size(tagname(1),ASTField)) ArgName = stripblanks(part(ASTField,taglength(1)+3:fieldlength)); ArgScope = stripblanks(part(ASTField,1:taglength(1)+1)); end + elseif (SCI2Cstrncmps1size(tagname(2),ASTField)) ArgName = stripblanks(part(ASTField,taglength(2)+1:fieldlength)); ArgName = part(ArgName,2:length(ArgName)-1); // I remove also the first and the last " diff --git a/macros/ASTManagement/AST_GetPrecAndLhsArg.bin b/macros/ASTManagement/AST_GetPrecAndLhsArg.bin index d35ce90..71e44cb 100644 Binary files a/macros/ASTManagement/AST_GetPrecAndLhsArg.bin and b/macros/ASTManagement/AST_GetPrecAndLhsArg.bin differ diff --git a/macros/ASTManagement/AST_GetPrecAndLhsArg.sci b/macros/ASTManagement/AST_GetPrecAndLhsArg.sci index 07ad3b0..f45c29e 100644 --- a/macros/ASTManagement/AST_GetPrecAndLhsArg.sci +++ b/macros/ASTManagement/AST_GetPrecAndLhsArg.sci @@ -57,7 +57,8 @@ end // --- Check Last Function Condition and update LhsArg info. --- // ------------------------------------------------------------- // #RNU_RES_E -if (ASTFunType~='Equal') +if ((ASTFunType~='Equal')& (NOutArg ~= 0)) + //If NOutArg = 0, bypass. // #RNU_RES_B PrintStringInfo(' ',ReportFileName,'file','y'); PrintStringInfo(' Checking presence of Equal after the current function...',ReportFileName,'file','y'); @@ -68,7 +69,6 @@ else LhsArgScope = ''; NLhsArg = 0; end - // --- Generate the LhsArg structure. --- LhsArg = []; for cntarg = 1:NLhsArg diff --git a/macros/ASTManagement/AST_HandleEndGenFun.bin b/macros/ASTManagement/AST_HandleEndGenFun.bin index 123ff51..f16974e 100644 Binary files a/macros/ASTManagement/AST_HandleEndGenFun.bin and b/macros/ASTManagement/AST_HandleEndGenFun.bin differ diff --git a/macros/ASTManagement/AST_HandleEndGenFun.sci b/macros/ASTManagement/AST_HandleEndGenFun.sci index df4334f..5086680 100644 --- a/macros/ASTManagement/AST_HandleEndGenFun.sci +++ b/macros/ASTManagement/AST_HandleEndGenFun.sci @@ -72,6 +72,7 @@ global STACKDEDUG //NUT: verifica se ASTFunType e' veramente importante // #RNU_RES_E [ASTFunName,InArg,NInArg,OutArg,NOutArg] = AST_GetFuncallPrm(FileInfo,SharedInfo,ASTFunType); +NOutArg_mod = NOutArg if(mtlb_strcmp(part(ASTFunName,1:2),'CV') == %T) SharedInfo.OpenCVUsed = %T; end @@ -118,13 +119,14 @@ global STACKDEDUG // --- Read the function annotations. --- // -------------------------------------- // #RNU_RES_E + if (ASTFunName == 'OpEqual') FunTypeAnnot = ''; FunSizeAnnot = ''; else - [FunTypeAnnot,FunSizeAnnot] = FA_GetFunAnn(NInArg,NOutArg,ASTFunName,FileInfo,SharedInfo); + [FunTypeAnnot,FunSizeAnnot,NOutArg_mod] = FA_GetFunAnn(NInArg,NOutArg,ASTFunName,FileInfo,SharedInfo); end - + // #RNU_RES_B // ------------------------------------------------------------------------------------------- // --- Search for Equal Lhs and precision specifier to be applied to the current function. --- @@ -310,7 +312,7 @@ global STACKDEDUG else OutArg = FA_GetOutArgInfo(InArg,NInArg,OutArg,NOutArg,SharedInfo,FunPrecSpecifier,FunTypeAnnot,FunSizeAnnot,ReportFileName); end - + // #RNU_RES_B // --- Generate the names for the output arguments. --- // Update of OutArg.Name and OutArg.Scope fields. @@ -324,7 +326,21 @@ global STACKDEDUG else [OutArg,SharedInfo] = GenOutArgNames(ASTFunName,InArg,NInArg,OutArg,NOutArg,LhsArg,NLhsArg,FileInfo,SharedInfo); end - + + if ((ASTFunName == 'uint8') & (NInArg == 1) & (InArg(1).Dimension == 0) & (InArg(1).Scope == 'Number')) + OutArg(1).Value = InArg(1).Value; + SharedInfo.SkipNextFun = 1; + elseif ((ASTFunName == 'int8') & (NInArg == 1) & (InArg(1).Dimension == 0) & (InArg(1).Scope == 'Number')) + OutArg(1).Value = InArg(1).Value; + SharedInfo.SkipNextFun = 1; + elseif ((ASTFunName == 'uint16') & (NInArg == 1) & (InArg(1).Dimension == 0) & (InArg(1).Scope == 'Number')) + OutArg(1).Value = InArg(1).Value; + SharedInfo.SkipNextFun = 1; + elseif ((ASTFunName == 'int16') & (NInArg == 1) & (InArg(1).Dimension == 0) & (InArg(1).Scope == 'Number')) + OutArg(1).Value = InArg(1).Value; + SharedInfo.SkipNextFun = 1; + end + // #RNU_RES_B // --- Push in the AST stack the Output arguments. --- // #RNU_RES_E @@ -340,6 +356,7 @@ global STACKDEDUG end end + // #RNU_RES_B //NUT: verificare se si puo' accorpare qualcosa qui sotto //RN: non capisco come mai analizzo lo scope dopo che faccio il push nello stack dove lo utilizzo!!! @@ -360,6 +377,7 @@ global STACKDEDUG //#RNUREM_ME --- Store the while condition variable (if any). --- SharedInfo = GetWhileCondVariable(OutArg,NOutArg,ASTFunName,FileInfo,SharedInfo); + //#RNUREM_ME --- Update Symbol Table with output arguments. --- if ((ASTFunName == 'OpMinus') & (NInArg == 1) & (InArg(1).Dimension == 0) & (InArg(1).Scope == 'Number')) @@ -399,8 +417,8 @@ global STACKDEDUG // --- Generate the C name of the function. --- // -------------------------------------------- //#RNU_RES_E - - CFunName = C_GenerateFunName(ASTFunName,InArg,NInArg,OutArg,NOutArg); + //disp(OutArg,InArg,ASTFunName) + CFunName = C_GenerateFunName(ASTFunName,InArg,NInArg,OutArg,NOutArg_mod); //#RNU_RES_B PrintStringInfo(' C Function Name: '+CFunName,ReportFileName,'file','y'); @@ -448,7 +466,7 @@ global STACKDEDUG //NUT: magari posso fare una funzione che inserisce solo i campi diversi e fa un check su quelli che //NUT: dovrebbero essere identici. //#RNU_RES_E - GenCFunDatFiles(ASTFunName,FunPrecSpecifier,FunTypeAnnot,FunSizeAnnot,InArg,NInArg,OutArg,NOutArg,CFunName,LibTypeInfo,FunInfoDatDir); + GenCFunDatFiles(ASTFunName,FunPrecSpecifier,FunTypeAnnot,FunSizeAnnot,InArg,NInArg,OutArg,NOutArg_mod,CFunName,LibTypeInfo,FunInfoDatDir); //#RNU_RES_B // ----------------------------------- diff --git a/macros/ASTManagement/AST_HandleHeader.bin b/macros/ASTManagement/AST_HandleHeader.bin index 078d21b..268846f 100644 Binary files a/macros/ASTManagement/AST_HandleHeader.bin and b/macros/ASTManagement/AST_HandleHeader.bin differ diff --git a/macros/ASTManagement/AST_HandleHeader.sci b/macros/ASTManagement/AST_HandleHeader.sci index 98875a3..75b2f97 100644 --- a/macros/ASTManagement/AST_HandleHeader.sci +++ b/macros/ASTManagement/AST_HandleHeader.sci @@ -107,14 +107,6 @@ load(fullfile(FileInfo.FunctionList.FunInfoDatDir,SharedInfo.NextCFunName+'.dat' SharedInfo.CurrentFunInfo = FunInfo; clear FunInfo -//Required if single file is being translated and has input/outputs -if(SharedInfo.RunMode == "FunCall") -[FunTypeAnnot,FunSizeAnnot] = FA_GetFunAnn(NInArg,NOutArg,FunctionName,FileInfo,SharedInfo); - if((nxtscifunname == SharedInfo.SCIMainFunName)) - SharedInfo.CurrentFunInfo.FunTypeAnnot = FunTypeAnnot; - SharedInfo.CurrentFunInfo.FunSizeAnnot = FunSizeAnnot; - end -end //#RNU_RES_B // ----------------------------------------------------------------------------- // --- Check coherence between In/Out names and In/Out Arg structure loaded. --- diff --git a/macros/FunctionAnnotation/FA_GetFunAnn.bin b/macros/FunctionAnnotation/FA_GetFunAnn.bin index 3c2f9d4..b38770e 100644 Binary files a/macros/FunctionAnnotation/FA_GetFunAnn.bin and b/macros/FunctionAnnotation/FA_GetFunAnn.bin differ diff --git a/macros/FunctionAnnotation/FA_GetFunAnn.sci b/macros/FunctionAnnotation/FA_GetFunAnn.sci index 912d099..d11e3ce 100644 --- a/macros/FunctionAnnotation/FA_GetFunAnn.sci +++ b/macros/FunctionAnnotation/FA_GetFunAnn.sci @@ -1,4 +1,4 @@ -function [FunTypeAnnot,FunSizeAnnot] = ... +function [FunTypeAnnot,FunSizeAnnot,NOutArg_mod] = ... FA_GetFunAnn(NInArg,NOutArg,FunName,FileInfo,SharedInfo) // function [FunTypeAnnot,FunSizeAnnot] = ... // FA_GetFunAnn(NInArg,NOutArg,FunName,FileInfo,SharedInfo) @@ -71,6 +71,7 @@ while ((meof(inclsfid) == 0) & (FoundNIn == 0) & (FoundNOut == 0)) // #RNU_RES_E if (SCI2Cstrncmps1size(SharedInfo.Annotations.FUNNIN,check_string)) FUNNINAnnot = part(check_string,length(SharedInfo.Annotations.FUNNIN)+1:length(check_string)); + // #RNU_RES_B // --- Check NIN value. --- // #RNU_RES_E @@ -89,7 +90,6 @@ while ((meof(inclsfid) == 0) & (FoundNIn == 0) & (FoundNOut == 0)) // #RNU_RES_E if (SCI2Cstrncmps1size(SharedInfo.Annotations.FUNNOUT,check_string)) FUNNOUTAnnot = part(check_string,length(SharedInfo.Annotations.FUNNOUT)+1:length(check_string)); - // #RNU_RES_B // --- Check NOUT value. --- // #RNU_RES_E @@ -99,6 +99,8 @@ while ((meof(inclsfid) == 0) & (FoundNIn == 0) & (FoundNOut == 0)) ReportFileName,'file','y'); // #RNU_RES_E FoundNOut = 1; + elseif(eval(FUNNOUTAnnot) == 0) + FoundNOut = 1 else FoundNIn = 0; end @@ -131,6 +133,15 @@ if (FoundNOut*FoundNIn == 0) PrintStringInfo(' ',ReportFileName,'both','y'); error(9999, 'SCI2CERROR: Incorrect function annotation.'); else + //This change has been made in order to supress the generation + //of output variables in case of functions which do not return + //anything. + if(eval(FUNNOUTAnnot) == 0) + NOutArg_mod = 0; + else + NOutArg_mod = NOutArg + end + // In case we are reading to much informations readNewLine = %t; diff --git a/macros/SymbolTable/ST_GetInArgInfo.sci b/macros/SymbolTable/ST_GetInArgInfo.sci index 03b067a..2706931 100644 --- a/macros/SymbolTable/ST_GetInArgInfo.sci +++ b/macros/SymbolTable/ST_GetInArgInfo.sci @@ -47,7 +47,7 @@ UpdatedInArg = InArg; for cntinarg = 1:NInArg tmpname = InArg(cntinarg).Name; - tmpscope = InArg(cntinarg).Scope; + tmpscope = InArg(cntinarg).Scope; lengthNumber = length('Number_'); if (part(tmpscope,1:lengthNumber) == 'Number_') // #RNU_RES_B diff --git a/macros/ToolInitialization/INIT_FillSCI2LibCDirs.bin b/macros/ToolInitialization/INIT_FillSCI2LibCDirs.bin index 16791ae..7721954 100644 Binary files a/macros/ToolInitialization/INIT_FillSCI2LibCDirs.bin and b/macros/ToolInitialization/INIT_FillSCI2LibCDirs.bin differ diff --git a/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci b/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci index 14b7d41..b00b7b8 100644 --- a/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci +++ b/macros/ToolInitialization/INIT_FillSCI2LibCDirs.sci @@ -3141,34 +3141,34 @@ ClassName = 'Disp'; PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y'); ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls); PrintStringInfo('NIN= 1',ClassFileName,'file','y'); -PrintStringInfo('NOUT= 1',ClassFileName,'file','y'); +PrintStringInfo('NOUT= 0',ClassFileName,'file','y'); PrintStringInfo('OUT(1).TP= ''d''',ClassFileName,'file','y'); PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y'); PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y'); // --- Function List Class. --- ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls); -PrintStringInfo('s0'+ArgSeparator+'d0',ClassFileName,'file','y'); -PrintStringInfo('d0'+ArgSeparator+'d0',ClassFileName,'file','y'); -PrintStringInfo('c0'+ArgSeparator+'d0',ClassFileName,'file','y'); -PrintStringInfo('z0'+ArgSeparator+'d0',ClassFileName,'file','y'); -PrintStringInfo('g0'+ArgSeparator+'d0',ClassFileName,'file','y'); -PrintStringInfo('u80'+ArgSeparator+'d0',ClassFileName,'file','y'); -PrintStringInfo('i80'+ArgSeparator+'d0',ClassFileName,'file','y'); -PrintStringInfo('u160'+ArgSeparator+'d0',ClassFileName,'file','y'); -PrintStringInfo('i160'+ArgSeparator+'d0',ClassFileName,'file','y'); - -PrintStringInfo('s2'+ArgSeparator+'d0',ClassFileName,'file','y'); -PrintStringInfo('d2'+ArgSeparator+'d0',ClassFileName,'file','y'); -PrintStringInfo('c2'+ArgSeparator+'d0',ClassFileName,'file','y'); -PrintStringInfo('z2'+ArgSeparator+'d0',ClassFileName,'file','y'); -PrintStringInfo('g2'+ArgSeparator+'d0',ClassFileName,'file','y'); -PrintStringInfo('u82'+ArgSeparator+'d0',ClassFileName,'file','y'); -PrintStringInfo('i82'+ArgSeparator+'d0',ClassFileName,'file','y'); -PrintStringInfo('u162'+ArgSeparator+'d0',ClassFileName,'file','y'); -PrintStringInfo('i162'+ArgSeparator+'d0',ClassFileName,'file','y'); - -PrintStringInfo('d3'+ArgSeparator+'d0',ClassFileName,'file','y'); +PrintStringInfo('s0'+ArgSeparator+'',ClassFileName,'file','y'); +PrintStringInfo('d0'+ArgSeparator+'',ClassFileName,'file','y'); +PrintStringInfo('c0'+ArgSeparator+'',ClassFileName,'file','y'); +PrintStringInfo('z0'+ArgSeparator+'',ClassFileName,'file','y'); +PrintStringInfo('g0'+ArgSeparator+'',ClassFileName,'file','y'); +PrintStringInfo('u80'+ArgSeparator+'',ClassFileName,'file','y'); +PrintStringInfo('i80'+ArgSeparator+'',ClassFileName,'file','y'); +PrintStringInfo('u160'+ArgSeparator+'',ClassFileName,'file','y'); +PrintStringInfo('i160'+ArgSeparator+'',ClassFileName,'file','y'); + +PrintStringInfo('s2'+ArgSeparator+'',ClassFileName,'file','y'); +PrintStringInfo('d2'+ArgSeparator+'',ClassFileName,'file','y'); +PrintStringInfo('c2'+ArgSeparator+'',ClassFileName,'file','y'); +PrintStringInfo('z2'+ArgSeparator+'',ClassFileName,'file','y'); +PrintStringInfo('g2'+ArgSeparator+'',ClassFileName,'file','y'); +PrintStringInfo('u82'+ArgSeparator+'',ClassFileName,'file','y'); +PrintStringInfo('i82'+ArgSeparator+'',ClassFileName,'file','y'); +PrintStringInfo('u162'+ArgSeparator+'',ClassFileName,'file','y'); +PrintStringInfo('i162'+ArgSeparator+'',ClassFileName,'file','y'); + +PrintStringInfo('d3'+ArgSeparator+'',ClassFileName,'file','y'); // --- Annotation Function And Function List Function. --- FunctionName = 'disp'; // AS : Done AS : Float_Done @@ -4325,15 +4325,15 @@ ClassName = 'cmd_digital_out'; PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y'); ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls); PrintStringInfo('NIN= 3',ClassFileName,'file','y'); -PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y'); +PrintStringInfo('NOUT= 0 ',ClassFileName,'file','y'); PrintStringInfo('OUT(1).TP= ''u8''',ClassFileName,'file','y'); PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y'); PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y'); // --- Function List Class. --- ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls); -PrintStringInfo('d0d0d0'+ArgSeparator+'u80',ClassFileName,'file','y'); -PrintStringInfo('d0d0u80'+ArgSeparator+'u80',ClassFileName,'file','y'); +PrintStringInfo('d0d0d0'+ArgSeparator+'',ClassFileName,'file','y'); +PrintStringInfo('d0d0u80'+ArgSeparator+'',ClassFileName,'file','y'); // --- Annotation Function And Function List Function. --- FunctionName = 'cmd_digital_out'; @@ -4375,15 +4375,15 @@ ClassName = 'cmd_analog_out'; PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y'); ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls); PrintStringInfo('NIN= 3',ClassFileName,'file','y'); -PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y'); +PrintStringInfo('NOUT= 0 ',ClassFileName,'file','y'); PrintStringInfo('OUT(1).TP= ''u8''',ClassFileName,'file','y'); PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y'); PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y'); // --- Function List Class. --- ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls); -PrintStringInfo('d0d0d0'+ArgSeparator+'u80',ClassFileName,'file','y'); -PrintStringInfo('d0d0u80'+ArgSeparator+'u80',ClassFileName,'file','y'); +PrintStringInfo('d0d0d0'+ArgSeparator+'',ClassFileName,'file','y'); +PrintStringInfo('d0d0u80'+ArgSeparator+'',ClassFileName,'file','y'); // --- Annotation Function And Function List Function. --- FunctionName = 'cmd_analog_out'; @@ -4425,14 +4425,14 @@ ClassName = 'cmd_dcmotor_setup'; PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y'); ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls); PrintStringInfo('NIN= 5',ClassFileName,'file','y'); -PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y'); +PrintStringInfo('NOUT= 0 ',ClassFileName,'file','y'); PrintStringInfo('OUT(1).TP= ''u8''',ClassFileName,'file','y'); PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y'); PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y'); // --- Function List Class. --- ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls); -PrintStringInfo('d0d0d0d0d0'+ArgSeparator+'u80',ClassFileName,'file','y'); +PrintStringInfo('d0d0d0d0d0'+ArgSeparator+'',ClassFileName,'file','y'); // --- Annotation Function And Function List Function. --- FunctionName = 'cmd_dcmotor_setup'; @@ -4449,15 +4449,15 @@ ClassName = 'cmd_dcmotor_run'; PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y'); ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls); PrintStringInfo('NIN= 3',ClassFileName,'file','y'); -PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y'); +PrintStringInfo('NOUT= 0 ',ClassFileName,'file','y'); PrintStringInfo('OUT(1).TP= ''u8''',ClassFileName,'file','y'); PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y'); PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y'); // --- Function List Class. --- ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls); -PrintStringInfo('d0d0d0'+ArgSeparator+'u80',ClassFileName,'file','y'); -PrintStringInfo('d0d0i160'+ArgSeparator+'u80',ClassFileName,'file','y'); +PrintStringInfo('d0d0d0'+ArgSeparator+'',ClassFileName,'file','y'); +PrintStringInfo('d0d0i160'+ArgSeparator+'',ClassFileName,'file','y'); // --- Annotation Function And Function List Function. --- FunctionName = 'cmd_dcmotor_run'; @@ -4472,14 +4472,14 @@ ClassName = 'cmd_servo_attach'; PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y'); ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls); PrintStringInfo('NIN= 2',ClassFileName,'file','y'); -PrintStringInfo('NOUT= 1',ClassFileName,'file','y'); +PrintStringInfo('NOUT= 0',ClassFileName,'file','y'); PrintStringInfo('OUT(1).TP= ''u8''',ClassFileName,'file','y'); PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y'); PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y'); //---Function List Class.----- ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls); -PrintStringInfo('d0d0'+ArgSeparator+'u80',ClassFileName,'file','y'); +PrintStringInfo('d0d0'+ArgSeparator+'',ClassFileName,'file','y'); // --- Annotation Function And Function List Function. --- FunctionName = 'cmd_servo_attach'; @@ -4495,14 +4495,14 @@ ClassName = 'cmd_servo_detach'; PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y'); ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls); PrintStringInfo('NIN= 2',ClassFileName,'file','y'); -PrintStringInfo('NOUT= 1',ClassFileName,'file','y'); +PrintStringInfo('NOUT= 0',ClassFileName,'file','y'); PrintStringInfo('OUT(1).TP= ''u8''',ClassFileName,'file','y'); PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y'); PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y'); //---Function List Class.----- ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls); -PrintStringInfo('d0d0'+ArgSeparator+'u80',ClassFileName,'file','y'); +PrintStringInfo('d0d0'+ArgSeparator+'',ClassFileName,'file','y'); // --- Annotation Function And Function List Function. --- FunctionName = 'cmd_servo_detach'; @@ -4518,14 +4518,14 @@ ClassName = 'cmd_servo_move'; PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y'); ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls); PrintStringInfo('NIN= 3',ClassFileName,'file','y'); -PrintStringInfo('NOUT= 1',ClassFileName,'file','y'); +PrintStringInfo('NOUT= 0',ClassFileName,'file','y'); PrintStringInfo('OUT(1).TP= ''u8''',ClassFileName,'file','y'); PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y'); PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y'); //---Function List Class.----- ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls); -PrintStringInfo('d0d0d0'+ArgSeparator+'u80',ClassFileName,'file','y'); +PrintStringInfo('d0d0d0'+ArgSeparator+'',ClassFileName,'file','y'); // --- Annotation Function And Function List Function. --- FunctionName = 'cmd_servo_move'; @@ -4544,14 +4544,14 @@ ClassName = 'sleep'; PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y'); ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls); PrintStringInfo('NIN= 1',ClassFileName,'file','y'); -PrintStringInfo('NOUT= 1',ClassFileName,'file','y'); +PrintStringInfo('NOUT= 0',ClassFileName,'file','y'); PrintStringInfo('OUT(1).TP= ''u8''',ClassFileName,'file','y'); PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y'); PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y'); // --- Function List Class. --- ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls); -PrintStringInfo('d0'+ArgSeparator+'u80',ClassFileName,'file','y'); +PrintStringInfo('d0'+ArgSeparator+'',ClassFileName,'file','y'); // --- Annotation Function And Function List Function. --- FunctionName = 'sleep'; @@ -4574,7 +4574,7 @@ ClassName = 'AVRDigitalSetup'; PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y'); ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls); PrintStringInfo('NIN= 3',ClassFileName,'file','y'); -PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y'); +PrintStringInfo('NOUT= 0 ',ClassFileName,'file','y'); PrintStringInfo('OUT(1).TP= ''u8''',ClassFileName,'file','y'); PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y'); PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y'); @@ -4600,7 +4600,7 @@ ClassName = 'AVRDigitalOut'; PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y'); ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls); PrintStringInfo('NIN= 3',ClassFileName,'file','y'); -PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y'); +PrintStringInfo('NOUT= 0 ',ClassFileName,'file','y'); PrintStringInfo('OUT(1).TP= ''u8''',ClassFileName,'file','y'); PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y'); PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y'); @@ -4655,7 +4655,7 @@ ClassName = 'AVRADCSetup'; PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y'); ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls); PrintStringInfo('NIN= 2',ClassFileName,'file','y'); -PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y'); +PrintStringInfo('NOUT= 0 ',ClassFileName,'file','y'); PrintStringInfo('OUT(1).TP= ''u8''',ClassFileName,'file','y'); PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y'); PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y'); @@ -4706,7 +4706,7 @@ ClassName = 'AVRPWMSetup'; PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y'); ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls); PrintStringInfo('NIN= 4',ClassFileName,'file','y'); -PrintStringInfo('NOUT= 1',ClassFileName,'file','y'); +PrintStringInfo('NOUT= 0',ClassFileName,'file','y'); PrintStringInfo('OUT(1).TP= ''u8''',ClassFileName,'file','y'); PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y'); PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y'); @@ -4730,7 +4730,7 @@ ClassName = 'AVRPWMSetDuty'; PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y'); ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls); PrintStringInfo('NIN= 2',ClassFileName,'file','y'); -PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y'); +PrintStringInfo('NOUT= 0 ',ClassFileName,'file','y'); PrintStringInfo('OUT(1).TP= ''u8''',ClassFileName,'file','y'); PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y'); PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y'); @@ -4754,7 +4754,7 @@ ClassName = 'RPI_DigitalSetup'; PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y'); ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls); PrintStringInfo('NIN= 2',ClassFileName,'file','y'); -PrintStringInfo('NOUT= 1',ClassFileName,'file','y'); +PrintStringInfo('NOUT= 0',ClassFileName,'file','y'); PrintStringInfo('OUT(1).TP= ''u8''',ClassFileName,'file','y'); PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y'); PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y'); @@ -4779,31 +4779,6 @@ PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file', INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun); INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun); -//------------------------------------ -//---- Class RPI_DigitalOut ---------- -//------------------------------------ -//ClassName = 'RPI_DigitalOut'; - -// --- Class Annotation. --- -//PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y'); -//ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls); -//PrintStringInfo('NIN= 2',ClassFileName,'file','y'); -//PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y'); -//PrintStringInfo('OUT(1).TP= ''u8''',ClassFileName,'file','y'); -//PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y'); -//PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y'); - -// --- Function List Class. --- -//ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls); - -//PrintStringInfo(''+ArgSeparator+'',ClassFileName,'file','y'); - -// --- Annotation Function And Function List Function. --- -//FunctionName = 'RPI_DigitalOut'; -//PrintStringInfo(' Adding Function: '+FunctionName+'.',GeneralReport,'file','y'); -//INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCAnnFunDir,ClassName,GeneralReport,ExtensionCAnnFun); -//INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,ExtensionCFuncListFun); - //------------------------------------ //---- Class RPI_DigitalIn ----------- //------------------------------------ @@ -4832,21 +4807,21 @@ INIT_GenAnnFLFunctions(FunctionName,SCI2CLibCFLFunDir,ClassName,GeneralReport,Ex //------------------------------------ //---- Class RPI_DelayMilli ---------- //------------------------------------ -//ClassName = 'RPI_DelayMilli'; +ClassName = 'RPI_DelayMilli'; -// --- Class Annotation. --- -//PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y'); -//ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls); -//PrintStringInfo('NIN= 1',ClassFileName,'file','y'); -//PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y'); -//PrintStringInfo('OUT(1).TP= ''u8''',ClassFileName,'file','y'); -//PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y'); -//PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y'); +//--- Class Annotation. --- +PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y'); +ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls); +PrintStringInfo('NIN= 1',ClassFileName,'file','y'); +PrintStringInfo('NOUT= 0 ',ClassFileName,'file','y'); +PrintStringInfo('OUT(1).TP= ''u8''',ClassFileName,'file','y'); +PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y'); +PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y'); -// --- Function List Class. --- -//ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls); +//--- Function List Class. --- +ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls); -//PrintStringInfo(''+ArgSeparator+'',ClassFileName,'file','y'); +PrintStringInfo(''+ArgSeparator+'',ClassFileName,'file','y'); // --- Annotation Function And Function List Function. --- FunctionName = 'RPI_DelayMilli'; @@ -4924,7 +4899,7 @@ PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y'); ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls); PrintStringInfo('NIN= 2',ClassFileName,'file','y'); PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y'); -PrintStringInfo('OUT(1).TP= ''u8''',ClassFileName,'file','y'); +PrintStringInfo('OUT(1).TP= ''u16''',ClassFileName,'file','y'); PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y'); PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y'); @@ -4977,7 +4952,7 @@ ClassName = 'RPI_SerialSendData'; PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y'); ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls); PrintStringInfo('NIN= 2',ClassFileName,'file','y'); -PrintStringInfo('NOUT= 1 ',ClassFileName,'file','y'); +PrintStringInfo('NOUT= 0 ',ClassFileName,'file','y'); PrintStringInfo('OUT(1).TP= ''u8''',ClassFileName,'file','y'); PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y'); PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y'); @@ -5590,20 +5565,20 @@ PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y'); ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls); PrintStringInfo('NIN= 2',ClassFileName,'file','y'); -PrintStringInfo('NOUT= 1',ClassFileName,'file','y'); +PrintStringInfo('NOUT= 0',ClassFileName,'file','y'); PrintStringInfo('OUT(1).TP= ''u8''',ClassFileName,'file','y'); PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y'); PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y'); PrintStringInfo('NIN= 1',ClassFileName,'file','y'); -PrintStringInfo('NOUT= 1',ClassFileName,'file','y'); +PrintStringInfo('NOUT= 0',ClassFileName,'file','y'); PrintStringInfo('OUT(1).TP= ''u8''',ClassFileName,'file','y'); PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y'); PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y'); ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls); -PrintStringInfo('g2mt0'+ArgSeparator+'u80',ClassFileName,'file','y'); -PrintStringInfo('mt0'+ArgSeparator+'u80',ClassFileName,'file','y'); +PrintStringInfo('g2mt0'+ArgSeparator+'',ClassFileName,'file','y'); +PrintStringInfo('mt0'+ArgSeparator+'',ClassFileName,'file','y'); // --- Annotation Function And Function List Function. --- FunctionName = 'CV_ShowImage'; @@ -5626,13 +5601,18 @@ PrintStringInfo(' Adding Class: '+ClassName+'.',GeneralReport,'file','y'); ClassFileName = fullfile(SCI2CLibCAnnClsDir,ClassName+ExtensionCAnnCls); PrintStringInfo('NIN= 1',ClassFileName,'file','y'); -PrintStringInfo('NOUT= 1',ClassFileName,'file','y'); +PrintStringInfo('NOUT= 0',ClassFileName,'file','y'); PrintStringInfo('OUT(1).TP= ''u8''',ClassFileName,'file','y'); PrintStringInfo('OUT(1).SZ(1)= ''1''',ClassFileName,'file','y'); PrintStringInfo('OUT(1).SZ(2)= ''1''',ClassFileName,'file','y'); ClassFileName = fullfile(SCI2CLibCFLClsDir,ClassName+ExtensionCFuncListCls); -PrintStringInfo('d0'+ArgSeparator+'u80',ClassFileName,'file','y'); +PrintStringInfo('d0'+ArgSeparator+'',ClassFileName,'file','y'); +PrintStringInfo('s0'+ArgSeparator+'',ClassFileName,'file','y'); +PrintStringInfo('u80'+ArgSeparator+'',ClassFileName,'file','y'); +PrintStringInfo('i80'+ArgSeparator+'',ClassFileName,'file','y'); +PrintStringInfo('u160'+ArgSeparator+'',ClassFileName,'file','y'); +PrintStringInfo('i160'+ArgSeparator+'',ClassFileName,'file','y'); // --- Annotation Function And Function List Function. --- FunctionName = 'CV_WaitKey'; diff --git a/macros/findDeps/getAllSources.bin b/macros/findDeps/getAllSources.bin index 0a2a3ce..35b6bd0 100644 Binary files a/macros/findDeps/getAllSources.bin and b/macros/findDeps/getAllSources.bin differ diff --git a/macros/findDeps/getAllSources.sci b/macros/findDeps/getAllSources.sci index 7173991..1693598 100644 --- a/macros/findDeps/getAllSources.sci +++ b/macros/findDeps/getAllSources.sci @@ -1011,7 +1011,7 @@ function allSources = getAllSources(SharedInfo) "src/c/hardware/rasberrypi/timing/u16RPIDelayMicros.c" "src/c/hardware/rasberrypi/timing/u32RPIGetMillis.c" "src/c/hardware/rasberrypi/timing/u32RPIGetMicros.c" - "src/c/hardware/rasberrypi/serial/u8RPISerialSetups.c" + "src/c/hardware/rasberrypi/serial/u16RPISerialSetups.c" "src/c/hardware/rasberrypi/serial/u8RPISerialCloses.c" "src/c/hardware/rasberrypi/serial/u8RPISerialSendChars.c" "src/c/hardware/rasberrypi/serial/u8RPISerialSendDatas.c" @@ -1041,8 +1041,6 @@ function allSources = getAllSources(SharedInfo) OpenCV_files = [ "src/c/imageProcessing/cvcore/imcvCreateImages.cpp" "src/c/imageProcessing/cvcore/imcvGetImgSizes.cpp" - "src/c/imageProcessing/cvhighgui/imcvLoadImages.cpp" - "src/c/imageProcessing/cvhighgui/imcvShowImages.cpp" "src/c/imageProcessing/cvimgproc/imcvCvtColors.cpp" "src/c/imageProcessing/cvimgproc/imcvThresholds.cpp" "src/c/imageProcessing/cvimgproc/imcvAdaptThresholds.cpp" diff --git a/macros/scilab2c.bin b/macros/scilab2c.bin index 43191d5..cf35bf0 100644 Binary files a/macros/scilab2c.bin and b/macros/scilab2c.bin differ diff --git a/macros/scilab2c.sci b/macros/scilab2c.sci index 8bdb667..4fccb07 100644 --- a/macros/scilab2c.sci +++ b/macros/scilab2c.sci @@ -65,8 +65,8 @@ function scilab2c(varargin) return end end - if varargin(4) <> "All" & varargin(4) <> "Translate" & varargin(4) <> "GenLibraryStructure" & varargin(4) <> "FunCall" - error(msprintf(gettext("%s: argument #%d must be: ""All"", ""Translate"",""GenLibraryStructure"" or ""FunCall"".\n"),"scilab2c",4)); + if varargin(4) <> "All" & varargin(4) <> "Translate" & varargin(4) <> "GenLibraryStructure" + error(msprintf(gettext("%s: argument #%d must be: ""All"", ""Translate"",""GenLibraryStructure"".\n"),"scilab2c",4)); return end UserScilabMainFile = varargin(1); diff --git a/src/c/hardware/avr/adc/u8AVRADCSetups.c b/src/c/hardware/avr/adc/u8AVRADCSetups.c index 620f80f..f9d310b 100644 --- a/src/c/hardware/avr/adc/u8AVRADCSetups.c +++ b/src/c/hardware/avr/adc/u8AVRADCSetups.c @@ -26,7 +26,7 @@ #include "AVRPeripheralADC.h" -uint8 u8AVRADCSetups(uint8 prescalar, uint8 adc_ref) +void u8AVRADCSetups(uint8 prescalar, uint8 adc_ref) { /*Set the prescalar value*/ ADCSRA |= (prescalar & 0x07); @@ -37,6 +37,5 @@ uint8 u8AVRADCSetups(uint8 prescalar, uint8 adc_ref) /*Enable ADC hardware. Set ADEN bit*/ ADCSRA |= (1<<7); - return 0; } diff --git a/src/c/hardware/avr/gpio/u8AVRDigitalOuts.c b/src/c/hardware/avr/gpio/u8AVRDigitalOuts.c index 5ee84a8..118da54 100644 --- a/src/c/hardware/avr/gpio/u8AVRDigitalOuts.c +++ b/src/c/hardware/avr/gpio/u8AVRDigitalOuts.c @@ -25,7 +25,7 @@ #include "AVRPeripheralGPIO.h" -uint8 u8AVRDigitalOuts(uint8 port,uint8 pin,uint8 state) +void u8AVRDigitalOuts(uint8 port,uint8 pin,uint8 state) { if(state == LOW) {/*Make output pin high*/ @@ -65,5 +65,4 @@ uint8 u8AVRDigitalOuts(uint8 port,uint8 pin,uint8 state) PORTD = PORTD | (1<>8)); - return 0; } diff --git a/src/c/hardware/rasberrypi/serial/i8RPISerialSendDataa.c b/src/c/hardware/rasberrypi/serial/i8RPISerialSendDataa.c index d208a01..c4dd199 100644 --- a/src/c/hardware/rasberrypi/serial/i8RPISerialSendDataa.c +++ b/src/c/hardware/rasberrypi/serial/i8RPISerialSendDataa.c @@ -15,7 +15,7 @@ #include "types.h" #include "RPIPeripheralSerial.h" -uint8 i8RPISerialSendDataa(int fd, int8* data, int size) +void i8RPISerialSendDataa(int fd, int8* data, int size) { int count = 0; @@ -23,6 +23,4 @@ uint8 i8RPISerialSendDataa(int fd, int8* data, int size) { i8RPISerialSendDatas(fd, data[count]); } - - return 0; } diff --git a/src/c/hardware/rasberrypi/serial/i8RPISerialSendDatas.c b/src/c/hardware/rasberrypi/serial/i8RPISerialSendDatas.c index 0d130d1..e637871 100644 --- a/src/c/hardware/rasberrypi/serial/i8RPISerialSendDatas.c +++ b/src/c/hardware/rasberrypi/serial/i8RPISerialSendDatas.c @@ -15,9 +15,8 @@ #include "types.h" #include "RPIPeripheralSerial.h" -uint8 i8RPISerialSendDatas(int fd, int8 data) +void i8RPISerialSendDatas(int fd, int8 data) { serialPutchar(fd, (uint8) data); - return 0; } diff --git a/src/c/hardware/rasberrypi/serial/sRPISerialSendDataa.c b/src/c/hardware/rasberrypi/serial/sRPISerialSendDataa.c index 92fa5a7..14c0bc7 100644 --- a/src/c/hardware/rasberrypi/serial/sRPISerialSendDataa.c +++ b/src/c/hardware/rasberrypi/serial/sRPISerialSendDataa.c @@ -15,7 +15,7 @@ #include "types.h" #include "RPIPeripheralSerial.h" -uint8 sRPISerialSendDataa(int fd, float* data, int size) +void sRPISerialSendDataa(int fd, float* data, int size) { int count = 0; @@ -24,6 +24,4 @@ uint8 sRPISerialSendDataa(int fd, float* data, int size) sRPISerialSendDatas(fd, data[count]); } - - return 0; } diff --git a/src/c/hardware/rasberrypi/serial/sRPISerialSendDatas.c b/src/c/hardware/rasberrypi/serial/sRPISerialSendDatas.c index bd0cd94..ff78dd1 100644 --- a/src/c/hardware/rasberrypi/serial/sRPISerialSendDatas.c +++ b/src/c/hardware/rasberrypi/serial/sRPISerialSendDatas.c @@ -15,7 +15,7 @@ #include "types.h" #include "RPIPeripheralSerial.h" -uint8 sRPISerialSendDatas(int fd, float data) +void sRPISerialSendDatas(int fd, float data) { uint8 count; @@ -31,5 +31,4 @@ uint8 sRPISerialSendDatas(int fd, float data) serialPutchar(fd, (uint8) in_data.bytes[count]); } - return 0; } diff --git a/src/c/hardware/rasberrypi/serial/u16RPISerialSendDataa.c b/src/c/hardware/rasberrypi/serial/u16RPISerialSendDataa.c index e979882..b444047 100644 --- a/src/c/hardware/rasberrypi/serial/u16RPISerialSendDataa.c +++ b/src/c/hardware/rasberrypi/serial/u16RPISerialSendDataa.c @@ -15,7 +15,7 @@ #include "types.h" #include "RPIPeripheralSerial.h" -uint8 u16RPISerialSendDataa(int fd, uint16* data, int size) +void u16RPISerialSendDataa(int fd, uint16* data, int size) { int count = 0; @@ -25,5 +25,4 @@ uint8 u16RPISerialSendDataa(int fd, uint16* data, int size) } - return 0; } diff --git a/src/c/hardware/rasberrypi/serial/u16RPISerialSendDatas.c b/src/c/hardware/rasberrypi/serial/u16RPISerialSendDatas.c index 2f0536c..b4a90c2 100644 --- a/src/c/hardware/rasberrypi/serial/u16RPISerialSendDatas.c +++ b/src/c/hardware/rasberrypi/serial/u16RPISerialSendDatas.c @@ -15,11 +15,9 @@ #include "types.h" #include "RPIPeripheralSerial.h" -uint8 u16RPISerialSendDatas(int fd, uint16 data) +void u16RPISerialSendDatas(int fd, uint16 data) { /*Send lsb first*/ serialPutchar(fd, (uint8) data); serialPutchar(fd, (uint8) (data>>8)); - - return 0; } diff --git a/src/c/hardware/rasberrypi/serial/u8RPISerialCloses.c b/src/c/hardware/rasberrypi/serial/u8RPISerialCloses.c index d5d4e37..5162d15 100644 --- a/src/c/hardware/rasberrypi/serial/u8RPISerialCloses.c +++ b/src/c/hardware/rasberrypi/serial/u8RPISerialCloses.c @@ -15,9 +15,7 @@ #include "types.h" #include "RPIPeripheralSerial.h" -uint8 u8RPISerialCloses(int fd) +void u8RPISerialCloses(int fd) { serialClose (fd); - - return 0; } diff --git a/src/c/hardware/rasberrypi/serial/u8RPISerialFlushs.c b/src/c/hardware/rasberrypi/serial/u8RPISerialFlushs.c index 2df1f37..c80a92c 100644 --- a/src/c/hardware/rasberrypi/serial/u8RPISerialFlushs.c +++ b/src/c/hardware/rasberrypi/serial/u8RPISerialFlushs.c @@ -15,9 +15,7 @@ #include "types.h" #include "RPIPeripheralSerial.h" -uint8 u8RPISerialFlushs(int fd) +void u8RPISerialFlushs(int fd) { serialFlush(fd); - - return 0; } diff --git a/src/c/hardware/rasberrypi/serial/u8RPISerialSendChars.c b/src/c/hardware/rasberrypi/serial/u8RPISerialSendChars.c index ca15b21..e381351 100644 --- a/src/c/hardware/rasberrypi/serial/u8RPISerialSendChars.c +++ b/src/c/hardware/rasberrypi/serial/u8RPISerialSendChars.c @@ -15,9 +15,7 @@ #include "types.h" #include "RPIPeripheralSerial.h" -uint8 u8RPISerialSendChars(int fd, uint8 data) +void u8RPISerialSendChars(int fd, uint8 data) { serialPutchar(fd, data); - - return 0; } diff --git a/src/c/hardware/rasberrypi/serial/u8RPISerialSendDataa.c b/src/c/hardware/rasberrypi/serial/u8RPISerialSendDataa.c index e2fe32f..9d09714 100644 --- a/src/c/hardware/rasberrypi/serial/u8RPISerialSendDataa.c +++ b/src/c/hardware/rasberrypi/serial/u8RPISerialSendDataa.c @@ -15,7 +15,7 @@ #include "types.h" #include "RPIPeripheralSerial.h" -uint8 u8RPISerialSendDataa(int fd, uint8* data, int size) +void u8RPISerialSendDataa(int fd, uint8* data, int size) { int count = 0; @@ -24,6 +24,4 @@ uint8 u8RPISerialSendDataa(int fd, uint8* data, int size) u8RPISerialSendDatas(fd, data[count]); } - - return 0; } diff --git a/src/c/hardware/rasberrypi/serial/u8RPISerialSendDatas.c b/src/c/hardware/rasberrypi/serial/u8RPISerialSendDatas.c index 86d2be5..9edb439 100644 --- a/src/c/hardware/rasberrypi/serial/u8RPISerialSendDatas.c +++ b/src/c/hardware/rasberrypi/serial/u8RPISerialSendDatas.c @@ -15,9 +15,8 @@ #include "types.h" #include "RPIPeripheralSerial.h" -uint8 u8RPISerialSendDatas(int fd, uint8 data) +void u8RPISerialSendDatas(int fd, uint8 data) { serialPutchar(fd, data); - return 0; } diff --git a/src/c/hardware/rasberrypi/serial/u8RPISerialSetups.c b/src/c/hardware/rasberrypi/serial/u8RPISerialSetups.c index 6912279..cde4cba 100644 --- a/src/c/hardware/rasberrypi/serial/u8RPISerialSetups.c +++ b/src/c/hardware/rasberrypi/serial/u8RPISerialSetups.c @@ -15,7 +15,7 @@ #include "types.h" #include "RPIPeripheralSerial.h" -int u8RPISerialSetups(char* port, int baudrate) +int u16RPISerialSetups(char* port, int baudrate) { int fd; diff --git a/src/c/hardware/rasberrypi/timing/u16RPIDelayMicros.c b/src/c/hardware/rasberrypi/timing/u16RPIDelayMicros.c index fe756c9..9aeeab7 100644 --- a/src/c/hardware/rasberrypi/timing/u16RPIDelayMicros.c +++ b/src/c/hardware/rasberrypi/timing/u16RPIDelayMicros.c @@ -15,9 +15,8 @@ #include "types.h" #include "RPIPeripheralTiming.h" -uint8 u16RPIDelayMicros(uint16 time) +void u16RPIDelayMicros(uint16 time) { delayMicroseconds(time); - return 0; } diff --git a/src/c/hardware/rasberrypi/timing/u16RPIDelayMillis.c b/src/c/hardware/rasberrypi/timing/u16RPIDelayMillis.c index d7be3f8..2679086 100644 --- a/src/c/hardware/rasberrypi/timing/u16RPIDelayMillis.c +++ b/src/c/hardware/rasberrypi/timing/u16RPIDelayMillis.c @@ -17,9 +17,9 @@ #include "types.h" #include "RPIPeripheralTiming.h" -uint8 u16RPIDelayMillis(uint16 time) +void u16RPIDelayMillis(uint16 time) { delay(time); - return 0; + } diff --git a/src/c/imageProcessing/interfaces/int_cvhighgui.hpp b/src/c/imageProcessing/interfaces/int_cvhighgui.hpp index 8e1a989..60d6ffd 100644 --- a/src/c/imageProcessing/interfaces/int_cvhighgui.hpp +++ b/src/c/imageProcessing/interfaces/int_cvhighgui.hpp @@ -20,9 +20,16 @@ //#define g2d0CV_LoadImageim0(filename,name_size,loadtype) imcvLoadImages(filename,loadtype) #define g2d0CV_LoadImagemt0(filename,name_size,loadtype) imread(filename,loadtype) -#define g2mt0CV_ShowImageu80(winname,win_size,img) imcvShowImages(winname,img) -#define mt0CV_ShowImageu80(img) imcvShowImages("",img) -#define d0CV_WaitKeyu80(delay) cvWaitKey(delay) -#define g2mt0CV_SaveImageu80(filename,name_size,img) imwrite(filename,img) +#define g2mt0CV_ShowImageu80(winname,win_size,img) imshow(winname,img) +#define mt0CV_ShowImage(img) imshow("",img) + +#define d0CV_WaitKey(delay) waitKey((int)delay) +#define s80CV_WaitKey(delay) waitKey((int)delay) +#define u80CV_WaitKey(delay) waitKey((int)delay) +#define i80CV_WaitKey(delay) waitKey((int)delay) +#define u160CV_WaitKey(delay) waitKey((int)delay) +#define i160CV_WaitKey(delay) waitKey((int)delay) + +#define g2mt0CV_SaveImage(filename,name_size,img) imwrite(filename,img) #endif /*__INT_CVHIGHGUI_H__*/ diff --git a/src/c/matrixOperations/tril/dtrila.c b/src/c/matrixOperations/tril/dtrila.c index b16d7e5..b45c85f 100644 --- a/src/c/matrixOperations/tril/dtrila.c +++ b/src/c/matrixOperations/tril/dtrila.c @@ -12,7 +12,7 @@ /*Function to extract lower triagular entries from given matrix*/ -#include "triu.h" +#include "tril.h" void dtrila (double *in, int row, int column, double diag, double *out) { diff --git a/src/c/matrixOperations/tril/i16trila.c b/src/c/matrixOperations/tril/i16trila.c index 5253647..98174d9 100644 --- a/src/c/matrixOperations/tril/i16trila.c +++ b/src/c/matrixOperations/tril/i16trila.c @@ -12,7 +12,7 @@ /*Function to extract lower triagular entries from given matrix*/ -#include "triu.h" +#include "tril.h" void i16trila (int16 *in, int row, int column, double diag, int16 *out) { diff --git a/src/c/matrixOperations/tril/i8trila.c b/src/c/matrixOperations/tril/i8trila.c index f361c64..d06b2aa 100644 --- a/src/c/matrixOperations/tril/i8trila.c +++ b/src/c/matrixOperations/tril/i8trila.c @@ -12,7 +12,7 @@ /*Function to extract lower triagular entries from given matrix*/ -#include "triu.h" +#include "tril.h" void i8trila (int8 *in, int row, int column, double diag, int8 *out) { diff --git a/src/c/matrixOperations/tril/strila.c b/src/c/matrixOperations/tril/strila.c index d086936..bc7f1f2 100644 --- a/src/c/matrixOperations/tril/strila.c +++ b/src/c/matrixOperations/tril/strila.c @@ -12,7 +12,7 @@ /*Function to extract lower triagular entries from given matrix*/ -#include "triu.h" +#include "tril.h" void strila (float *in, int row, int column, double diag, float *out) { diff --git a/src/c/matrixOperations/tril/u16trila.c b/src/c/matrixOperations/tril/u16trila.c index 23d86cd..418a595 100644 --- a/src/c/matrixOperations/tril/u16trila.c +++ b/src/c/matrixOperations/tril/u16trila.c @@ -12,7 +12,7 @@ /*Function to extract lower triagular entries from given matrix*/ -#include "triu.h" +#include "tril.h" void u16trila (uint16 *in, int row, int column, double diag, uint16 *out) { diff --git a/src/c/matrixOperations/tril/u8trila.c b/src/c/matrixOperations/tril/u8trila.c index e80c05c..5c21d88 100644 --- a/src/c/matrixOperations/tril/u8trila.c +++ b/src/c/matrixOperations/tril/u8trila.c @@ -12,7 +12,7 @@ /*Function to extract lower triagular entries from given matrix*/ -#include "triu.h" +#include "tril.h" void u8trila (uint8 *in, int row, int column, double diag, uint8 *out) { diff --git a/src/c/scilab-arduino/cmd_analog_out/u8cmd_analog_outs.c b/src/c/scilab-arduino/cmd_analog_out/u8cmd_analog_outs.c index aa7dac0..07e1805 100644 --- a/src/c/scilab-arduino/cmd_analog_out/u8cmd_analog_outs.c +++ b/src/c/scilab-arduino/cmd_analog_out/u8cmd_analog_outs.c @@ -13,9 +13,9 @@ #include "cmd_analog_out.h" #include "Arduino.h" -uint8 u8cmd_analog_outs(uint8 board_no, uint8 pin, uint8 value) +void u8cmd_analog_outs(uint8 board_no, uint8 pin, uint8 value) { analogWrite(pin,value); - return 0; + } diff --git a/src/c/scilab-arduino/cmd_dcmotor_run/u8cmd_dcmotor_runs.c b/src/c/scilab-arduino/cmd_dcmotor_run/u8cmd_dcmotor_runs.c index 07798ab..ff2f6e5 100644 --- a/src/c/scilab-arduino/cmd_dcmotor_run/u8cmd_dcmotor_runs.c +++ b/src/c/scilab-arduino/cmd_dcmotor_run/u8cmd_dcmotor_runs.c @@ -13,7 +13,7 @@ #include "cmd_dcmotor_run.h" #include "Arduino.h" -uint8 u8cmd_dcmotor_runs(uint8 board_no, uint8 motor_no, int16 duty) +void u8cmd_dcmotor_runs(uint8 board_no, uint8 motor_no, int16 duty) { uint8 direction = 1; if(duty >= 0) @@ -55,6 +55,5 @@ uint8 u8cmd_dcmotor_runs(uint8 board_no, uint8 motor_no, int16 duty) } } - return 0; } diff --git a/src/c/scilab-arduino/cmd_dcmotor_setup/u8cmd_dcmotor_setups.c b/src/c/scilab-arduino/cmd_dcmotor_setup/u8cmd_dcmotor_setups.c index d1d0fea..194074e 100644 --- a/src/c/scilab-arduino/cmd_dcmotor_setup/u8cmd_dcmotor_setups.c +++ b/src/c/scilab-arduino/cmd_dcmotor_setup/u8cmd_dcmotor_setups.c @@ -15,7 +15,7 @@ uint8 dcm_pin_1[4], dcm_pin_2[4], dcm_mode[4]; -uint8 u8cmd_dcmotor_setups(uint8 board_no, uint8 driver_type, uint8 motor_no,\ +void u8cmd_dcmotor_setups(uint8 board_no, uint8 driver_type, uint8 motor_no,\ uint8 pin_1, uint8 pin_2) { dcm_pin_1[motor_no] = pin_1; @@ -38,6 +38,5 @@ uint8 u8cmd_dcmotor_setups(uint8 board_no, uint8 driver_type, uint8 motor_no,\ digitalWrite(pin_2,LOW); } - return 0; } diff --git a/src/c/scilab-arduino/cmd_digital_out/u8cmd_digital_outs.c b/src/c/scilab-arduino/cmd_digital_out/u8cmd_digital_outs.c index 2e5c90d..58e7a85 100644 --- a/src/c/scilab-arduino/cmd_digital_out/u8cmd_digital_outs.c +++ b/src/c/scilab-arduino/cmd_digital_out/u8cmd_digital_outs.c @@ -14,9 +14,9 @@ #include "Arduino.h" -uint8 u8cmd_digital_outs(uint8 board_no, uint8 pin, uint8 value) +void u8cmd_digital_outs(uint8 board_no, uint8 pin, uint8 value) { digitalWrite(pin,value); - return 0; + } diff --git a/src/c/scilab-arduino/cmd_servo_attach/u8cmd_servo_attach.cpp b/src/c/scilab-arduino/cmd_servo_attach/u8cmd_servo_attach.cpp deleted file mode 100644 index a89363b..0000000 --- a/src/c/scilab-arduino/cmd_servo_attach/u8cmd_servo_attach.cpp +++ /dev/null @@ -1,26 +0,0 @@ -/* - Scilab2C FOSSEE IIT BOMBAY - */ - -#include "cmd_servo_attach.h" -#include "Arduino.h" -#include -Servo servo1,servo2; -uint8 u8cmd_servo_attach(uint8 h,uint8 servo_no) -{ - // h -> Board no. reserve for future use - // servo_no -> pin no.(9 and 10). - if(servo_no == 1) - { - servo1.attach(9); - servo1.write(0); - } - else - { - servo2.attach(10); - servo2.write(0); - } - - return 0; -} - diff --git a/src/c/scilab-arduino/cmd_servo_attach/u8cmd_servo_attachs.cpp b/src/c/scilab-arduino/cmd_servo_attach/u8cmd_servo_attachs.cpp new file mode 100644 index 0000000..ae2c68c --- /dev/null +++ b/src/c/scilab-arduino/cmd_servo_attach/u8cmd_servo_attachs.cpp @@ -0,0 +1,25 @@ +/* + Scilab2C FOSSEE IIT BOMBAY + */ + +#include "cmd_servo_attach.h" +#include "Arduino.h" +#include +Servo servo1,servo2; +void u8cmd_servo_attach(uint8 h,uint8 servo_no) +{ + // h -> Board no. reserve for future use + // servo_no -> pin no.(9 and 10). + if(servo_no == 1) + { + servo1.attach(9); + servo1.write(0); + } + else + { + servo2.attach(10); + servo2.write(0); + } + +} + diff --git a/src/c/scilab-arduino/cmd_servo_detach/u8cmd_servo_detach.cpp b/src/c/scilab-arduino/cmd_servo_detach/u8cmd_servo_detach.cpp deleted file mode 100644 index 95faf4c..0000000 --- a/src/c/scilab-arduino/cmd_servo_detach/u8cmd_servo_detach.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/* - Scilab2C FOSSEE IIT BOMBAY - */ -#include "cmd_servo_detach.h" -#include "Arduino.h" -#include -Servo servo1,servo2; -uint8 u8cmd_servo_detach(uint8 h,uint8 servo_no) -{ - // h -> Board no. reserve for future use - // servo_no -> pin no.(9 and 10). - if(servo_no == 1) - { - servo1.detach(); - } - - else - { - servo2.detach(); - } - - return 0; -} - diff --git a/src/c/scilab-arduino/cmd_servo_detach/u8cmd_servo_detachs.cpp b/src/c/scilab-arduino/cmd_servo_detach/u8cmd_servo_detachs.cpp new file mode 100644 index 0000000..c8c5beb --- /dev/null +++ b/src/c/scilab-arduino/cmd_servo_detach/u8cmd_servo_detachs.cpp @@ -0,0 +1,23 @@ +/* + Scilab2C FOSSEE IIT BOMBAY + */ +#include "cmd_servo_detach.h" +#include "Arduino.h" +#include +Servo servo1,servo2; +void u8cmd_servo_detach(uint8 h,uint8 servo_no) +{ + // h -> Board no. reserve for future use + // servo_no -> pin no.(9 and 10). + if(servo_no == 1) + { + servo1.detach(); + } + + else + { + servo2.detach(); + } + +} + diff --git a/src/c/scilab-arduino/cmd_servo_move/u8cmd_servo_move.cpp b/src/c/scilab-arduino/cmd_servo_move/u8cmd_servo_move.cpp deleted file mode 100644 index e887476..0000000 --- a/src/c/scilab-arduino/cmd_servo_move/u8cmd_servo_move.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/* - Scilab2C FOSSEE IIT BOMBAY - */ - -#include "cmd_servo_move.h" -#include "Arduino.h" -#include -Servo servo1,servo2; -uint8 u8cmd_servo_move(uint8 h,uint8 servo_no,uint8 val) -{ - // h -> Board no. reserve for future use - // servo_no -> pin no.(9 and 10). - //val -> 0 to 180 angle of rotation - if (val>=0 && val<=180) - { - if (servo_no==1) - { - servo1.write(val); - } - else if (servo_no==2) - { - servo2.write(val); - } - } - return 0; -} - diff --git a/src/c/scilab-arduino/cmd_servo_move/u8cmd_servo_moves.cpp b/src/c/scilab-arduino/cmd_servo_move/u8cmd_servo_moves.cpp new file mode 100644 index 0000000..94f3563 --- /dev/null +++ b/src/c/scilab-arduino/cmd_servo_move/u8cmd_servo_moves.cpp @@ -0,0 +1,26 @@ +/* + Scilab2C FOSSEE IIT BOMBAY + */ + +#include "cmd_servo_move.h" +#include "Arduino.h" +#include +Servo servo1,servo2; +void u8cmd_servo_move(uint8 h,uint8 servo_no,uint8 val) +{ + // h -> Board no. reserve for future use + // servo_no -> pin no.(9 and 10). + //val -> 0 to 180 angle of rotation + if (val>=0 && val<=180) + { + if (servo_no==1) + { + servo1.write(val); + } + else if (servo_no==2) + { + servo2.write(val); + } + } +} + diff --git a/src/c/scilab-arduino/includes/cmd_analog_out.h b/src/c/scilab-arduino/includes/cmd_analog_out.h index a0da68e..5f9e527 100644 --- a/src/c/scilab-arduino/includes/cmd_analog_out.h +++ b/src/c/scilab-arduino/includes/cmd_analog_out.h @@ -19,7 +19,7 @@ extern "C" { #endif -uint8 u8cmd_analog_outs(uint8 board_no, uint8 pin, uint8 value); +void u8cmd_analog_outs(uint8 board_no, uint8 pin, uint8 value); #ifdef __cplusplus } /* extern "C" */ diff --git a/src/c/scilab-arduino/includes/cmd_dcmotor_run.h b/src/c/scilab-arduino/includes/cmd_dcmotor_run.h index 82df60a..4bc1ccc 100644 --- a/src/c/scilab-arduino/includes/cmd_dcmotor_run.h +++ b/src/c/scilab-arduino/includes/cmd_dcmotor_run.h @@ -22,7 +22,7 @@ extern "C" { extern uint8 dcm_pin_1[4], dcm_pin_2[4], dcm_mode[4]; -uint8 u8cmd_dc_motor_runs(uint8 board_no, uint8 motor_no, int16 duty); +void u8cmd_dc_motor_runs(uint8 board_no, uint8 motor_no, int16 duty); #ifdef __cplusplus } /* extern "C" */ diff --git a/src/c/scilab-arduino/includes/cmd_dcmotor_setup.h b/src/c/scilab-arduino/includes/cmd_dcmotor_setup.h index 66fa04e..e7de474 100644 --- a/src/c/scilab-arduino/includes/cmd_dcmotor_setup.h +++ b/src/c/scilab-arduino/includes/cmd_dcmotor_setup.h @@ -22,7 +22,7 @@ extern "C" { extern uint8 dcm_pin_1[4], dcm_pin_2[4], dcm_mode[4]; -uint8 u8cmd_dc_motor_setups(uint8 board_no, uint8 driver_type, uint8 motor_no,\ +void u8cmd_dc_motor_setups(uint8 board_no, uint8 driver_type, uint8 motor_no,\ uint8 pin_1, uint8 pin_2); #ifdef __cplusplus diff --git a/src/c/scilab-arduino/includes/cmd_digital_out.h b/src/c/scilab-arduino/includes/cmd_digital_out.h index ee459d1..a0150ce 100644 --- a/src/c/scilab-arduino/includes/cmd_digital_out.h +++ b/src/c/scilab-arduino/includes/cmd_digital_out.h @@ -20,7 +20,7 @@ extern "C" { #endif -uint8 u8cmd_digital_outs(uint8 board_no, uint8 pin, uint8 value); +void u8cmd_digital_outs(uint8 board_no, uint8 pin, uint8 value); #ifdef __cplusplus } /* extern "C" */ diff --git a/src/c/scilab-arduino/includes/cmd_servo_attach.h b/src/c/scilab-arduino/includes/cmd_servo_attach.h index 5dd3ed6..8707833 100644 --- a/src/c/scilab-arduino/includes/cmd_servo_attach.h +++ b/src/c/scilab-arduino/includes/cmd_servo_attach.h @@ -14,7 +14,7 @@ extern "C" { extern Servo servo1,servo2; -uint8 u8cmd_servo_attach(uint8 h, uint8 servo_no ); +void u8cmd_servo_attach(uint8 h, uint8 servo_no ); #ifdef __cplusplus } /* extern "C" */ diff --git a/src/c/scilab-arduino/includes/cmd_servo_detach.h b/src/c/scilab-arduino/includes/cmd_servo_detach.h index ce74d62..6ac5e2b 100644 --- a/src/c/scilab-arduino/includes/cmd_servo_detach.h +++ b/src/c/scilab-arduino/includes/cmd_servo_detach.h @@ -15,7 +15,7 @@ extern "C" { extern Servo servo1,servo2; -uint8 u8cmd_servo_detach(uint8 h, uint8 servo_no ); +void u8cmd_servo_detach(uint8 h, uint8 servo_no ); #ifdef __cplusplus } /* extern "C" */ diff --git a/src/c/scilab-arduino/includes/cmd_servo_move.h b/src/c/scilab-arduino/includes/cmd_servo_move.h index 9013d3c..7f9bc0d 100644 --- a/src/c/scilab-arduino/includes/cmd_servo_move.h +++ b/src/c/scilab-arduino/includes/cmd_servo_move.h @@ -15,7 +15,7 @@ extern "C" { extern Servo servo1,servo2; -uint8 u8cmd_servo_move(uint8 h, uint8 servo_no,uint8 val); +void u8cmd_servo_move(uint8 h, uint8 servo_no,uint8 val); #ifdef __cplusplus } /* extern "C" */ diff --git a/src/c/scilab-arduino/includes/sleep.h b/src/c/scilab-arduino/includes/sleep.h index 4c8cbc2..8daab69 100644 --- a/src/c/scilab-arduino/includes/sleep.h +++ b/src/c/scilab-arduino/includes/sleep.h @@ -19,7 +19,7 @@ extern "C" { #endif -uint8 u16sleeps(uint16 delay_ms); +void u16sleeps(uint16 delay_ms); #ifdef __cplusplus } /* extern "C" */ diff --git a/src/c/scilab-arduino/interfaces/int_cmd_analog_out.h b/src/c/scilab-arduino/interfaces/int_cmd_analog_out.h index ead26ac..2410523 100644 --- a/src/c/scilab-arduino/interfaces/int_cmd_analog_out.h +++ b/src/c/scilab-arduino/interfaces/int_cmd_analog_out.h @@ -20,10 +20,10 @@ extern "C" { #endif -#define d0d0d0cmd_analog_outu80(in1,in2,in3) u8cmd_analog_outs((uint8)in1,\ +#define d0d0d0cmd_analog_out(in1,in2,in3) u8cmd_analog_outs((uint8)in1,\ (uint8)in2,(uint8)in3) -#define d0d0u80cmd_analog_outu80(in1,in2,in3) u8cmd_analog_outs((uint8)in1,\ +#define d0d0u80cmd_analog_out(in1,in2,in3) u8cmd_analog_outs((uint8)in1,\ (uint8)in2,(uint8)in3) #ifdef __cplusplus diff --git a/src/c/scilab-arduino/interfaces/int_cmd_dcmotor.h b/src/c/scilab-arduino/interfaces/int_cmd_dcmotor.h index b35583d..7f8db41 100644 --- a/src/c/scilab-arduino/interfaces/int_cmd_dcmotor.h +++ b/src/c/scilab-arduino/interfaces/int_cmd_dcmotor.h @@ -20,15 +20,15 @@ extern "C" { #endif -#define d0d0d0d0d0cmd_dcmotor_setupu80(in1,in2,in3,in4,in5)\ +#define d0d0d0d0d0cmd_dcmotor_setup(in1,in2,in3,in4,in5)\ u8cmd_dcmotor_setups((uint8)in1,(uint8)in2,(uint8)in3,\ (uint8)in4,(uint8)in5) -#define d0d0d0cmd_dcmotor_runu80(in1,in2,in3) u8cmd_dcmotor_runs((uint8)in1,\ +#define d0d0d0cmd_dcmotor_run(in1,in2,in3) u8cmd_dcmotor_runs((uint8)in1,\ (uint8)in2, (int16)in3); -#define d0d0u160cmd_dcmotor_runu80(in1,in2,in3) u8cmd_dcmotor_runs((uint8)in1,\ +#define d0d0u160cmd_dcmotor_run(in1,in2,in3) u8cmd_dcmotor_runs((uint8)in1,\ (uint8)in2, (int16)in3); diff --git a/src/c/scilab-arduino/interfaces/int_cmd_digital_out.h b/src/c/scilab-arduino/interfaces/int_cmd_digital_out.h index 4585f12..009ff7d 100644 --- a/src/c/scilab-arduino/interfaces/int_cmd_digital_out.h +++ b/src/c/scilab-arduino/interfaces/int_cmd_digital_out.h @@ -20,11 +20,11 @@ extern "C" { #endif -#define d0d0d0cmd_digital_outu80(in1,in2,in3) u8cmd_digital_outs((uint8)in1,\ +#define d0d0d0cmd_digital_out(in1,in2,in3) u8cmd_digital_outs((uint8)in1,\ (uint8)in2,(uint8)in3) //Required when input from one pin is directed to other output pin. -#define d0d0u80cmd_digital_outu80(in1,in2,in3) u8cmd_digital_outs((uint8)in1,\ +#define d0d0u80cmd_digital_out(in1,in2,in3) u8cmd_digital_outs((uint8)in1,\ (uint8)in2, (uint8)in3) diff --git a/src/c/scilab-arduino/interfaces/int_cmd_servo.h b/src/c/scilab-arduino/interfaces/int_cmd_servo.h index d99a044..3b48273 100644 --- a/src/c/scilab-arduino/interfaces/int_cmd_servo.h +++ b/src/c/scilab-arduino/interfaces/int_cmd_servo.h @@ -13,11 +13,11 @@ extern "C" { #endif -#define d0d0cmd_servo_attachu80(in1,in2) u8cmd_servo_attach((uint8)in1,(uint8)in2); +#define d0d0cmd_servo_attach(in1,in2) u8cmd_servo_attach((uint8)in1,(uint8)in2); -#define d0d0cmd_servo_detachu80(in1,in2) u8cmd_servo_detach((uint8)in1,(uint8)in2); +#define d0d0cmd_servo_detach(in1,in2) u8cmd_servo_detach((uint8)in1,(uint8)in2); -#define d0d0d0cmd_servo_moveu80(in1,in2,in3) u8cmd_servo_move((uint8)in1,(uint8)in2,(uint8)in3); +#define d0d0d0cmd_servo_move(in1,in2,in3) u8cmd_servo_move((uint8)in1,(uint8)in2,(uint8)in3); #ifdef __cplusplus diff --git a/src/c/scilab-arduino/interfaces/int_sleep.h b/src/c/scilab-arduino/interfaces/int_sleep.h index 8e2d082..a0d3545 100644 --- a/src/c/scilab-arduino/interfaces/int_sleep.h +++ b/src/c/scilab-arduino/interfaces/int_sleep.h @@ -20,7 +20,7 @@ extern "C" { #endif -#define d0sleepu80(in1) u16sleeps((uint16)in1) +#define d0sleep(in1) u16sleeps((uint16)in1) #ifdef __cplusplus } /* extern "C" */ diff --git a/src/c/scilab-arduino/sleep/u16sleeps.c b/src/c/scilab-arduino/sleep/u16sleeps.c index 14da0ba..fc59ca8 100644 --- a/src/c/scilab-arduino/sleep/u16sleeps.c +++ b/src/c/scilab-arduino/sleep/u16sleeps.c @@ -12,9 +12,8 @@ #include "sleep.h" -uint8 u16sleeps(uint16 delay_ms) +void u16sleeps(uint16 delay_ms) { delay(delay_ms); - return 0; } diff --git a/src/c/string/interfaces/int_disp.h b/src/c/string/interfaces/int_disp.h index 4b6f896..3bb7852 100644 --- a/src/c/string/interfaces/int_disp.h +++ b/src/c/string/interfaces/int_disp.h @@ -17,41 +17,41 @@ #include -#define s0dispd0(in) sdisps(in) +#define s0disp(in) sdisps(in) -#define d0dispd0(in) ddisps(in) +#define d0disp(in) ddisps(in) -#define c0dispd0(in) cdisps(in) +#define c0disp(in) cdisps(in) -#define z0dispd0(in) zdisps(in) +#define z0disp(in) zdisps(in) -#define u80dispd0(in) u8disps(in) +#define u80disp(in) u8disps(in) -#define i80dispd0(in) i8disps(in) +#define i80disp(in) i8disps(in) -#define u160dispd0(in) u16disps(in) +#define u160disp(in) u16disps(in) -#define i160dispd0(in) i16disps(in) +#define i160disp(in) i16disps(in) -#define s2dispd0(in,size) sdispa(in,size[0],size[1]) +#define s2disp(in,size) sdispa(in,size[0],size[1]) -#define d2dispd0(in,size) ddispa(in,size[0],size[1]) +#define d2disp(in,size) ddispa(in,size[0],size[1]) -#define c2dispd0(in,size) cdispa(in,size[0],size[1]) +#define c2disp(in,size) cdispa(in,size[0],size[1]) -#define z2dispd0(in,size) zdispa(in,size[0],size[1]) +#define z2disp(in,size) zdispa(in,size[0],size[1]) -#define u82dispd0(in,size) u8dispa(in,size[0],size[1]) +#define u82disp(in,size) u8dispa(in,size[0],size[1]) -#define i82dispd0(in,size) i8dispa(in,size[0],size[1]) +#define i82disp(in,size) i8dispa(in,size[0],size[1]) -#define u162dispd0(in,size) u16dispa(in,size[0],size[1]) +#define u162disp(in,size) u16dispa(in,size[0],size[1]) -#define i162dispd0(in,size) i16dispa(in,size[0],size[1]) +#define i162disp(in,size) i16dispa(in,size[0],size[1]) -#define d3dispd0(in,size) ddisph(in,size[0],size[1],size[2]) +#define d3disp(in,size) ddisph(in,size[0],size[1],size[2]) -#define g2dispd0(in, size) printf("%s\n",in) +#define g2disp(in, size) printf("%s\n",in) #endif /* __INT_DISP_H__ */ -- cgit