robotis-pandora / ROBOTIS_CM9_Series

CM-9 Series
6 stars 13 forks source link

RC100 TX 에러 #4

Closed hhgyu closed 11 years ago

hhgyu commented 11 years ago

V1.0.0a 버전인가데 RC100에 보내는 쪽이 이상하네요.

int rc100TxData(int data)
{
    unsigned char SndPacket[6];
    unsigned short word = (unsigned short)data;
    unsigned char lowbyte = (unsigned char)(word & 0xff);
    unsigned char highbyte = (unsigned char)((word >> 8) & 0xff);

    SndPacket[0] = 0xff;
    SndPacket[1] = 0x55;
    SndPacket[2] = lowbyte;
    SndPacket[3] = ~lowbyte;
    SndPacket[4] = highbyte;
    SndPacket[5] = ~highbyte;

    if( zgb_hal_tx( SndPacket, 6 ) != 6 )
        return 0;

    return 1;
}

zgb_hal_tx -> rc100_hal_tx

이걸로 바껴야 되지 않습니까?

robotis-pandora commented 11 years ago

고맙습니다. 맞네요 수정했습니다. RC100 에 데이터를 보낼 일이 없어서 아직 거기까지 버그를 보지 못한 것 같습니다. 혹시 RC100으로 데이터를 보낼 일이 있나요??

hhgyu commented 11 years ago

조정기 역활을 다른 로봇으로 하는 부분이 있습니다 그것 때문에 cm900에 맞게 수정하다보니 알게됏습니다