Skip to content

Commit 3254a5d

Browse files
authored
Merge pull request #9 from BlueAndi/release/2.0.x
Prepare v2.0.3
2 parents 70bef68 + 21ce302 commit 3254a5d

34 files changed

+261
-40
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 2.0.3
2+
3+
- Update to VSCP framework v2.0.3, please see the ![changelog](https://github.com/BlueAndi/vscp-framework/releases/tag/v2.0.3) there.
4+
- Deprecated "dataNum" replaced with "dataSize". Thanks to michpro!
5+
16
## 2.0.2
27

38
- Update to VSCP framework v2.0.2, please see the ![changelog](https://github.com/BlueAndi/vscp-framework/releases/tag/v2.0.2) there.

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ vscp.prepareTxMessage(txMsg, VSCP_CLASS_L1_INFORMATION, VSCP_TYPE_INFORMATION_ON
5050
### Add the class and type specific data.
5151

5252
```
53-
txMsg.data[0] = 1; // Index
54-
txMsg.data[1] = 0; // Zone
55-
txMsg.data[2] = 0; // Sub zone
56-
txMsg.dataNum = 3;
53+
txMsg.data[0] = 1; // Index
54+
txMsg.data[1] = 0; // Zone
55+
txMsg.data[2] = 0; // Sub zone
56+
txMsg.dataSize = 3;
5757
```
5858

5959
### Send the event.

examples/Generic/Generic.ino

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,16 @@ bool transportRead(vscp_RxMessage * const rxMsg) {
4646
rxMsg->vscpType = ...
4747
rxMsg->oAddr = ...
4848
rxMsg->hardCoded = ...
49-
rxMsg->dataNum = ...
49+
rxMsg->dataSize = ...
5050
5151
// Protect against data buffer out of bounce access
52-
if (VSCP_L1_DATA_SIZE < rxMsg->dataNum)
52+
if (VSCP_L1_DATA_SIZE < rxMsg->dataSize)
5353
{
54-
rxMsg->dataNum = VSCP_L1_DATA_SIZE;
54+
rxMsg->dataSize = VSCP_L1_DATA_SIZE;
5555
}
5656
5757
// Copy the payload
58-
for(index = 0; index < rxMsg->dataNum; ++index)
58+
for(index = 0; index < rxMsg->dataSize; ++index)
5959
{
6060
rxMsg->data[index] = ...
6161
}
@@ -79,10 +79,10 @@ bool transportWrite(vscp_TxMessage const * const txMsg) {
7979
... = rxMsg->vscpType;
8080
... = rxMsg->oAddr;
8181
... = rxMsg->hardCoded;
82-
... = rxMsg->dataNum;
82+
... = rxMsg->dataSize;
8383
8484
// Copy the payload
85-
for(index = 0; index < rxMsg->dataNum; ++index)
85+
for(index = 0; index < rxMsg->dataSize; ++index)
8686
{
8787
... = rxMsg->data[index];
8888
}
@@ -163,10 +163,10 @@ void loop() {
163163

164164
// Send a VSCP message here ... e.g. a CLASS1.INFORMATION ON event
165165
vscp.prepareTxMessage(txMsg, VSCP_CLASS_L1_INFORMATION, VSCP_TYPE_INFORMATION_ON, VSCP_PRIORITY_3_NORMAL);
166-
txMsg.data[0] = 1; // Index
167-
txMsg.data[1] = 0; // Zone
168-
txMsg.data[2] = 0; // Sub zone
169-
txMsg.dataNum = 3;
166+
txMsg.data[0] = 1; // Index
167+
txMsg.data[1] = 0; // Zone
168+
txMsg.data[2] = 0; // Sub zone
169+
txMsg.dataSize = 3;
170170
vscp.write(txMsg);
171171

172172
} else {

examples/Seeed-Studio-CAN_BUS_Shield/Seeed-Studio-CAN_BUS_Shield.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ bool transportRead(vscp_RxMessage * const rxMsg) {
5050
{
5151
unsigned long canMsgId = 0;
5252

53-
if (CAN_OK == canCom.readMsgBufID(&canMsgId, &rxMsg->dataNum, rxMsg->data)) {
53+
if (CAN_OK == canCom.readMsgBufID(&canMsgId, &rxMsg->dataSize, rxMsg->data)) {
5454

5555
rxMsg->vscpClass = (uint16_t)((canMsgId >> 16) & 0x01ff);
5656
rxMsg->vscpType = (uint8_t)((canMsgId >> 8) & 0x00ff);
@@ -88,7 +88,7 @@ bool transportWrite(vscp_TxMessage const * const txMsg) {
8888
}
8989

9090
// Send CAN message
91-
if (CAN_OK != canCom.sendMsgBuf(canMsgId, 1, 0, txMsg->dataNum, (unsigned char*)txMsg->data)) {
91+
if (CAN_OK != canCom.sendMsgBuf(canMsgId, 1, 0, txMsg->dataSize, (unsigned char*)txMsg->data)) {
9292

9393
// CAN message couldn't be sent, try again.
9494
++retryCnt;
@@ -225,4 +225,4 @@ void loop() {
225225

226226
}
227227

228-
}
228+
}

examples/Sparkfun_CAN-BUS_Shield/Sparkfun_CAN-BUS_Shield.ino

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,16 @@ bool transportRead(vscp_RxMessage * const rxMsg) {
5454
rxMsg->oAddr = (uint8_t)((canMsg.adrsValue >> 0) & 0x00ff);
5555
rxMsg->hardCoded = (uint8_t)((canMsg.adrsValue >> 25) & 0x0001);
5656
rxMsg->priority = (VSCP_PRIORITY)((canMsg.adrsValue >> 26) & 0x0007);
57-
rxMsg->dataNum = canMsg.dataLength;
57+
rxMsg->dataSize = canMsg.dataLength;
5858

5959
// Protect against a buffer out of bounce access
60-
if (VSCP_L1_DATA_SIZE < rxMsg->dataNum) {
60+
if (VSCP_L1_DATA_SIZE < rxMsg->dataSize) {
6161

62-
rxMsg->dataNum = VSCP_L1_DATA_SIZE;
62+
rxMsg->dataSize = VSCP_L1_DATA_SIZE;
6363
}
6464

6565
// Copy payload
66-
for(index = 0; index < rxMsg->dataNum; ++index) {
66+
for(index = 0; index < rxMsg->dataSize; ++index) {
6767

6868
rxMsg->data[index] = canMsg.data[index];
6969
}
@@ -94,7 +94,7 @@ bool transportWrite(vscp_TxMessage const * const txMsg) {
9494

9595
canMsg.rtr = 0;
9696

97-
canMsg.dataLength = txMsg->dataNum;
97+
canMsg.dataLength = txMsg->dataSize;
9898

9999
for(index = 0; index < canMsg.dataLength; ++index) {
100100

@@ -242,4 +242,4 @@ void loop() {
242242

243243
}
244244

245-
}
245+
}

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vscp-arduino",
3-
"version": "2.0.2",
3+
"version": "2.0.3",
44
"keywords": "vscp, arduino-library, vscp-arduino, automation, home automation",
55
"description": "Very Simple Control Procotol (VSCP) Level 1 Library for the arduino IDE.",
66
"repository": {

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=VSCP
2-
version=2.0.2
2+
version=2.0.3
33
author=Andreas Merkle
44
maintainer=Andreas Merkle <[email protected]>
55
sentence=Very Simple Control Protocol L1 framework for all Arduino boards.

src/framework/core/vscp_core.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ extern "C"
102102
#define VSCP_CORE_VERSION_STR "v1.13.1"
103103

104104
/** VSCP framework version string */
105-
#define VSCP_CORE_FRAMEWORK_VERSION "v2.0.2"
105+
#define VSCP_CORE_FRAMEWORK_VERSION "v2.0.3"
106106

107107
/*******************************************************************************
108108
MACROS

src/framework/events/vscp_evt_alarm.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ This file is automatically generated. Don't change it manually.
4949
#include <stdint.h>
5050
#include "..\user\vscp_platform.h"
5151

52+
#ifdef __cplusplus
53+
extern "C"
54+
{
55+
#endif
56+
5257
/*******************************************************************************
5358
COMPILER SWITCHES
5459
*******************************************************************************/
@@ -225,4 +230,8 @@ extern BOOL vscp_evt_alarm_sendWatchdog(uint8_t index, uint8_t zone, uint8_t sub
225230
*/
226231
extern BOOL vscp_evt_alarm_sendAlarmReset(uint8_t alarmRegister, uint8_t zone, uint8_t subZone);
227232

233+
#ifdef __cplusplus
234+
}
235+
#endif
236+
228237
#endif /* __VSCP_EVT_ALARM_H__ */

src/framework/events/vscp_evt_aol.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ This file is automatically generated. Don't change it manually.
4949
#include <stdint.h>
5050
#include "..\user\vscp_platform.h"
5151

52+
#ifdef __cplusplus
53+
extern "C"
54+
{
55+
#endif
56+
5257
/*******************************************************************************
5358
COMPILER SWITCHES
5459
*******************************************************************************/
@@ -256,4 +261,8 @@ extern BOOL vscp_evt_aol_sendUpdateBiosImage(uint8_t index, uint8_t zone, uint8_
256261
*/
257262
extern BOOL vscp_evt_aol_sendUpdatePerformOtherDiagnosticProcedures(uint8_t index, uint8_t zone, uint8_t subZone);
258263

264+
#ifdef __cplusplus
265+
}
266+
#endif
267+
259268
#endif /* __VSCP_EVT_AOL_H__ */

0 commit comments

Comments
 (0)