Just started today using the C/C++ plug-in.  Got it from NB8.2 since the plug-in has not been updated (yet?) for more recent NB's.

All is working fine except that the following commands:

    retval = wiringPiI2CWriteReg8(fd, 0x00, 0x80);
    printf("Writing IODIR_A = [0x%02X].\n", (unsigned 
int)wiringPiI2CReadReg8(fd, 0x00));
    printf("Reading IODIR_A = [0x%02X].\n", (unsigned 
int)wiringPiI2CReadReg8(fd, 0x00));
    retval = wiringPiI2CWriteReg8(fd, 0x01, 0x10);
    printf("Writing IODIR_B = [0x%02X].\n", (unsigned 
int)wiringPiI2CReadReg8(fd, 0x01));
    printf("Reading IODIR_B = [0x%02X].\n", (unsigned 
int)wiringPiI2CReadReg8(fd, 0x01));

result in the following representation on the output window:

Writing IODIR_A = [0x80].
                         Reading IODIR_A = [0x80].
                                                  Writing IODIR_B = [0x10].
                                                                           
Reading IODIR_B = [0x10].


As you can see, the "\n" character used in the printf() statement is not translated into "go to beginning of next line".  The next print statement simply goes to another line but starts where the previous line stopped.

To solve it, I have to add "\r\n" to the printf() statement. Only then the next line is also starting at position 1.

Any reason why "\n" is not doing both line feed and carriage return in the output window like it does in most other applications?

Font type used in the output window is Courier New.

--
Best rgds,
Geert

Reply via email to