@@ -241,12 +241,12 @@ void processCommand() {
241
241
Serial1.print (" %%%%% " );
242
242
Serial1.println (" >> processing command" );
243
243
COMMAND cmdCode = (COMMAND)payloadBuffer[0 ];
244
+
244
245
if (cmdCode == COMMAND::GET_SKETCH_INFO) {
245
246
Serial1.println (" get sketch info" );
246
247
char response[] = {char (RESPONSE::RESPONSE_ACK)};
247
248
sendData (MESSAGE_TYPE::RESPONSE, response, 1 );
248
249
}
249
-
250
250
if (cmdCode == COMMAND::GET_CSR) {
251
251
// extract payload from [1] to [payloadLength]
252
252
// this will be the device_id used to generate a valid CSR
@@ -300,8 +300,6 @@ void processCommand() {
300
300
char response[] = {char (RESPONSE::RESPONSE_ACK)};
301
301
sendData (MESSAGE_TYPE::RESPONSE, response, 1 );
302
302
}
303
-
304
-
305
303
if (cmdCode == COMMAND::SET_YEAR) {
306
304
Serial1.println (" set year" );
307
305
char yearBytes[4 ];
@@ -324,7 +322,6 @@ void processCommand() {
324
322
325
323
char response[] = {char (RESPONSE::RESPONSE_ACK)};
326
324
sendData (MESSAGE_TYPE::RESPONSE, response, 1 );
327
-
328
325
}
329
326
if (cmdCode == COMMAND::SET_MONTH) {
330
327
Serial1.println (" set month" );
@@ -348,9 +345,7 @@ void processCommand() {
348
345
349
346
char response[] = {char (RESPONSE::RESPONSE_ACK)};
350
347
sendData (MESSAGE_TYPE::RESPONSE, response, 1 );
351
-
352
348
}
353
-
354
349
if (cmdCode == COMMAND::SET_DAY) {
355
350
Serial1.println (" set day" );
356
351
char dayBytes[4 ];
@@ -373,9 +368,7 @@ void processCommand() {
373
368
374
369
char response[] = {char (RESPONSE::RESPONSE_ACK)};
375
370
sendData (MESSAGE_TYPE::RESPONSE, response, 1 );
376
-
377
371
}
378
-
379
372
if (cmdCode == COMMAND::SET_HOUR) {
380
373
Serial1.println (" set hour" );
381
374
char hourBytes[4 ];
@@ -398,9 +391,7 @@ void processCommand() {
398
391
399
392
char response[] = {char (RESPONSE::RESPONSE_ACK)};
400
393
sendData (MESSAGE_TYPE::RESPONSE, response, 1 );
401
-
402
394
}
403
-
404
395
if (cmdCode == COMMAND::SET_VALIDITY) {
405
396
Serial1.println (" set validity" );
406
397
char validityBytes[4 ];
@@ -423,9 +414,7 @@ void processCommand() {
423
414
424
415
char response[] = {char (RESPONSE::RESPONSE_ACK)};
425
416
sendData (MESSAGE_TYPE::RESPONSE, response, 1 );
426
-
427
417
}
428
-
429
418
if (cmdCode == COMMAND::SET_CERT_SERIAL) {
430
419
// extract payload from [1] to [payloadLength]
431
420
// this will be the certificate serial number included in the device certificate
@@ -526,8 +515,6 @@ void processCommand() {
526
515
char response[] = {char (RESPONSE::RESPONSE_ACK)};
527
516
sendData (MESSAGE_TYPE::RESPONSE, response, 1 );
528
517
}
529
-
530
-
531
518
if (cmdCode == COMMAND::RECONSTRUCT_CERT) {
532
519
533
520
if (!Cert.begin ()) {
@@ -556,7 +543,6 @@ void processCommand() {
556
543
Serial1.print (' 0' );
557
544
}
558
545
Serial1.print (b, HEX);
559
-
560
546
}
561
547
Serial1.println ();
562
548
char response[] = {char (RESPONSE::RESPONSE_ACK)};
0 commit comments