Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React17 #193

Open
wants to merge 96 commits into
base: react17
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
35b2c7d
Added links & ports files code
suchitalad May 17, 2024
36d6055
Merge pull request #203 from suchitalad/xcosblocks
sunilshetye May 17, 2024
8f59406
move mxGeometry to head.xsl
sunilshetye May 17, 2024
5bf5ba5
update port count in xsl
sunilshetye May 21, 2024
bcc2e75
New blocks files added
suchitalad May 21, 2024
8062c44
New blocks files added xcos2xml
suchitalad May 21, 2024
e3c1a45
Merge pull request #204 from suchitalad/xcosblocks
sunilshetye May 21, 2024
5663dca
portcount cleanup
sunilshetye May 21, 2024
c95b729
update port count in xsl
sunilshetye May 21, 2024
dc666c1
Updated files of xcos2xml
suchitalad May 21, 2024
30e3e0e
Merge pull request #205 from suchitalad/xcosblocks
sunilshetye May 21, 2024
9adc9f7
use read -r
sunilshetye May 21, 2024
db7d485
Updated xcos2xml files
suchitalad May 22, 2024
65e926c
add authAPI
sunilshetye May 22, 2024
577df18
adding djoser
sunilshetye May 24, 2024
875de28
modiffying djoser
sunilshetye May 24, 2024
143cc8b
Updated xcos2xml blocks files
suchitalad May 24, 2024
244ecc6
Updated xcos2xml blocks files
suchitalad May 24, 2024
5da499a
set username as email
sunilshetye May 25, 2024
d77d45e
Updated XCOS blocks files
suchitalad May 27, 2024
784074f
Login functionality working
May 27, 2024
309858d
Merge pull request #207 from T3jasKharat/xcosblocks
sunilshetye May 27, 2024
9e532e2
add username during signup, remove re_password during login
sunilshetye May 27, 2024
6687544
load the .env file
sunilshetye May 28, 2024
e979904
fix token name
sunilshetye May 30, 2024
dc9f4fe
Google login when is_active is false
May 30, 2024
16e5af3
Merge pull request #208 from T3jasKharat/xcosblocks
sunilshetye May 30, 2024
7794955
Updated ports & links code of xcos2xml
suchitalad May 31, 2024
9d26e26
Updated OUT_f and SUMMATION block files
suchitalad May 31, 2024
ad8b6ef
Merge pull request #206 from suchitalad/xcosblocks
sunilshetye Jun 11, 2024
e273a32
add save code
sunilshetye Jun 12, 2024
095415c
Login with github feature added
Jun 6, 2024
f6a024a
Merge pull request #209 from T3jasKharat/xcosblocks
sunilshetye Jun 12, 2024
c43bbaf
remove more tags
sunilshetye Jun 12, 2024
d50b492
Updated files of simulationAPI
suchitalad Jun 12, 2024
23c2169
Updated ngspice_helper file
suchitalad Jun 13, 2024
34c6313
Merge pull request #210 from suchitalad/xcosblocks
sunilshetye Jun 13, 2024
8b24a0c
Export in xcos working
Jun 13, 2024
7f8b290
Merge pull request #211 from T3jasKharat/xcosblocks
sunilshetye Jun 13, 2024
cf3d17a
add pillow to requirements.txt
sunilshetye Jun 13, 2024
391fa95
Bump braces from 3.0.2 to 3.0.3 in /blocks/eda-frontend
dependabot[bot] Jun 13, 2024
e987ad5
remove duplicate code
sunilshetye Jun 13, 2024
ea00920
Merge pull request #212 from FOSSEE/dependabot/npm_and_yarn/blocks/ed…
sunilshetye Jun 13, 2024
3a3505b
npm outdated
sunilshetye Jun 13, 2024
db16114
handle async code separately
sunilshetye Jun 14, 2024
036dd42
add log2 function
sunilshetye Jun 18, 2024
4aee491
Updated xsl files of blocks fr ports
suchitalad Jun 18, 2024
aa7e154
Merge pull request #214 from suchitalad/xcosblocks
sunilshetye Jun 18, 2024
76c0401
remove ;.* from style
sunilshetye Jun 20, 2024
22f0ab7
fix python bugs
sunilshetye Jun 20, 2024
1327125
use common code is_owner
sunilshetye Jun 20, 2024
b9c6c72
ignore
sunilshetye Jun 21, 2024
776f604
ignore
sunilshetye Jun 21, 2024
1fc79dd
add pow function to xsl
sunilshetye Jun 25, 2024
ac49193
Updated ports of all blocks files
suchitalad Jun 25, 2024
896e026
Updated M_freq block file
suchitalad Jun 26, 2024
2c188fb
Updated CONVERT block file
suchitalad Jun 26, 2024
9f7c07c
Merge pull request #216 from suchitalad/xcosblocks
sunilshetye Jun 26, 2024
3636a32
add fixtures to test db
sunilshetye Jun 25, 2024
61cccac
convert attributes to variables
sunilshetye Jun 26, 2024
d0ad318
Updated SUMMATION block file
suchitalad Jul 3, 2024
86cba59
Updated SUMMATION block file
suchitalad Jul 4, 2024
cfc527d
Merge pull request #218 from suchitalad/xcosblocks
sunilshetye Jul 4, 2024
efba28d
update Django and djangorestframework
sunilshetye Jul 8, 2024
3773c4a
add port template everywhere
sunilshetye Jul 10, 2024
869aa1b
change @id to $id in port.xsl
sunilshetye Jul 10, 2024
e8fcb47
initialize the variables outside the mxCell element
sunilshetye Jul 11, 2024
b9d6858
fix addDData call
sunilshetye Jul 23, 2024
11ed22b
Optional Chaining added
T3jasKharat Apr 1, 2024
abd46ae
new redux
T3jasKharat Apr 8, 2024
646ca2b
optional chaining added
T3jasKharat Apr 8, 2024
66d9418
minor changes
T3jasKharat Apr 10, 2024
60a8be3
New slice
T3jasKharat Apr 10, 2024
7783b88
small change
T3jasKharat Apr 10, 2024
5d3ec47
eslint changes
T3jasKharat Apr 10, 2024
5aea117
store2 is not need now
T3jasKharat Apr 10, 2024
f5dffcd
correctly accessed compProperties from redux store
T3jasKharat Apr 12, 2024
f68c9b4
Added one slice
T3jasKharat Apr 12, 2024
bdc8ab5
ComponentPropertiesSlice successfully added
T3jasKharat Apr 12, 2024
8eff9e8
schematicEditorSLice is added
T3jasKharat Apr 15, 2024
bb1d706
dashboardSlice added
T3jasKharat Apr 15, 2024
c31a688
Dashboard, netlist and simulation slice integrated
T3jasKharat Apr 16, 2024
c990293
Changed the logic for toggleCollapse
T3jasKharat Apr 17, 2024
b2aa5af
componentProperties slice successfully integrated with functionality
T3jasKharat Apr 18, 2024
3672748
saveSchematicSlice added
T3jasKharat Apr 19, 2024
846eab3
authSlice was successfuly added
T3jasKharat Apr 23, 2024
2c85a51
eslint errors solved
T3jasKharat Apr 23, 2024
de5edce
Optional chaining added
T3jasKharat Apr 23, 2024
f5a6732
Deleted txt file
T3jasKharat Apr 23, 2024
1e1d1f0
removed action.js from redux/actions
T3jasKharat Apr 24, 2024
5d3d734
Optional chaining
May 16, 2024
d980d32
Slice name changed according to the naming conventions
May 17, 2024
26e3cde
authSlice updated but has errors
Aug 20, 2024
21ae99b
Login and Logout functionality working
Aug 21, 2024
6934c5b
Made slight changes in the redux store and updated some slices
Aug 26, 2024
ffb2a3b
Added GalleryUtlis
Aug 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,13 @@ blocks/env*/
scilab-log-*.txt
tags
blocks/U*.sci
blocks/*.xcos
blocks/*.xml
blocks/*.xsl
blocks/xcosblocks.py
blocks/Xcos/xcosblocks.py
blocks/blocks/xcosblocks/xcosblocks.py
blocks/eda-frontend/public/xcos2xml.xsl
blocks/eda-frontend/src/static/xcos2xml.xsl
file_storage/
uploads/
6 changes: 6 additions & 0 deletions blocks/.flake8
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
[flake8]
# default pep8 list
#ignore = E121,E123,E126,E133,E226,E241,E242,E704,W503,W504,W505
# default flake8 list
#ignore = E121,E123,E126,E226,E24,E704,W503,W504
ignore = F401,F403,W504
extend-exclude = docs,env*,migrations,node_modules,Xcos
max-complexity = 13
max-line-length = 100
11 changes: 4 additions & 7 deletions blocks/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN apt-get update -qq && \
apt-get install -qq --no-install-recommends gcc g++ libgfortran5 make nginx openjdk-8-jre python3 redis sqlite3 tzdata && \
apt-get clean -qq && \
rm -f /var/lib/apt/lists/*_*
rm -rf /var/lib/apt/lists/*

# Set timezone info
RUN ln -sf /usr/share/zoneinfo/Asia/Kolkata /etc/localtime && \
Expand Down Expand Up @@ -91,12 +91,9 @@ RUN find . -mindepth 1 -type d -empty -print0 | xargs -0 rmdir -p 2> /dev/null |
# Cleanup
RUN find /usr/local/share/scilab -depth -type d \( -name demos -o -name examples -o -name tests \) -print0 | \
xargs -0 rm -rf
RUN ls /usr/local/share/locale | grep _ | grep -v en_US | \
while read -r d; do \
find . -type d -name "$d" -print0 | xargs -r0 rm -rf; \
done
RUN find /usr/local/share/locale -mindepth 1 -maxdepth 1 -type d -name \*_\* ! -name en_US -print0 | xargs -r0 rm -rf
RUN apt-get clean -qq
RUN rm -f /var/lib/apt/lists/*_*
RUN rm -rf /var/lib/apt/lists/*
RUN rm -f /etc/{passwd,shadow,group,gshadow}-

# Comparison
Expand Down Expand Up @@ -126,7 +123,7 @@ RUN ./install.sh
# Cleanup
RUN apt-get autoremove -qq --purge gawk python3-pip python3-venv wget xz-utils
RUN apt-get clean -qq
RUN rm -f /var/lib/apt/lists/*_*
RUN rm -rf /var/lib/apt/lists/*
RUN rm -rf ${HOME}/.cache
RUN rm -rf ${HOME}/.npm

Expand Down
8 changes: 4 additions & 4 deletions blocks/Dockerfile.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- blocks/Dockerfile 2024-03-22 13:29:04.368574427 +0530
+++ blocks/Dockerfile.1 2024-03-22 20:47:14.630043479 +0530
@@ -121,7 +121,7 @@
--- blocks/Dockerfile 2024-05-21 17:16:25.937563973 +0530
+++ blocks/Dockerfile.1 2024-05-21 17:17:14.925514110 +0530
@@ -118,7 +118,7 @@
COPY . .

# Configure venv and sqlite3
Expand All @@ -9,7 +9,7 @@

# Cleanup
RUN apt-get autoremove -qq --purge gawk python3-pip python3-venv wget xz-utils
@@ -172,4 +172,4 @@
@@ -169,4 +169,4 @@

WORKDIR ${XCOS_DIR}

Expand Down
6 changes: 3 additions & 3 deletions blocks/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ SRCFILES += $(sort $(wildcard Xcos/links/*.py))

XCOS2XMLFILES := $(sort $(wildcard xcos2xml/head.xsl))
XCOS2XMLFILES += $(sort $(wildcard xcos2xml/blocks/*.xsl))
#XCOS2XMLFILES += $(sort $(wildcard xcos2xml/ports/*.xsl))
#XCOS2XMLFILES += $(sort $(wildcard xcos2xml/links/*.xsl))
XCOS2XMLFILES += $(sort $(wildcard xcos2xml/ports/*.xsl))
XCOS2XMLFILES += $(sort $(wildcard xcos2xml/links/*.xsl))
XCOS2XMLFILES += $(sort $(wildcard xcos2xml/foot.xsl))

IMPORT := Xcos/xcosblocks.py
TARGET := xcosblocks.py
TARGET2 := $(BLOCKDIR)/$(TARGET)
TARGET3 := eda-frontend/src/static/xcos2xml.xsl
TARGET3 := eda-frontend/public/xcos2xml.xsl

all : $(IMPORT) $(TARGET) $(TARGET2) $(TARGET3)

Expand Down
6 changes: 2 additions & 4 deletions blocks/Xcos/MxGraphParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,11 @@
IDLIST[attribid] = style
globals()[style](outroot, attribid, ParentComponent, ordering, geometry)
elif 'edge' in attrib:

sourceVertex = attrib['sourceVertex']
targetVertex = attrib['targetVertex']
sourceType = IDLIST[sourceVertex]
targetType = IDLIST[targetVertex]


# switch vertices if required
if sourceType in ['ExplicitInputPort', 'ImplicitInputPort', 'ControlPort'] and targetType in ['ExplicitOutputPort', 'ExplicitLink', 'ImplicitOutputPort', 'ImplicitLink', 'CommandPort', 'CommandControlLink']:
(sourceVertex, targetVertex) = (targetVertex, sourceVertex)
Expand Down Expand Up @@ -185,7 +183,7 @@
edgeDict[attribid] = (style, sourceVertex, targetVertex, sourceType, targetType)
edgeDict2[attribid] = (style, sourceVertex, targetVertex, sourceType, targetType)
IDLIST[attribid] = style

if addSplit:
mxGeometry = cell.find('mxGeometry')
if mxGeometry is not None:
Expand All @@ -196,7 +194,7 @@
geometry['height'] = mxPoint.attrib.get('height', '7')
geometry['x'] = mxPoint.attrib.get('x', '0')
geometry['y'] = mxPoint.attrib.get('y', '0')

splitList.append((attribid, sourceVertex, targetVertex, sourceType, targetType, geometry))
try:
del edgeDict[sourceVertex]
Expand Down
9 changes: 4 additions & 5 deletions blocks/Xcos/blocks/BARXY.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@ def BARXY(outroot, attribid, ordering, geometry, parameters):

addExprsNode(outnode, TYPE_STRING, 5, parameters)
addScilabDNode(outnode, AS_REAL_PARAM, width=4, realParts=[
format_real_number(parameters[0]),
format_real_number(parameters[1]),
format_real_number(parameters[2]),
format_real_number(parameters[3])]
)
format_real_number(parameters[0]),
format_real_number(parameters[1]),
format_real_number(parameters[2]),
format_real_number(parameters[3])])
param = [parameters[4]]
addPrecNode(outnode, TYPE_INTEGER, AS_INT_PARAM, 1, param)
addObjNode(outnode, TYPE_ARRAY, CLASS_LIST, AS_OBJ_PARAM, parameters)
Expand Down
15 changes: 7 additions & 8 deletions blocks/Xcos/blocks/BPLATFORM.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@ def BPLATFORM(outroot, attribid, ordering, geometry, parameters):

addExprsNode(outnode, TYPE_STRING, 7, parameters)
addScilabDNode(outnode, AS_REAL_PARAM, width=7, realParts=[
format_real_number(parameters[0]),
format_real_number(parameters[1]),
format_real_number(parameters[2]),
format_real_number(parameters[3]),
format_real_number(parameters[4]),
format_real_number(parameters[5]),
format_real_number(parameters[6])]
)
format_real_number(parameters[0]),
format_real_number(parameters[1]),
format_real_number(parameters[2]),
format_real_number(parameters[3]),
format_real_number(parameters[4]),
format_real_number(parameters[5]),
format_real_number(parameters[6])])
addTypeNode(outnode, TYPE_DOUBLE, AS_INT_PARAM, 0, [])
addObjNode(outnode, TYPE_ARRAY, CLASS_LIST, AS_OBJ_PARAM, parameters)
array = ['0']
Expand Down
5 changes: 1 addition & 4 deletions blocks/Xcos/blocks/CLKOUT_f.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@ def CLKOUT_f(outroot, attribid, ordering, geometry, parameters, parent=1):
func_name, BLOCKTYPE_D, dependsOnU='0',
dependsOnT='0')

input_list = parameters
output_list = [str(int(float(num)) + 1) for num in input_list]

addExprsNode(outnode, TYPE_STRING, 1, output_list)
addExprsNode(outnode, TYPE_STRING, 1, parameters)
addTypeNode(outnode, TYPE_DOUBLE, AS_REAL_PARAM, 0,
[])
array = ['1']
Expand Down
2 changes: 1 addition & 1 deletion blocks/Xcos/blocks/CLOCK_c.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def CLOCK_c(outroot, attribid, ordering, geometry, parameters):
func_name, 'csuper', 'DEFAULT',
func_name, BLOCKTYPE_H)

addExprsNode(outnode, TYPE_DOUBLE, 0, parameters)
addExprsNode(outnode, TYPE_DOUBLE, 0, [])
addTypeNode(outnode, TYPE_DOUBLE, AS_REAL_PARAM, 0,
[])
addTypeNode(outnode, TYPE_DOUBLE, AS_INT_PARAM, 0, [])
Expand Down
4 changes: 2 additions & 2 deletions blocks/Xcos/blocks/CONVERT.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ def get_from_CONVERT(cell):
input_t = int(float(parameters[0]))
output_t = int(float(parameters[1]))

input_type = types[input_t-1]
output_type = types[output_t-1]
input_type = types[input_t - 1]
output_type = types[output_t - 1]

display_parameter = input_type + ',' + output_type

Expand Down
9 changes: 4 additions & 5 deletions blocks/Xcos/blocks/CSCOPE.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@ def CSCOPE(outroot, attribid, ordering, geometry, parameters):

addExprsNode(outnode, TYPE_STRING, 10, parameters)
addScilabDNode(outnode, AS_REAL_PARAM, width=4, realParts=[
format_real_number(parameters[8]),
format_real_number(parameters[4]),
format_real_number(parameters[5]),
format_real_number(parameters[6])]
)
format_real_number(parameters[8]),
format_real_number(parameters[4]),
format_real_number(parameters[5]),
format_real_number(parameters[6])])
param = strarray(parameters)
addPrecNode(outnode, TYPE_INTEGER, AS_INT_PARAM, 15, param)
addObjNode(outnode, TYPE_ARRAY, CLASS_LIST, AS_OBJ_PARAM, parameters)
Expand Down
2 changes: 1 addition & 1 deletion blocks/Xcos/blocks/DOLLAR_f.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def DOLLAR_f(outroot, attribid, ordering, geometry, parameters):
addTypeNode(outnode, TYPE_DOUBLE, AS_STATE, 0, [])
# addTypeNode(outnode, TYPE_DOUBLE, AS_DSTATE, 1, parameters[0])
addScilabDNode(outnode, AS_DSTATE, width=4, realParts=[
format_real_number(parameters[0])])
format_real_number(parameters[0])])
addObjNode(outnode, TYPE_ARRAY, CLASS_LIST, AS_ODSTATE, [])
addObjNode(outnode, TYPE_ARRAY,
CLASS_LIST, AS_EQUATIONS, parameters)
Expand Down
12 changes: 6 additions & 6 deletions blocks/Xcos/blocks/Gyrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ def Gyrator(outroot, attribid, ordering, geometry, parameters):

addExprsNode(outnode, TYPE_STRING, 2, parameters)
addScilabDNode(outnode, AS_REAL_PARAM, width=2, realParts=[
format_real_number(parameters[0]),
format_real_number(parameters[1])])
format_real_number(parameters[0]),
format_real_number(parameters[1])])
addTypeNode(outnode, TYPE_DOUBLE, AS_INT_PARAM, 0, [])
addObjNode(outnode, TYPE_ARRAY, CLASS_LIST, AS_OBJ_PARAM, [])
array = ['0']
Expand Down Expand Up @@ -61,11 +61,11 @@ def Gyrator(outroot, attribid, ordering, geometry, parameters):
addDataData(additionalStringNode, param)

addNodeScilabDouble(innerArrayNode, height=2, realParts=[
format_real_number(parameters[0]),
format_real_number(parameters[1])])
format_real_number(parameters[0]),
format_real_number(parameters[1])])
addNodeScilabDouble(innerArrayNode, height=2, realParts=[
format_real_number('0'),
format_real_number('0')])
format_real_number('0'),
format_real_number('0')])
addgeometryNode(outnode, GEOMETRY, geometry['height'],
geometry['width'], geometry['x'], geometry['y'])

Expand Down
2 changes: 1 addition & 1 deletion blocks/Xcos/blocks/INTEGRAL_m.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def INTEGRAL_m(outroot, attribid, ordering, geometry, parameters):
addPrecisionNode(outnode, TYPE_INTEGER, AS_NBZERO, 1, array)
addPrecisionNode(outnode, TYPE_INTEGER, AS_NMODE, 1, array)
addScilabDNode(outnode, AS_STATE, width=1, realParts=[
format_real_number(parameters[0])])
format_real_number(parameters[0])])
addTypeNode(outnode, TYPE_DOUBLE, AS_DSTATE, 0, [])
addObjNode(outnode, TYPE_ARRAY, CLASS_LIST, AS_ODSTATE, parameters)
# Create the outer Array node for equations
Expand Down
2 changes: 1 addition & 1 deletion blocks/Xcos/blocks/MAX_f.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def MAX_f(outroot, attribid, ordering, geometry, parameters):
addPrecisionNode(outnode, TYPE_INTEGER, AS_NMODE, 1, array)
addTypeNode(outnode, TYPE_DOUBLE, AS_STATE, 0, [])
addScilabDNode(outnode, AS_DSTATE, width=2, realParts=[
0.0, 0.0])
0.0, 0.0])
addObjNode(outnode, TYPE_ARRAY, CLASS_LIST, AS_ODSTATE, parameters)
addObjNode(outnode, TYPE_ARRAY,
CLASS_LIST, AS_EQUATIONS, parameters)
Expand Down
2 changes: 1 addition & 1 deletion blocks/Xcos/blocks/MIN_f.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def MIN_f(outroot, attribid, ordering, geometry, parameters):
addPrecisionNode(outnode, TYPE_INTEGER, AS_NMODE, 1, array)
addTypeNode(outnode, TYPE_DOUBLE, AS_STATE, 0, [])
addScilabDNode(outnode, AS_DSTATE, width=2, realParts=[
0.0, 0.0])
0.0, 0.0])
addObjNode(outnode, TYPE_ARRAY, CLASS_LIST, AS_ODSTATE, parameters)
addObjNode(outnode, TYPE_ARRAY,
CLASS_LIST, AS_EQUATIONS, parameters)
Expand Down
2 changes: 1 addition & 1 deletion blocks/Xcos/blocks/M_freq.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def get_from_M_freq(cell):
con = ''
eov = ''
iov = ''
com = (len(inputs)**2)-1
com = (len(inputs)**2) - 1

ports = [eiv, iiv, con, eov, iov, com]

Expand Down
2 changes: 1 addition & 1 deletion blocks/Xcos/blocks/OUT_f.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def OUT_f(outroot, attribid, ordering, geometry, parameters, parent=1):
func_name, BLOCKTYPE_C, dependsOnU='0',
dependsOnT='0')

addExprsNode(outnode, TYPE_STRING, 1, parameters[2])
addExprsNode(outnode, TYPE_STRING, 1, parameters[1:2])
addTypeNode(outnode, TYPE_DOUBLE, AS_REAL_PARAM, 0,
[])
array = ['1']
Expand Down
2 changes: 1 addition & 1 deletion blocks/Xcos/blocks/RELAY_f.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def RELAY_f(outroot, attribid, ordering, geometry, parameters):
addPrecisionNode(outnode, TYPE_INTEGER, AS_NMODE, 1, array)
addTypeNode(outnode, TYPE_DOUBLE, AS_STATE, 0, [])
addScilabDNode(outnode, AS_DSTATE, width=1, realParts=[
0.0])
0.0])
addObjNode(outnode, TYPE_ARRAY, CLASS_LIST, AS_ODSTATE, [])
addObjNode(outnode, TYPE_ARRAY,
CLASS_LIST, AS_EQUATIONS, [])
Expand Down
2 changes: 1 addition & 1 deletion blocks/Xcos/blocks/SELECT_m.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def SELECT_m(outroot, attribid, ordering, geometry, parameters):
addPrecisionNode(outnode, TYPE_INTEGER, AS_NMODE, 1, array)
addTypeNode(outnode, TYPE_DOUBLE, AS_STATE, 0, [])
addScilabDNode(outnode, AS_DSTATE, width=1, realParts=[
format_real_number(parameters[0])])
format_real_number(parameters[0])])
addObjNode(outnode, TYPE_ARRAY, CLASS_LIST, AS_ODSTATE, parameters)
addObjNode(outnode, TYPE_ARRAY,
CLASS_LIST, AS_EQUATIONS, parameters)
Expand Down
2 changes: 1 addition & 1 deletion blocks/Xcos/blocks/STEP_FUNCTION.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,4 @@ def get_from_STEP_FUNCTION(cell):

ports = [eiv, iiv, con, eov, iov, com]

return (parameters, display_parameter, ports)
return (parameters, display_parameter, ports)
10 changes: 7 additions & 3 deletions blocks/Xcos/blocks/SUMMATION.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,22 @@ def SUMMATION(outroot, attribid, ordering, geometry, parameters):
func_name, BLOCKTYPE_C,
dependsOnU='1')

addExprsNode(outnode, TYPE_STRING, 1, parameters[1:])
if len(parameters) == 1:
new_parameters = [1, parameters[0], 0]
else:
new_parameters = parameters
addExprsNode(outnode, TYPE_STRING, 3, new_parameters)
addSciDBNode(outnode, TYPE_DOUBLE, AS_REAL_PARAM,
0, [])
array = ['1', '-1']
addPrecNode(outnode, TYPE_INTEGER, AS_INT_PARAM, 2, array)
addObjNode(outnode, TYPE_ARRAY, CLASS_LIST, AS_OBJ_PARAM, parameters)
addObjNode(outnode, TYPE_ARRAY, CLASS_LIST, AS_OBJ_PARAM, [])
array = ['0']
addPrecisionNode(outnode, TYPE_INTEGER, AS_NBZERO, 1, array)
addPrecisionNode(outnode, TYPE_INTEGER, AS_NMODE, 1, array)
addTypeNode(outnode, TYPE_DOUBLE, AS_STATE, 0, [])
addTypeNode(outnode, TYPE_DOUBLE, AS_DSTATE, 0, [])
addObjNode(outnode, TYPE_ARRAY, CLASS_LIST, AS_ODSTATE, parameters)
addObjNode(outnode, TYPE_ARRAY, CLASS_LIST, AS_ODSTATE, [])
addArrayNode(outnode, scilabClass="ScilabList",
**{'as': 'equations'})

Expand Down
5 changes: 2 additions & 3 deletions blocks/Xcos/blocks/SampleCLK.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ def SampleCLK(outroot, attribid, ordering, geometry, parameters):

addExprsNode(outnode, TYPE_STRING, 2, parameters)
addScilabDNode(outnode, AS_REAL_PARAM, width=2, realParts=[
format_real_number(parameters[0]),
format_real_number(parameters[1])]
)
format_real_number(parameters[0]),
format_real_number(parameters[1])])
addTypeNode(outnode, TYPE_DOUBLE, AS_INT_PARAM, 0, [])
addObjNode(outnode, TYPE_ARRAY, CLASS_LIST, AS_OBJ_PARAM, [])
array = ['0']
Expand Down
2 changes: 1 addition & 1 deletion blocks/Xcos/blocks/Switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def Switch(outroot, attribid, ordering, geometry, parameters):
'ScilabDouble',
height=2, width=1)
for i, realPart in enumerate(realParts):
addDData(additionalStringNode, realPart, line=i, column=0)
addDData(additionalStringNode, column=0, line=i, realPart=realPart)

addgeometryNode(outnode, GEOMETRY, geometry['height'],
geometry['width'], geometry['x'], geometry['y'])
Expand Down
11 changes: 5 additions & 6 deletions blocks/Xcos/blocks/TCLSS.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,17 @@ def TCLSS(outroot, attribid, ordering, geometry, parameters):

addExprsNode(outnode, TYPE_STRING, 5, parameters)
addScilabDNode(outnode, AS_REAL_PARAM, width=4, realParts=[
format_real_number(parameters[0]),
format_real_number(parameters[1]),
format_real_number(parameters[2]),
format_real_number(parameters[3])]
)
format_real_number(parameters[0]),
format_real_number(parameters[1]),
format_real_number(parameters[2]),
format_real_number(parameters[3])])
addTypeNode(outnode, TYPE_DOUBLE, AS_INT_PARAM, 0, [])
addObjNode(outnode, TYPE_ARRAY, CLASS_LIST, AS_OBJ_PARAM, parameters)
array = ['0']
addPrecisionNode(outnode, TYPE_INTEGER, AS_NBZERO, 1, array)
addPrecisionNode(outnode, TYPE_INTEGER, AS_NMODE, 1, array)
addScilabDNode(outnode, AS_STATE, width=1, realParts=[
format_real_number(parameters[0])])
format_real_number(parameters[0])])
addTypeNode(outnode, TYPE_DOUBLE, AS_DSTATE, 0, [])
addObjNode(outnode, TYPE_ARRAY, CLASS_LIST, AS_ODSTATE, parameters)
addObjNode(outnode, TYPE_ARRAY,
Expand Down
Loading