Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manually point Arduino IDE to Compatibility Table location #21

Merged
merged 5 commits into from
Jun 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ The example below demonstrates what your code should look like, using the instru

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

void setup()
{
Expand Down
2 changes: 1 addition & 1 deletion examples/channels/channels.ino
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @author Cassandra "ZZ Cat" Robinson (nicad.heli.flier@gmail.com)
* @brief This example sketch shows how to receive RC channels from a CRSF receiver using the CRSF for Arduino library.
* @version 0.4.0
* @date 2023-05-31
* @date 2023-06-03
*
* @copyright Copyright (c) 2023, Cassandra "ZZ Cat" Robinson. All rights reserved.
*
Expand Down
2 changes: 1 addition & 1 deletion src/CRSFforArduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @author Cassandra "ZZ Cat" Robinson (nicad.heli.flier@gmail.com)
* @brief Top level header for CRSF for Arduino, to help with Arduino IDE compatibility.
* @version 0.4.0
* @date 2023-05-31
* @date 2023-06-03
*
* @copyright Copyright (c) 2023, Cassandra "ZZ Cat" Robinson. All rights reserved.
*
Expand Down
6 changes: 5 additions & 1 deletion src/lib/CRSFforArduino/CRSFforArduino.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @author Cassandra "ZZ Cat" Robinson (nicad.heli.flier@gmail.com)
* @brief CRSF for Arduino facilitates the use of ExpressLRS RC receivers in Arduino projects.
* @version 0.4.0
* @date 2023-05-31
* @date 2023-06-03
*
* @copyright Copyright (c) 2023, Cassandra "ZZ Cat" Robinson. All rights reserved.
*
Expand All @@ -25,7 +25,11 @@
*/

#include "CRSFforArduino.h"
#if defined(ARDUINO) && defined(PLATFORMIO)
#include "CompatibilityTable.h"
#else
#include "lib/CompatibilityTable/CompatibilityTable.h"
#endif

CompatibilityTable CT = CompatibilityTable();

Expand Down
2 changes: 1 addition & 1 deletion src/lib/CRSFforArduino/CRSFforArduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @author Cassandra "ZZ Cat" Robinson (nicad.heli.flier@gmail.com)
* @brief CRSF for Arduino facilitates the use of ExpressLRS RC receivers in Arduino projects.
* @version 0.4.0
* @date 2023-05-31
* @date 2023-06-03
*
* @copyright Copyright (c) 2023, Cassandra "ZZ Cat" Robinson. All rights reserved.
*
Expand Down
29 changes: 29 additions & 0 deletions src/lib/CompatibilityTable/CompatibilityTable.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
/**
* @file CompatibilityTable.cpp
* @author Cassandra "ZZ Cat" Robinson (nicad.heli.flier@gmail.com)
* @brief Compatibility Table is used to determine if the current device is compatible with CRSF for Arduino.
* @version 0.4.0
* @date 2023-06-03
*
* @copyright Copyright (c) 2023, Cassandra "ZZ Cat" Robinson. All rights reserved.
*
* @section License GNU General Public License v3.0
* This source file is a part of the CRSF for Arduino library.
* CRSF for Arduino is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* CRSF for Arduino is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with CRSF for Arduino. If not, see <https://www.gnu.org/licenses/>.
*
*/

#include "CompatibilityTable.h"

CompatibilityTable::CompatibilityTable()
Expand Down Expand Up @@ -53,6 +79,9 @@ CompatibilityTable::CompatibilityTable()
device.type.devboard = DEVBOARD_IS_INCOMPATIBLE;
#warning "Devboard not supported. Please check the compatibility table."
#endif // ADAFRUIT_FEATHER_M0 etc
#else
device.type.devboard = DEVBOARD_IS_INCOMPATIBLE;
#warning "Devboard not supported. Please check the compatibility table."
#endif // ARDUINO_ARCH_SAMD
}

Expand Down
26 changes: 26 additions & 0 deletions src/lib/CompatibilityTable/CompatibilityTable.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
/**
* @file CompatibilityTable.h
* @author Cassandra "ZZ Cat" Robinson (nicad.heli.flier@gmail.com)
* @brief Compatibility Table is used to determine if the current device is compatible with CRSF for Arduino.
* @version 0.4.0
* @date 2023-06-03
*
* @copyright Copyright (c) 2023, Cassandra "ZZ Cat" Robinson. All rights reserved.
*
* @section License GNU General Public License v3.0
* This header file is a part of the CRSF for Arduino library.
* CRSF for Arduino is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* CRSF for Arduino is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with CRSF for Arduino. If not, see <https://www.gnu.org/licenses/>.
*
*/

#pragma once

#include "Arduino.h"
Expand Down
2 changes: 1 addition & 1 deletion src/src/main_rc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @author Cassandra "ZZ Cat" Robinson (nicad.heli.flier@gmail.com)
* @brief This file demonstrates the full capabilities of CRSF for Arduino.
* @version 0.4.0
* @date 2023-05-31
* @date 2023-06-03
*
* @copyright Copyright (c) 2023, Cassandra "ZZ Cat" Robinson. All rights reserved.
*
Expand Down