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

Support for other PJON config constants? #10

Open
akadlec opened this issue Jan 10, 2021 · 3 comments
Open

Support for other PJON config constants? #10

akadlec opened this issue Jan 10, 2021 · 3 comments

Comments

@akadlec
Copy link

akadlec commented Jan 10, 2021

Is possible to add support for other PJON config constants? I'm using TSA strategy and it would be great to be able to configure eg. TSA_RESPONSE_TIME_OUT or TS_RESPONSE_TIME_OUT for TS strategy

@gioblu
Copy link

gioblu commented Jan 10, 2021

Ciao @akadlec In PJON 13.0 and the new version of PJON-cython we have only ThroughSerial which implements the old ThroughSerialAsync with some minor fixes and optimizations, by the way could you try the new version along with PJON 13.0 ? That would be a great help to verify if all works fine.

@akadlec
Copy link
Author

akadlec commented Jan 10, 2021

Hi @gioblu yes I know it. I could test v13.0

@xlfe
Copy link
Owner

xlfe commented Jan 14, 2021

@akadlec the challenge will be that - at the moment - (at least from v12) those constants are compile time constants, ie cannot be set at runtime

see

PJON-cython/setup.py

Lines 39 to 43 in eea8ad8

for s in ['TS', 'TSA', 'GUDP', 'LUDP']:
strategies.extend([
'-DPJON_INCLUDE_{}'.format(s),
'-D{}_RESPONSE_TIME_OUT=100000'.format(s)
]

One option would be to fork the repo, set them in that file (setup.py) to your needs and then pip install from your forked version of PJON-cython.

Or, as @gioblu suggestes in v13 you may not need to customise them anymore?

Let me know how you go testing v13

cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants