|
1 | 1 | /* The MIT License (MIT) |
2 | 2 | * |
3 | | - * Copyright (c) 2014 - 2018, Andreas Merkle |
| 3 | + * Copyright (c) 2014 - 2019, Andreas Merkle |
4 | 4 | * http://www.blue-andi.de |
5 | 5 | * vscp@blue-andi.de |
6 | 6 | * |
|
47 | 47 | #include "vscp_class_l1.h" |
48 | 48 | #include "vscp_type_protocol.h" |
49 | 49 | #include "vscp_type_information.h" |
| 50 | +#include "vscp_information.h" |
50 | 51 | #include "vscp_ps.h" |
51 | 52 | #include "vscp_timer.h" |
52 | 53 | #include "vscp_app_reg.h" |
@@ -1149,19 +1150,11 @@ static inline void vscp_core_stateActive(void) |
1149 | 1150 | if ((FALSE != vscp_core_isHeartbeatEnabled) && |
1150 | 1151 | (FALSE == vscp_timer_getStatus(vscp_core_heartbeatTimerId))) |
1151 | 1152 | { |
1152 | | - vscp_TxMessage txMessage; |
1153 | | - |
1154 | | - txMessage.vscpClass = VSCP_CLASS_L1_INFORMATION; |
1155 | | - txMessage.vscpType = VSCP_TYPE_INFORMATION_NODE_HEARTBEAT; |
1156 | | - txMessage.priority = VSCP_PRIORITY_7_LOW; |
1157 | | - txMessage.oAddr = vscp_core_nickname; |
1158 | | - txMessage.hardCoded = VSCP_CORE_HARD_CODED; |
1159 | | - txMessage.dataNum = 3; |
1160 | | - txMessage.data[0] = 0; /* User specific - not used */ |
1161 | | - txMessage.data[1] = vscp_dev_data_getNodeZone(); |
1162 | | - txMessage.data[2] = vscp_dev_data_getNodeSubZone(); |
1163 | | - |
1164 | | - (void)vscp_transport_writeMessage(&txMessage); |
| 1153 | +#if VSCP_CONFIG_BASE_IS_ENABLED( VSCP_CONFIG_ENABLE_CUSTOM_HEARTBEAT ) |
| 1154 | + (void)vscp_portable_sendNodeHeartbeatEvent(); |
| 1155 | +#else |
| 1156 | + (void)vscp_information_sendNodeHeartbeatEvent(0, vscp_dev_data_getNodeZone(), vscp_dev_data_getNodeSubZone()); |
| 1157 | +#endif |
1165 | 1158 |
|
1166 | 1159 | /* Restart timer */ |
1167 | 1160 | vscp_timer_start(vscp_core_heartbeatTimerId, VSCP_CONFIG_HEARTBEAT_NODE_PERIOD); |
|
0 commit comments