Reduce memory usage
This commit is contained in:
parent
b779d16690
commit
159a87db17
4 changed files with 14 additions and 13 deletions
|
@ -12,7 +12,7 @@ void gps_begin() {
|
|||
}
|
||||
|
||||
void gps_fetch() {
|
||||
Serial.print("[gps] Getting location: ");
|
||||
Serial.print(F("[gps] Getting location: "));
|
||||
uint32_t ms_last_update = millis();
|
||||
// We WILL discover our location - if it's the last thing we do!
|
||||
while(true) {
|
||||
|
@ -40,7 +40,7 @@ void gps_fetch() {
|
|||
}
|
||||
|
||||
// Hooray!
|
||||
Serial.println("ok");
|
||||
Serial.println(F("ok"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
void setup() {
|
||||
Serial.begin(BAUD_PC);
|
||||
Serial.println("[main] Beginning collection sequence.");
|
||||
Serial.println(F("[main] Beginning collection sequence."));
|
||||
|
||||
random_begin();
|
||||
|
||||
|
@ -27,11 +27,11 @@ void setup() {
|
|||
TinyGPSPlus gps_data = gps_info();
|
||||
gps_end();
|
||||
|
||||
Serial.print("[main] Location: ("); Serial.print(gps_data.location.lat()); Serial.print(", "); Serial.print(gps_data.location.lng()); Serial.println(")");
|
||||
Serial.print(F("[main] Location: (")); Serial.print(gps_data.location.lat()); Serial.print(F(", ")); Serial.print(gps_data.location.lng()); Serial.println(F(")"));
|
||||
|
||||
uint32_t id = random_get();
|
||||
|
||||
Serial.print("[main] id: ");
|
||||
Serial.print(F("[main] id: "));
|
||||
Serial.println(id);
|
||||
|
||||
// Activate microSD card breakout board on the SPI bus
|
||||
|
|
|
@ -2,19 +2,20 @@
|
|||
|
||||
#include "settings.h"
|
||||
|
||||
|
||||
/*
|
||||
void power_gps_wakeup() {
|
||||
Serial.println("Warn: GPS wakeup isn't implemented yet.");
|
||||
Serial.println(F("Warn: GPS wakeup isn't implemented yet."));
|
||||
}
|
||||
|
||||
void power_gps_standby() {
|
||||
Serial.println("Warn: GPS standby isn't implemented yet.");
|
||||
Serial.println(F("Warn: GPS standby isn't implemented yet."));
|
||||
}
|
||||
*/
|
||||
|
||||
void power_off() {
|
||||
Serial.println(F("[power] Beginning shutdown sequence"));
|
||||
Serial.println(F("[power] Switching GPS module to standby"));
|
||||
power_gps_standby();
|
||||
Serial.println(F("[power] Shutting down"));
|
||||
// Serial.println(F("[power] Switching GPS module to standby"));
|
||||
// power_gps_standby();
|
||||
|
||||
Serial.println(F("[power] Signalling TPL5111"));
|
||||
pinMode(PIN_TPL_DONE, OUTPUT);
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
/**
|
||||
* Wakes the GPS module up from standby.
|
||||
*/
|
||||
void power_gps_wakeup();
|
||||
// void power_gps_wakeup();
|
||||
/**
|
||||
* Puts the GPS module into standby.
|
||||
*/
|
||||
void power_gps_standby();
|
||||
// void power_gps_standby();
|
||||
|
||||
/**
|
||||
* Signals that our work is complete and that we can turn off now to the
|
||||
|
|
Loading…
Reference in a new issue