Skip to content

Commit 0c1c5ee

Browse files
committed
Delete Comments
Delete Comments
1 parent 2511335 commit 0c1c5ee

File tree

7 files changed

+141
-336
lines changed

7 files changed

+141
-336
lines changed

libraries/CezerioBlocks/src/DataTransferFunctions.cpp

+27-49
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,8 @@
1-
/*
2-
DataTransferFunctions.cpp
3-
2017 Copyright (c) RFtek Electronics Ltd. All right reserved.
4-
5-
Authors : Huseyin Ulvi AYDOGMUS, Ozgur BOSTAN
6-
Date : 2017-04-27
7-
This library is free software; you can redistribute it and/or
8-
modify it under the terms of the GNU Lesser General Public
9-
License as published by the Free Software Foundation; either
10-
version 2.1 of the License, or (at your option) any later version.
11-
12-
This library is distributed in the hope that it will be useful,
13-
but WITHOUT ANY WARRANTY; without even the implied warranty of
14-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15-
Lesser General Public License for more details.
16-
17-
You should have received a copy of the GNU Lesser General Public
18-
License along with this library; if not, write to the Free Software
19-
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-
20-
1301 USA
21-
*/
22-
231
#include "DataTransferFunctions.h"
242
unsigned char resolvePacketFlag = 0;
253

264
/**
27-
* @brief Capture packet from Serial Data
5+
* @brief Capture packet from Serial Data
286
* @param None
297
* @retval None
308
*/
@@ -33,9 +11,9 @@ void captureData(capturedPacketType* capturedPacket,
3311
const unsigned char capturedDataSize)
3412
{
3513
unsigned char i = 0;
36-
14+
3715
for(i = 0; i < capturedDataSize; i++)
38-
{
16+
{
3917
switch(capturedPacket->data_capture_status)
4018
{
4119
case CAPTURE_START:
@@ -50,67 +28,67 @@ void captureData(capturedPacketType* capturedPacket,
5028
capturedPacket->data_capture_status = CAPTURE_START;
5129
capturedPacket->data_counter = 0;
5230
}
53-
31+
5432
break;
5533
}
56-
34+
5735
case CAPTURE_ROBOT_ID:
5836
{
5937
capturedPacket->data_packet.robot_id = capturedData[i];
6038
capturedPacket->data_capture_status = CAPTURE_PACKET_ID;
61-
39+
6240
break;
6341
}
6442

6543
case CAPTURE_PACKET_ID:
6644
{
6745
capturedPacket->data_packet.packet_id = capturedData[i];
6846
capturedPacket->data_capture_status = CAPTURE_DATA;
69-
47+
7048
break;
7149
}
72-
50+
7351
case CAPTURE_DATA:
7452
{
7553
capturedPacket->data_packet.data[capturedPacket->data_counter] = capturedData[i];
7654
capturedPacket->data_counter++;
77-
55+
7856
if(capturedPacket->data_counter >= 1)
7957
{
8058
capturedPacket->data_capture_status = CAPTURE_STOP;
8159
}
82-
60+
8361
break;
84-
}
85-
62+
}
63+
8664
case CAPTURE_STOP:
8765
{
8866
if(STOP_BYTE == capturedData[i])
8967
{
9068
capturedPacket->data_packet.stop_byte = capturedData[i];
91-
92-
// packet resolve
69+
70+
// packet resolve
9371
//resolvePacket(&(capturedPacket->data_packet));
9472
resolvePacketFlag = 1;
9573
}
96-
74+
9775
capturedPacket->data_capture_status = CAPTURE_START;
9876
capturedPacket->data_counter = 0;
99-
77+
10078
break;
10179
}
102-
80+
10381
default:
10482
{
10583
capturedPacket->data_capture_status = CAPTURE_START;
10684
capturedPacket->data_counter = 0;
10785
}
10886
}
109-
}
87+
}
11088
}
11189

11290
/**
113-
* @brief Pack data with a given format
91+
* @brief Pack data with a given format
11492
* @param None
11593
* @retval None
11694
*/
@@ -123,22 +101,22 @@ void packData(dataPacketType* data_packet, unsigned char robotID, unsigned char
123101
}
124102

125103
/**
126-
* @brief Resolve captured Serial Data
104+
* @brief Resolve captured Serial Data
127105
* @param None
128106
* @retval None
129107
*/
130108
void resolvePacket(const dataPacketType* capturedPacket)
131109
{
132110
dataPacketType packet = {0};
133-
111+
134112
switch(capturedPacket->packet_id)
135-
{
113+
{
136114
case BLE_ROBOT_NAME:
137-
138-
break;
115+
116+
break;
139117

140118
case BLE_MOVE_FORWARD:
141-
119+
142120
break;
143121

144122
case BLE_MOVE_BACKWARD:
@@ -158,7 +136,7 @@ void resolvePacket(const dataPacketType* capturedPacket)
158136
break;
159137

160138
case BLE_MOVE_FORWARD_LEFT:
161-
139+
162140
break;
163141

164142
case BLE_MOVE_BACKWARD_RIGHT:
@@ -334,7 +312,7 @@ void resolvePacket(const dataPacketType* capturedPacket)
334312
break;
335313

336314
default:
337-
315+
338316
break;
339317
}
340318
}

libraries/CezerioBlocks/src/DataTransferFunctions.h

+3-24
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,3 @@
1-
/*
2-
DataTransferFunctions.h
3-
2017 Copyright (c) RFtek Electronics Ltd. All right reserved.
4-
5-
Authors : Huseyin Ulvi AYDOGMUS, Ozgur BOSTAN
6-
Date : 2017-04-27
7-
This library is free software; you can redistribute it and/or
8-
modify it under the terms of the GNU Lesser General Public
9-
License as published by the Free Software Foundation; either
10-
version 2.1 of the License, or (at your option) any later version.
11-
12-
This library is distributed in the hope that it will be useful,
13-
but WITHOUT ANY WARRANTY; without even the implied warranty of
14-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15-
Lesser General Public License for more details.
16-
17-
You should have received a copy of the GNU Lesser General Public
18-
License along with this library; if not, write to the Free Software
19-
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-
20-
1301 USA
21-
*/
221
#ifndef DATATRANSFERFUNCTIONS_H_
232
#define DATATRANSFERFUNCTIONS_H_
243

@@ -56,7 +35,7 @@ enum dataRobotIDs
5635
ARM,
5736
LOADER,
5837
SNAKE,
59-
EXCAVATOR,
38+
EXCAVATOR,
6039
MAZER
6140
};
6241

@@ -115,7 +94,7 @@ enum dataPacketIDs
11594
};
11695

11796
/*********************************************************************************************************
118-
* Structs
97+
* Structs
11998
*********************************************************************************************************/
12099

121100
typedef struct
@@ -135,7 +114,7 @@ typedef struct
135114
} capturedPacketType;
136115

137116
/*********************************************************************************************************
138-
* DataTransferFunctions
117+
* DataTransferFunctions
139118
*********************************************************************************************************/
140119

141120

libraries/CezerioBlocks/src/cezerioBlocks.cpp

-62
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,3 @@
1-
/*
2-
cezerioBlocks.cpp
3-
2017 Copyright (c) RFtek Electronics Ltd. All right reserved.
4-
5-
Authors : Huseyin Ulvi AYDOGMUS, Ozgur BOSTAN
6-
Date : 2017-03-20
7-
Version : 1.0.0
8-
- generic function for data request
9-
- generic function for data receive and data sent
10-
- main functions for output blocks
11-
12-
Date : 2017-03-21
13-
Version : 1.1.0
14-
- generic function for data request
15-
- generic function for data receive and data sent
16-
- main functions for output blocks (removed)
17-
- block specific functions for both input and output blocks added
18-
19-
Date : 2017-03-22
20-
Version : 1.2.0
21-
- initCezerioBlocks() function added to simplfy startup process
22-
23-
Date : 2017-03-23
24-
Version : 1.2.1
25-
- minor change; timer and can interrupt definitions moved to
26-
"cezerioBlocks.h" from "cezerioBlocks.cpp"
27-
28-
Date : 2017-03-30
29-
Version : 1.2.2
30-
- new blocks and related functions added (TILT, COLOUR, SLIDE, FOLLOW, BIRRR)
31-
32-
Date : 2017-04-03
33-
Version : 1.3.0
34-
- new library added for BLUE BLOCK (SoftwareSerial)
35-
36-
Date : 2017-04-27
37-
Version : 1.4.0
38-
- new library added for bluetooth communication (DataTransferFunctions)
39-
- functions: getSmartBlueData, sendSmartBlueData
40-
41-
Date : 2017-04-28
42-
Version : 1.4.1
43-
- new functions added for bluetooth communication (DataTransferFunctions)
44-
- new example sketch: SendReceiveBluetooth.ino
45-
46-
47-
This library is free software; you can redistribute it and/or
48-
modify it under the terms of the GNU Lesser General Public
49-
License as published by the Free Software Foundation; either
50-
version 2.1 of the License, or (at your option) any later version.
51-
52-
This library is distributed in the hope that it will be useful,
53-
but WITHOUT ANY WARRANTY; without even the implied warranty of
54-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
55-
Lesser General Public License for more details.
56-
57-
You should have received a copy of the GNU Lesser General Public
58-
License along with this library; if not, write to the Free Software
59-
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-
60-
1301 USA
61-
*/
62-
631
#include "cezerioBlocks.h"
642
#include "SoftwareSerial.h"
653
#include "DataTransferFunctions.h"

libraries/CezerioBlocks/src/cezerioBlocks.h

-21
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,3 @@
1-
/*
2-
cezerioBlocks.h
3-
2017 Copyright (c) RFtek Electronics Ltd. All right reserved.
4-
5-
Authors : Huseyin Ulvi AYDOGMUS, Ozgur BOSTAN
6-
Date : 2017-03-20
7-
This library is free software; you can redistribute it and/or
8-
modify it under the terms of the GNU Lesser General Public
9-
License as published by the Free Software Foundation; either
10-
version 2.1 of the License, or (at your option) any later version.
11-
12-
This library is distributed in the hope that it will be useful,
13-
but WITHOUT ANY WARRANTY; without even the implied warranty of
14-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15-
Lesser General Public License for more details.
16-
17-
You should have received a copy of the GNU Lesser General Public
18-
License along with this library; if not, write to the Free Software
19-
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-
20-
1301 USA
21-
*/
221
#ifndef CEZERIOBLOCKS_H_
232
#define CEZERIOBLOCKS_H_
243

0 commit comments

Comments
 (0)