OpenMQTTGateway icon indicating copy to clipboard operation
OpenMQTTGateway copied to clipboard

String handling improvment

Open 1technophile opened this issue 7 years ago • 5 comments

Following this discussion improve string handling on the projects https://github.com/1technophile/OpenMQTTGateway/pull/154

And multiply trc functions with different signature to avoid use of string into trc argument

1technophile avatar Jan 22 '18 20:01 1technophile

Thinking about this, we could probably generalize the publishing of messages into a global function or method used by all other code. In this function we can then differentiate between Uno and ESP targets, but only once and at a well defined central location.

broekema avatar Jan 23 '18 10:01 broekema

Great idea !

1technophile avatar Jan 23 '18 19:01 1technophile

This is where a JSON library could come in handy, might want to evaluate that and this topic together as one change.

posicat avatar Jan 23 '18 19:01 posicat

Good point @posicat, we might first try to include json publishing before or in the same time of that

1technophile avatar Jan 23 '18 21:01 1technophile

I've create pull request #168 for discussion. This is a class based sensor refactor, that centralizes publishing of messages.

broekema avatar Jan 28 '18 22:01 broekema

Implemented arduinolog for traces, and centralized pub functions

1technophile avatar Feb 04 '23 21:02 1technophile