Sho Yama
/
LV8548_ON_MD_Modlle_kit_DCMtr_And_STEPMtr
LV8548 Motor Driver Stepper Motor Dc MOtor
Revision 2:77d8b59fa58c, committed 2018-11-19
- Comitter:
- yamasho
- Date:
- Mon Nov 19 01:52:38 2018 +0000
- Parent:
- 1:f62c3257d673
- Child:
- 3:de46cb8b50cb
- Commit message:
- Bug Fix
Changed in this revision
LV8548.lib | Show annotated file Show diff for this revision Revisions of this file |
Main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/LV8548.lib Sat Nov 17 05:11:50 2018 +0000 +++ b/LV8548.lib Mon Nov 19 01:52:38 2018 +0000 @@ -1,1 +1,1 @@ -https://os.mbed.com/users/yamasho/code/LV8548/#e60c7c42e6fc +https://os.mbed.com/users/yamasho/code/LV8548/#627825272d30
--- a/Main.cpp Sat Nov 17 05:11:50 2018 +0000 +++ b/Main.cpp Mon Nov 19 01:52:38 2018 +0000 @@ -8,11 +8,10 @@ #define DEFAULT_BAUDRATE (19200) //#define DEFAULT_BAUDRATE (115200) -#define USE_DC_MOTOR (false) -#define USE_STEP_MOTOR (true) +#define USE_DC_MOTOR (false) // true : dc motor false: Stepper -#define _USE_DEBUG_ (0) +#define _USE_DEBUG_ (1) enum DCSerialCommandType { SRMES_GET_ID = 0x03, // 3 SRMES_POLLING_ID = 0x04, // 4 @@ -252,7 +251,7 @@ /***************************************************************************************************/ case SRMES_CTL_VOLTAGE: // 0x41 { - DcMtrvoltValue = *(SrMesDivCtlVoltage *)SerialBuffer; + DcMtrvoltValue = *(SrMesDivCtlVoltage *)&SerialBuffer[1]; #if _USE_DEBUG_ uart.printf("Voltage Commnad %2x %2x \n",DcMtrvoltValue.motorNo,DcMtrvoltValue.duty); #endif