NangiDev / GDSerCommPlugin

A Godot plugin to read Arduino serial input
MIT License
79 stars 13 forks source link

Add automatic serial read via signal #25

Closed ambiguousname closed 1 month ago

ambiguousname commented 1 month ago

I found that sp_input_waiting was useful enough that I wanted reading to be handled for me automatically in the process function, to then be passed to the on_message signal.

For anyone who wants to read serial manually, I exposed sp_input_waiting via the waiting_input_bytes function. You could disable the automatic reads by overriding the process function with your own version.

Let me know if you have any thoughts!

NangiDev commented 1 month ago

I think this is a good addition. I guess adding something to the README or a DOCS to explain that you can disable it by overriding process would be nice

ambiguousname commented 1 month ago

@NangiDev let me know how the updated README looks

NangiDev commented 1 month ago

Amazing thanks!