-
Notifications
You must be signed in to change notification settings - Fork 34
Closed
Description
Some ics constant are not correct exposed in the Python layer.
The following code is currently failing.
import ics
assert ics.SPY_STATUS2_ETHERNET_T1S_ETHERNET == 0x80000000
assert ics.SPY_STATUS2_LIN_NO_SLAVE_DATA == 0x80000000
assert ics.SPY_STATUS2_MOST_CHANGED_PAR == 0x80000000
assert ics.SPY_STATUS_EXTENDED == 0x80000000
assert ics.ETHERNET_SETTINGS10G_FLAG_COMM_IN_USE == 0x80000000Header file in source
python_ics/include/ics/cicsSpyStatusBits.h
Line 131 in 42e2fcd
| #define SPY_STATUS2_ETHERNET_T1S_ETHERNET 0x80000000 |
python_ics/include/ics/cicsSpyStatusBits.h
Line 167 in 42e2fcd
| #define SPY_STATUS2_LIN_NO_SLAVE_DATA 0x80000000 // LIN no slave data |
python_ics/include/ics/cicsSpyStatusBits.h
Line 194 in 42e2fcd
| #define SPY_STATUS2_MOST_CHANGED_PAR 0x80000000 // first byte in ack reflects what changed. |
| #define SPY_STATUS_EXTENDED 0x80000000 // Extended - if this bit is set than decode StatusBitField3 in AckBytes |
python_ics/include/ics/icsnVC40.h
Line 1334 in 42e2fcd
| #define ETHERNET_SETTINGS10G_FLAG_COMM_IN_USE 0x80000000 |
Potential source of the issue
In my opinion this line is the source of this issue:
python_ics/extract_icsneo40_defines.py
Line 160 in 42e2fcd
| print("\tresult += PyModule_AddIntMacro(module, %s);" % sline[1], file=f) |
This line could potentially change to
print('\tresult += PyModule_AddObjectRef(module, "{0}", PyLong_FromLongLong({0}));'.format(sline[1]), file=f)Metadata
Metadata
Assignees
Labels
No labels