Skip to content

Commit e60975b

Browse files
authored
Merge pull request #21 from ZZ-Cat/ZZ-Cat/issue20
2 parents 829a40a + 0b89ef9 commit e60975b

File tree

8 files changed

+65
-6
lines changed

8 files changed

+65
-6
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ The example below demonstrates what your code should look like, using the instru
105105

106106
/* 2. Declare a CRSFforArduino object.
107107
You can call it literally anything you want, as long as you tell CRSF for Arduino what serial port your receiver is connected to. */
108-
CRSFforArduino crsf = CRSFforArduino(&Serial1)
108+
CRSFforArduino crsf = CRSFforArduino(&Serial1);
109109

110110
void setup()
111111
{

examples/channels/channels.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @author Cassandra "ZZ Cat" Robinson ([email protected])
44
* @brief This example sketch shows how to receive RC channels from a CRSF receiver using the CRSF for Arduino library.
55
* @version 0.4.0
6-
* @date 2023-05-31
6+
* @date 2023-06-03
77
*
88
* @copyright Copyright (c) 2023, Cassandra "ZZ Cat" Robinson. All rights reserved.
99
*

src/CRSFforArduino.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @author Cassandra "ZZ Cat" Robinson ([email protected])
44
* @brief Top level header for CRSF for Arduino, to help with Arduino IDE compatibility.
55
* @version 0.4.0
6-
* @date 2023-05-31
6+
* @date 2023-06-03
77
*
88
* @copyright Copyright (c) 2023, Cassandra "ZZ Cat" Robinson. All rights reserved.
99
*

src/lib/CRSFforArduino/CRSFforArduino.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @author Cassandra "ZZ Cat" Robinson ([email protected])
44
* @brief CRSF for Arduino facilitates the use of ExpressLRS RC receivers in Arduino projects.
55
* @version 0.4.0
6-
* @date 2023-05-31
6+
* @date 2023-06-03
77
*
88
* @copyright Copyright (c) 2023, Cassandra "ZZ Cat" Robinson. All rights reserved.
99
*
@@ -25,7 +25,11 @@
2525
*/
2626

2727
#include "CRSFforArduino.h"
28+
#if defined(ARDUINO) && defined(PLATFORMIO)
2829
#include "CompatibilityTable.h"
30+
#else
31+
#include "lib/CompatibilityTable/CompatibilityTable.h"
32+
#endif
2933

3034
CompatibilityTable CT = CompatibilityTable();
3135

src/lib/CRSFforArduino/CRSFforArduino.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @author Cassandra "ZZ Cat" Robinson ([email protected])
44
* @brief CRSF for Arduino facilitates the use of ExpressLRS RC receivers in Arduino projects.
55
* @version 0.4.0
6-
* @date 2023-05-31
6+
* @date 2023-06-03
77
*
88
* @copyright Copyright (c) 2023, Cassandra "ZZ Cat" Robinson. All rights reserved.
99
*

src/lib/CompatibilityTable/CompatibilityTable.cpp

+29
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,29 @@
1+
/**
2+
* @file CompatibilityTable.cpp
3+
* @author Cassandra "ZZ Cat" Robinson ([email protected])
4+
* @brief Compatibility Table is used to determine if the current device is compatible with CRSF for Arduino.
5+
* @version 0.4.0
6+
* @date 2023-06-03
7+
*
8+
* @copyright Copyright (c) 2023, Cassandra "ZZ Cat" Robinson. All rights reserved.
9+
*
10+
* @section License GNU General Public License v3.0
11+
* This source file is a part of the CRSF for Arduino library.
12+
* CRSF for Arduino is free software: you can redistribute it and/or modify
13+
* it under the terms of the GNU General Public License as published by
14+
* the Free Software Foundation, either version 3 of the License, or
15+
* (at your option) any later version.
16+
*
17+
* CRSF for Arduino is distributed in the hope that it will be useful,
18+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
19+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20+
* GNU General Public License for more details.
21+
*
22+
* You should have received a copy of the GNU General Public License
23+
* along with CRSF for Arduino. If not, see <https://www.gnu.org/licenses/>.
24+
*
25+
*/
26+
127
#include "CompatibilityTable.h"
228

329
CompatibilityTable::CompatibilityTable()
@@ -53,6 +79,9 @@ CompatibilityTable::CompatibilityTable()
5379
device.type.devboard = DEVBOARD_IS_INCOMPATIBLE;
5480
#warning "Devboard not supported. Please check the compatibility table."
5581
#endif // ADAFRUIT_FEATHER_M0 etc
82+
#else
83+
device.type.devboard = DEVBOARD_IS_INCOMPATIBLE;
84+
#warning "Devboard not supported. Please check the compatibility table."
5685
#endif // ARDUINO_ARCH_SAMD
5786
}
5887

src/lib/CompatibilityTable/CompatibilityTable.h

+26
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,29 @@
1+
/**
2+
* @file CompatibilityTable.h
3+
* @author Cassandra "ZZ Cat" Robinson ([email protected])
4+
* @brief Compatibility Table is used to determine if the current device is compatible with CRSF for Arduino.
5+
* @version 0.4.0
6+
* @date 2023-06-03
7+
*
8+
* @copyright Copyright (c) 2023, Cassandra "ZZ Cat" Robinson. All rights reserved.
9+
*
10+
* @section License GNU General Public License v3.0
11+
* This header file is a part of the CRSF for Arduino library.
12+
* CRSF for Arduino is free software: you can redistribute it and/or modify
13+
* it under the terms of the GNU General Public License as published by
14+
* the Free Software Foundation, either version 3 of the License, or
15+
* (at your option) any later version.
16+
*
17+
* CRSF for Arduino is distributed in the hope that it will be useful,
18+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
19+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20+
* GNU General Public License for more details.
21+
*
22+
* You should have received a copy of the GNU General Public License
23+
* along with CRSF for Arduino. If not, see <https://www.gnu.org/licenses/>.
24+
*
25+
*/
26+
127
#pragma once
228

329
#include "Arduino.h"

src/src/main_rc.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @author Cassandra "ZZ Cat" Robinson ([email protected])
44
* @brief This file demonstrates the full capabilities of CRSF for Arduino.
55
* @version 0.4.0
6-
* @date 2023-05-31
6+
* @date 2023-06-03
77
*
88
* @copyright Copyright (c) 2023, Cassandra "ZZ Cat" Robinson. All rights reserved.
99
*

0 commit comments

Comments
 (0)