Moved .ino to .hpp - fixed dup include and faulty declaration
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
#include <Adafruit_SSD1306.h>
|
#include <Adafruit_SSD1306.h>
|
||||||
#include <TinyGPS++.h>
|
#include <TinyGPS++.h>
|
||||||
|
|
||||||
#include "SDCardHelper.ino"
|
#include "SDCardHelper.hpp"
|
||||||
|
|
||||||
// LORA Settings
|
// LORA Settings
|
||||||
#define SYNC_WORD 0xCE
|
#define SYNC_WORD 0xCE
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#pragma once
|
||||||
#include <SPI.h>
|
#include <SPI.h>
|
||||||
#include <SD.h>
|
#include <SD.h>
|
||||||
|
|
||||||
@@ -13,7 +14,7 @@ private:
|
|||||||
File _stream;
|
File _stream;
|
||||||
String _filename;
|
String _filename;
|
||||||
bool _available = false;
|
bool _available = false;
|
||||||
SPIClass _spi(HSPI);
|
SPIClass _spi;
|
||||||
|
|
||||||
String getNewFilename() {
|
String getNewFilename() {
|
||||||
static unsigned long i = 0;
|
static unsigned long i = 0;
|
||||||
@@ -25,7 +26,7 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SDHelper(uint8_t csPin, FileAccessMode fam, String filename = "") : _cs(csPin), _fam(fam) {
|
SDHelper(uint8_t csPin, FileAccessMode fam, String filename = "") : _cs(csPin), _fam(fam), _spi(HSPI){
|
||||||
_spi.begin(14, 2, 15, 13);
|
_spi.begin(14, 2, 15, 13);
|
||||||
if(!SD.begin(_cs, _spi)){
|
if(!SD.begin(_cs, _spi)){
|
||||||
_available = false;
|
_available = false;
|
||||||
Reference in New Issue
Block a user