Fix compilation errors

This commit is contained in:
Starbeamrainbowlabs 2019-06-24 14:31:33 +01:00
parent 18ba73c99b
commit 6a203233fd
2 changed files with 6 additions and 4 deletions

View file

@ -8,6 +8,8 @@
#include "random.cpp"
#include "gps.h"
#include "peripheral.h"
#include "storage.h"
#include "power.h"
void setup() {
@ -21,10 +23,10 @@ void setup() {
gps_begin();
TinyGPSPlus gps_data = gps_location();
TinyGPSPlus gps_data = gps_info();
gps_end();
Serial.print("[main] Location: ("); Serial.print(loc.lat()); Serial.print(", "); Serial.print(loc.lng()); Serial.println(")");
Serial.print("[main] Location: ("); Serial.print(gps_data.location.lat()); Serial.print(", "); Serial.print(gps_data.location.lng()); Serial.println(")");
uint32_t id = random_get();
@ -45,7 +47,7 @@ void setup() {
gps_data.time.minute(),
gps_data.time.second(),
gps_data.location.lat(),
gps_data.location.lng(),
gps_data.location.lng()
);
store_debug(debug_message, chars);
store_close();

View file

@ -8,7 +8,7 @@ File _debug_handle;
void store_init() {
// NOTE: If this doesn't work, then we need to use pinMode() & specify the data pin here instead.
if(!SD.begin(PIN_SD_SPI_CHIP_SELECT)) {
if(!SD.begin(PIN_SPI_CS_SD)) {
Serial.println(F("Error: Failed to initialise connection to microSD card"));
while(true) { delay(1); } // Pseudo-halt, but uses delay() to ensure we keep passing back control to allow easy re-programming
}