That was the constructor:
SerialNode(HardwareSerial & UART = Serial) : thisSerial (UART){}
See the braces? That is an empty function.
That was the constructor:
SerialNode(HardwareSerial & UART = Serial) : thisSerial (UART){}
See the braces? That is an empty function.
Alright, that makes sense. So is it possible to still break that out?
Somethin like
SerialNode(HardwareSerial & UART = Serial) : thisSerial (UART);
and then
SerialNode::SerialNode(HardwareSerial & UART){
}
Sure. Remove the function body and the initialization list from the class definition, eg.
class SerialNode{
public:
SerialNode(HardwareSerial & UART = Serial);
...
Now put the initialization into the function:
SerialNode::SerialNode(HardwareSerial & UART) : thisSerial (UART)
{
// whatever
}
Great! Thanks very much for your help.