hardbyte / python-can

The can package provides controller area network support for Python developers
https://python-can.readthedocs.io
GNU Lesser General Public License v3.0
1.31k stars 604 forks source link

Bus.send_periodic() should not start automatically #1848

Closed SWolfSchunk closed 1 month ago

SWolfSchunk commented 2 months ago

Is your feature request related to a problem? Please describe.

I am writing an UI with a button to start and stop a can send task that initially should not send. Stopping the task immediately after creating leads to a single sending of the message(s).

Describe the solution you'd like

An optional kwarg eg. "start_on_init: bool = True" would help out here to keep backward compatibility and i could set it to False.

Describe alternatives you've considered

There is no alternative else than changing the package itself in broadcastmanager.py and commenting out self.start() in init of ThreadBasedCyclicSendTask.

Additional context

I have no additional context so far