Rev 1110 | Rev 1366 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 1110 | Rev 1178 | ||
|---|---|---|---|
| Line 68... | Line 68... | ||
| 68 | StdCan_Msg_t txMsg; |
68 | StdCan_Msg_t txMsg; |
| 69 | StdCan_Set_class(txMsg.Header, CAN_MODULE_CLASS_ACT); ///TODO: Change this to the actual class type |
69 | StdCan_Set_class(txMsg.Header, CAN_MODULE_CLASS_ACT); ///TODO: Change this to the actual class type |
| 70 | StdCan_Set_direction(txMsg.Header, DIRECTIONFLAG_FROM_OWNER); |
70 | StdCan_Set_direction(txMsg.Header, DIRECTIONFLAG_FROM_OWNER); |
| 71 | txMsg.Header.ModuleType = CAN_MODULE_TYPE_ACT_PID; ///TODO: Change this to the actual module type |
71 | txMsg.Header.ModuleType = CAN_MODULE_TYPE_ACT_PID; ///TODO: Change this to the actual module type |
| 72 | txMsg.Header.ModuleId = act_PID_ID; |
72 | txMsg.Header.ModuleId = act_PID_ID; |
| 73 | txMsg.Header.Command = |
73 | txMsg.Header.Command = CAN_MODULE_CMD_PHYSICAL_PWM; |
| 74 | txMsg.Length = 3; |
74 | txMsg.Length = 3; |
| 75 | txMsg.Data[0] = PWM_ID; |
75 | txMsg.Data[0] = PWM_ID; |
| 76 | txMsg.Data[1] = ((int16_t) (pwmValue)>>8)&0xff; |
76 | txMsg.Data[1] = ((int16_t) (pwmValue)>>8)&0xff; |
| 77 | txMsg.Data[2] = ((int16_t) (pwmValue))&0xff; |
77 | txMsg.Data[2] = ((int16_t) (pwmValue))&0xff; |
| 78 | 78 | ||