ใช้สื่อสารกันระหว่าง Brain และ Motion
Dependencies: Fork_Boss_Communication_Robot
Dependents: Program_BEAR_Protocol SwitchMode MPU9250AHRS-PGear_Stabilizer SwitchMode ... more
Revision 13:45286c47ca0d, committed 2016-01-28
- Comitter:
- soulx
- Date:
- Thu Jan 28 15:23:15 2016 +0000
- Parent:
- 12:6296cb35f853
- Commit message:
- boz edit
Changed in this revision
BEAR_Protocol.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 6296cb35f853 -r 45286c47ca0d BEAR_Protocol.cpp --- a/BEAR_Protocol.cpp Wed Jan 27 12:53:16 2016 +0000 +++ b/BEAR_Protocol.cpp Thu Jan 28 15:23:15 2016 +0000 @@ -339,10 +339,10 @@ float_buffer=(float)Utilities::ConvertUInt8ArrayToInt16(FloatKi)/FLOAT_CONVERTER; *Ki=int_buffer+float_buffer; - IntKi[0]=package.parameter[8]; - IntKi[1]=package.parameter[9]; - FloatKi[0]=package.parameter[10]; - FloatKi[1]=package.parameter[11]; + IntKd[0]=package.parameter[8]; + IntKd[1]=package.parameter[9]; + FloatKd[0]=package.parameter[10]; + FloatKd[1]=package.parameter[11]; int_buffer=(float)Utilities::ConvertUInt8ArrayToInt16(IntKd); float_buffer=(float)Utilities::ConvertUInt8ArrayToInt16(FloatKd)/FLOAT_CONVERTER; *Kd=int_buffer+float_buffer; @@ -390,10 +390,10 @@ float_buffer=(float)Utilities::ConvertUInt8ArrayToInt16(FloatKi)/FLOAT_CONVERTER; *Ki=int_buffer+float_buffer; - IntKi[0]=package.parameter[8]; - IntKi[1]=package.parameter[9]; - FloatKi[0]=package.parameter[10]; - FloatKi[1]=package.parameter[11]; + IntKd[0]=package.parameter[8]; + IntKd[1]=package.parameter[9]; + FloatKd[0]=package.parameter[10]; + FloatKd[1]=package.parameter[11]; int_buffer=(float)Utilities::ConvertUInt8ArrayToInt16(IntKd); float_buffer=(float)Utilities::ConvertUInt8ArrayToInt16(FloatKd)/FLOAT_CONVERTER; *Kd=int_buffer+float_buffer;