Replies: 2 comments
-
Serial/UART will be moved out of Terminal class, I'm working on... |
Beta Was this translation helpful? Give feedback.
0 replies
-
...just implemented.
Connect serialport to the terminal and set communication parameters:
connect() method must be called after Terminal.begin(), like the updated AnsiTerminal demo does. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It would be useful if all the Serial/UART related code currently in
class Terminal
was moved out to a new derived class e.g.class SerialTerminal : public Terminal
That would mean moving:
and the new UART2 related functions
along with the current versions of:
into this new class.
The 2
send()
functions would then need to be madeprotected
andvirtual
inclass Terminal
so that they can be polymorphic. Alternatively the twolocalwrite()
functions could be renamed assend()
and simply overridden if required.These thoughts may not be perfect, but the end goal is that the
AnsiTerminal
and theNetworkTerminal
examples should deal with theTerminal
class the same way, whereas at the moment a serial connectedTerminal
is a special case of aTerminal
instance with the code that handles the serial connection I/O inside the class, but a network connected Terminal manages the network connection I/O itself. A serial connectedTerminal
should not need to be special.Beta Was this translation helpful? Give feedback.
All reactions