Home

Awesome

RemoteDebug Library for Arduino - source converter

Converter for RemoteDebug. Convert standard Serial.prints to RemoteDebug library

<a href="#releases">build badge</a> <a href="https://github.com/JoaoLopesF/RemoteDebugConverter/blob/master/LICENSE.txt"> GitHub</a>

This Java program is a converter, to help to migrate your Arduino codes, that not uses the RemoteDebug library, to add RemoteDebug codes, as initializations and convert Serial.print commands to RemoteDebug.

Note: it is a beta code, if you have any problem or suggestion, please add an issue.

Contents

About

RemoteDebug is a library for Arduino to debug devices over WiFi (telnet) with Print commands like Serial Monitor.

This converter is to help migrate your codes to use RemoteDebug library

This program do:

Beta version

This is a beta version. Not yet fully tested, optimized, and documented.

Note:

Github

Contribute to this libray development by creating an account on GitHub.

Please give a star, if you find this library usefull, this help a another people, discover it too.

Please add a issue for problems or suggestion.

I suggest you use a Github Desktop New app to clone, it help to keep updated.

How it looks

Screenshot 1 Screenshot 2 Screenshot 3 Screenshot 4 Screenshot 5 Screenshot 6

Usage

This runs in MacOs, Linux and Windows (and other supported by Java).

You can use this converter in 2 modes:

Converter

About the converter:

Attention, the converter not convert several prints to a single command, for one command that uses printf formatter to show messages, like debug* and rdebug*

If your code not yet using the powerfull printf, dont worry, the converter will do the conversion.

For example:


Serial.print("* Time: ");
Serial.print(mRunSeconds);
Serial.print(" seconds");

Will converted to a macros rprint*, create to be used in this converter


rprintD("* Time: ");
rprintD(mRunSeconds);
rprintDln(" seconds");

Note: this mode is to allow a fast e easy convertion, but some features as auto func is will not work.

But, if your code still use printf sintax:


Serial.printf("* Time: %u seconds\n", mRunSeconds);

Will converted a single command, with all features working:


rdebugD("* Time: %u seconds\n", mRunSeconds);

Note: the logic to convert automaticaly serial prints in one printf is very hard work. For while, if you want all features, must convert all code to singles printf, before conversion. Or, use converter even so, not all features. Dont worry, Migration to simple commands can be done in the future:


rprintD("* Time: ");
rprintD(mRunSeconds);
rprintDln(" seconds");

To:


// Better -> one command to the job

rdebugD("* Time: %u seconds\n", mRunSeconds);

// Or (same sintax os SerialDebug):

debugD("* Time: %u seconds", mRunSeconds);

TO-DO after conversion

One of most important features of RemoteDebug, is the debug levels, as have in modern platforms, as Android, iOS, javascript, and ESP-IDF.

Debug levels in order of importance (high -> less debug output):

The converter will convert all debug to same level, as debug. Your work (suggested) is redefine the debug levels, according of the list above.

The capitalize character on suffix of debug macros, is the level of this.

So, suggest you open the code converted, and change the suffix of these debug macros.

For example:


rprintD("occurs an error on processing");

///...

rprintD("some details ....................................");

rprintD("* Time: ");
rprintD(mRunSeconds);
rprintDln(" seconds");

Change to:


rprintE("occurs an error on processing");

///...

rprintV("some details ....................................");

rprintV("* Time: ");
rprintV(mRunSeconds);
rprintVln(" seconds");

Releases

0.1.0 - 2019-03-06

- First beta