Tools/Robotis/project/tools/monitor/main.cpp
// Print error bit of status packet

Print error bit of status packet
Print error bit of status packet
void PrintErrorCode(int ErrorCode)
{
	printf("ErrorCode : %d (0x%X)\n", ErrorCode, ErrorCode);
    if(ErrorCode & ERRBIT_VOLTAGE)
        printf("Input voltage error!\n");
    if(ErrorCode & ERRBIT_ANGLE)
        printf("Angle limit error!\n");
    if(ErrorCode & ERRBIT_OVERHEAT)
        printf("Overheat error!\n");
    if(ErrorCode & ERRBIT_RANGE)
        printf("Out of range error!\n");
    if(ErrorCode & ERRBIT_CHECKSUM)
        printf("Checksum error!\n");
    if(ErrorCode & ERRBIT_OVERLOAD)
        printf("Overload error!\n");
    if(ErrorCode & ERRBIT_INSTRUCTION)
        printf("Instruction code error!\n");
}
void PrintErrorCode ( int ErrorCode ) { printf ( " \n " , ErrorCode , ErrorCode ) ; if ( ErrorCode & ERRBIT_VOLTAGE ) printf ( " \n " ) ; if ( ErrorCode & ERRBIT_ANGLE ) printf ( " \n " ) ; if ( ErrorCode & ERRBIT_OVERHEAT ) printf ( " \n " ) ; if ( ErrorCode & ERRBIT_RANGE ) printf ( " \n " ) ; if ( ErrorCode & ERRBIT_CHECKSUM ) printf ( " \n " ) ; if ( ErrorCode & ERRBIT_OVERLOAD ) printf ( " \n " ) ; if ( ErrorCode & ERRBIT_INSTRUCTION ) printf ( " \n " ) ; }
Print error bit of status packet
Print error bit of status packet