|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
WPILIB: WriteSerialPortOne(unsigned char) Warning on Compile
We are trying to write a new ASCII driver function within EasyC Pro.
I see that WPILIB supports WriteSerialPortOne(unsigned char). If we add this as a C Code block and call the serial port write function, the code complies but we get a WARNING. Is this a normal warning to see? "suspicious pointer conversion" The supported WPILIB serial functions we are aware of. unsigned char ReadSerialPortOne(void); void WriteSerialPortOne(unsigned char); unsigned char ReadSerialPortTwo(void); void WriteSerialPortTwo(unsigned char); unsigned char GetSerialPort2ByteCount(void); unsigned char GetSerialPort1ByteCount(void); void OpenSerialPortOne(unsigned baudRate); void OpenSerialPortTwo(unsigned baudRate); |
|
#2
|
||||||
|
||||||
|
Re: WPILIB: WriteSerialPortOne(unsigned char) Warning on Compile
Double quotes denote a string, which is a pointer in C. For a character, use single quotes.
|
|
#3
|
||||
|
||||
|
Re: WPILIB: WriteSerialPortOne(unsigned char) Warning on Compile
Quote:
WriteSerialPortOne('J'); Works like a champ. I got PLC code on the brain this morning...not C code...need more coffee.... |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Signed and unsigned variables | dmlawrence | Programming | 4 | 05-01-2008 23:03 |
| Code Won't Compile in MPLab with WPILib | Inverted | Programming | 1 | 20-02-2007 22:12 |
| Printf warning during compile? | actorindp | Programming | 4 | 20-02-2004 17:02 |
| problems assigning unsigned chars in FRC Code | LoyolaCubs | Programming | 6 | 26-01-2004 23:21 |
| Dashboard programs and the char variable | Ian W. | Programming | 13 | 26-06-2002 02:07 |