NangiDev / GDSerCommPlugin

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

RichTextLabel can not add a integer to text. #2

Closed NangiDev closed 4 years ago

NangiDev commented 5 years ago

For some reason

res://addons/GDSerCommDock/MenuLogic.gd:45 - Invalid type in function 'add_text' in base 'RichTextLabel'. Cannot convert argument 1 from int to String.

when reading from serial.

My input look something like "0.86,0.83"

Calinou commented 4 years ago

This should be fixable by replacing readLabel.add_text(PORT.read()) with readLabel.add_text(str(PORT.read())) here:

https://github.com/NangiDev/GDSerCommPlugin/blob/f5524098e6c62509894c007954020e7465188c30/addons/GDSerCommDock/MenuLogic.gd#L43

NangiDev commented 4 years ago

@Calinou Thanks for the help :) I can't test it now unfortunately because I can't get the dependent libraries to compile. They are really old so I need to find libraries that are better maintained or maybe build my own.

I will test this as soon as I everything up and running again