Пример #1
0
void DXL_PrintErrorCode()
{
	if(dxl_get_rxpacket_error(ERRBIT_VOLTAGE) == 1)
		cerr <<"Input voltage error!"<<endl;
	if(dxl_get_rxpacket_error(ERRBIT_ANGLE) == 1)
		cerr <<"Angle limit error!"<<endl;
	if(dxl_get_rxpacket_error(ERRBIT_OVERHEAT) == 1)
		cerr <<"Overheat error!"<<endl;
	if(dxl_get_rxpacket_error(ERRBIT_RANGE) == 1)
		cerr <<"Out of range error!"<<endl;
	if(dxl_get_rxpacket_error(ERRBIT_CHECKSUM) == 1)
		cerr <<"Checksum error!"<<endl;
	if(dxl_get_rxpacket_error(ERRBIT_OVERLOAD) == 1)
		cerr <<"Overload error!"<<endl;
	if(dxl_get_rxpacket_error(ERRBIT_INSTRUCTION) == 1)
		cerr <<"Instruction code error!"<<endl;
}
Пример #2
0
void PrintErrorCode() {
    if(dxl_get_rxpacket_error(ERRBIT_VOLTAGE) == 1)
    printf("Input voltage error!\n");

    if(dxl_get_rxpacket_error(ERRBIT_ANGLE) == 1)
    printf("Angle limit error!\n");

    if(dxl_get_rxpacket_error(ERRBIT_OVERHEAT) == 1)
    printf("Overheat error!\n");

    if(dxl_get_rxpacket_error(ERRBIT_RANGE) == 1)
    printf("Out of range error!\n");

    if(dxl_get_rxpacket_error(ERRBIT_CHECKSUM) == 1)
    printf("Checksum error!\n");

    if(dxl_get_rxpacket_error(ERRBIT_OVERLOAD) == 1)
    printf("Overload error!\n");

    if(dxl_get_rxpacket_error(ERRBIT_INSTRUCTION) == 1)
    printf("Instruction code error!\n");
}
Пример #3
0
int Dynamixel::getRxPacketError( int errbit ){
	return dxl_get_rxpacket_error( errbit );
}