Converted to Platform IO friendly project, still works with Arduino provided you rename Afterburner.cpp to Afterburner.ino
This commit is contained in:
parent
f718611bd6
commit
129631c82a
|
@ -7,3 +7,9 @@
|
|||
.vs
|
||||
__vm
|
||||
/Arduino/BTCDieselHeater/.vscode/*.json
|
||||
.pio
|
||||
.pioenvs
|
||||
.piolibdeps
|
||||
.vscode/.browse.c_cpp.db*
|
||||
.vscode/c_cpp_properties.json
|
||||
.vscode/launch.json
|
||||
|
|
|
@ -0,0 +1,67 @@
|
|||
# Continuous Integration (CI) is the practice, in software
|
||||
# engineering, of merging all developer working copies with a shared mainline
|
||||
# several times a day < https://docs.platformio.org/page/ci/index.html >
|
||||
#
|
||||
# Documentation:
|
||||
#
|
||||
# * Travis CI Embedded Builds with PlatformIO
|
||||
# < https://docs.travis-ci.com/user/integration/platformio/ >
|
||||
#
|
||||
# * PlatformIO integration with Travis CI
|
||||
# < https://docs.platformio.org/page/ci/travis.html >
|
||||
#
|
||||
# * User Guide for `platformio ci` command
|
||||
# < https://docs.platformio.org/page/userguide/cmd_ci.html >
|
||||
#
|
||||
#
|
||||
# Please choose one of the following templates (proposed below) and uncomment
|
||||
# it (remove "# " before each line) or use own configuration according to the
|
||||
# Travis CI documentation (see above).
|
||||
#
|
||||
|
||||
|
||||
#
|
||||
# Template #1: General project. Test it using existing `platformio.ini`.
|
||||
#
|
||||
|
||||
# language: python
|
||||
# python:
|
||||
# - "2.7"
|
||||
#
|
||||
# sudo: false
|
||||
# cache:
|
||||
# directories:
|
||||
# - "~/.platformio"
|
||||
#
|
||||
# install:
|
||||
# - pip install -U platformio
|
||||
# - platformio update
|
||||
#
|
||||
# script:
|
||||
# - platformio run
|
||||
|
||||
|
||||
#
|
||||
# Template #2: The project is intended to be used as a library with examples.
|
||||
#
|
||||
|
||||
# language: python
|
||||
# python:
|
||||
# - "2.7"
|
||||
#
|
||||
# sudo: false
|
||||
# cache:
|
||||
# directories:
|
||||
# - "~/.platformio"
|
||||
#
|
||||
# env:
|
||||
# - PLATFORMIO_CI_SRC=path/to/test/file.c
|
||||
# - PLATFORMIO_CI_SRC=examples/file.ino
|
||||
# - PLATFORMIO_CI_SRC=path/to/test/directory
|
||||
#
|
||||
# install:
|
||||
# - pip install -U platformio
|
||||
# - platformio update
|
||||
#
|
||||
# script:
|
||||
# - platformio ci --lib="." --board=ID_1 --board=ID_2 --board=ID_N
|
|
@ -0,0 +1,19 @@
|
|||
; PlatformIO Project Configuration File
|
||||
;
|
||||
; Build options: build flags, source filter
|
||||
; Upload options: custom upload port, speed and extra flags
|
||||
; Library options: dependencies, extra library storages
|
||||
; Advanced options: extra scripting
|
||||
;
|
||||
; Please visit documentation for the other options and examples
|
||||
; https://docs.platformio.org/page/projectconf.html
|
||||
|
||||
[env:esp32dev]
|
||||
platform = espressif32
|
||||
lib_extra_dirs = ~/Documents/Arduino/libraries
|
||||
board = esp32dev
|
||||
framework = arduino
|
||||
board_build.partitions = min_spiffs.csv
|
||||
upload_speed = 921600
|
||||
upload_port = COM14
|
||||
monitor_speed = 115200
|
|
@ -0,0 +1,7 @@
|
|||
|
||||
When building with Platform IO, base file must be "Afterburner.CPP"
|
||||
|
||||
When building with ArduinoIDE, base file must be "Afterburner.INO"
|
||||
|
||||
ie use a .CPP or .INO extension as appropriate.
|
||||
Arduino is lame is the reality :-(
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
@ -21,14 +21,15 @@
|
|||
|
||||
#include <Arduino.h>
|
||||
#include "../cfg/pins.h"
|
||||
#include "../cfg/BTCConfig.h"
|
||||
#include "../Protocol/Protocol.h"
|
||||
#include "../Utility/debugport.h"
|
||||
#include "BluetoothESP32.h"
|
||||
#include "../cfg/BTCConfig.h"
|
||||
|
||||
|
||||
#ifdef ESP32
|
||||
|
||||
#if USE_HC05_BLUETOOTH == 1
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
// HC-05 BLUETOOTH with ESP32
|
||||
// |
|
||||
|
@ -56,7 +57,7 @@ CBluetoothESP32HC05::openSerial(int baudrate)
|
|||
// HC-05 BLUETOOTH with ESP32
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#if USE_CLASSIC_BLUETOOTH == 1
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
|
@ -31,6 +31,8 @@ protected:
|
|||
void openSerial(int baudrate);
|
||||
};
|
||||
|
||||
#if USE_CLASSIC_BLUETOOTH == 1
|
||||
|
||||
class CBluetoothESP32Classic : public CBluetoothAbstract {
|
||||
BluetoothSerial SerialBT;
|
||||
public:
|
||||
|
@ -40,6 +42,10 @@ public:
|
|||
virtual bool isConnected();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#if USE_BLE_BLUETOOTH == 1
|
||||
|
||||
#include <BLEDevice.h>
|
||||
#include <BLEServer.h>
|
||||
#include <BLEUtils.h>
|
||||
|
@ -62,4 +68,6 @@ public:
|
|||
virtual void check();
|
||||
virtual bool isConnected();
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
#endif
|
|
@ -185,40 +185,6 @@ CBluetoothHC05::send(const char* Str)
|
|||
// DebugPort.print("No Bluetooth client");
|
||||
}
|
||||
}
|
||||
/*
|
||||
void
|
||||
CBluetoothHC05::sendFrame(const char* pHdr, const CProtocol& Frame, bool lineterm)
|
||||
{
|
||||
// report to debug port
|
||||
CBluetoothAbstract::sendFrame(pHdr, Frame, false);
|
||||
|
||||
if(isConnected()) {
|
||||
if(Frame.verifyCRC()) {
|
||||
// send data frame to HC-05
|
||||
HC05_SerialPort.print(pHdr);
|
||||
HC05_SerialPort.write(Frame.Data, 24);
|
||||
// toggle LED
|
||||
#if BT_LED == 1
|
||||
digitalWrite(LED_Pin, !digitalRead(LED_Pin)); // toggle LED
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
DebugPort.print("Bluetooth data not sent, CRC error ");
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(lineterm) { // only report no client if this will be at end of line (long line support)
|
||||
DebugPort.print("No Bluetooth client");
|
||||
}
|
||||
// force LED off
|
||||
#if BT_LED == 1
|
||||
digitalWrite(LED_Pin, LOW);
|
||||
#endif
|
||||
}
|
||||
if(lineterm)
|
||||
DebugPort.println("");
|
||||
}
|
||||
*/
|
||||
|
||||
void
|
||||
CBluetoothHC05::openSerial(int baudrate)
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue