Rev 1611 | Rev 1910 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 1611 | Rev 1613 | ||
|---|---|---|---|
| Line 291... | Line 291... | ||
| 291 | StdCan_Set_class(txMsg.Header, CAN_MODULE_CLASS_ACT); |
291 | StdCan_Set_class(txMsg.Header, CAN_MODULE_CLASS_ACT); |
| 292 | StdCan_Set_direction(txMsg.Header, DIRECTIONFLAG_FROM_OWNER); |
292 | StdCan_Set_direction(txMsg.Header, DIRECTIONFLAG_FROM_OWNER); |
| 293 | txMsg.Header.ModuleType = CAN_MODULE_TYPE_ACT_DIMMER230; |
293 | txMsg.Header.ModuleType = CAN_MODULE_TYPE_ACT_DIMMER230; |
| 294 | txMsg.Header.ModuleId = act_dimmer230_ID; |
294 | txMsg.Header.ModuleId = act_dimmer230_ID; |
| 295 | txMsg.Header.Command = CAN_MODULE_CMD_DIMMER230_NETINFO; |
295 | txMsg.Header.Command = CAN_MODULE_CMD_DIMMER230_NETINFO; |
| 296 | txMsg.Length = |
296 | txMsg.Length = 3; |
| 297 | txMsg.Data[0] = ((netConnected&0x1)<<7 | (frequency&0x3)<<5); |
297 | txMsg.Data[0] = ((netConnected&0x1)<<7 | (frequency&0x3)<<5); |
| 298 | txMsg.Data[1] = dimmerValue; |
298 | txMsg.Data[1] = dimmerValue; |
| 299 |
|
299 | txMsg.Data[2] = 0; //Channel |
| 300 | StdCan_Put(&txMsg); |
300 | StdCan_Put(&txMsg); |
| 301 | } |
301 | } |
| 302 | 302 | ||
| 303 | /* If dimmervalue was changed over 5 seconds ago then store the new dimmervalue */ |
303 | /* If dimmervalue was changed over 5 seconds ago then store the new dimmervalue */ |
| 304 | if (Timer_Expired(act_dimmer230_STORE_VALUE_TIMEOUT)) |
304 | if (Timer_Expired(act_dimmer230_STORE_VALUE_TIMEOUT)) |