I have a set of several Tracker One and Monitor Ones we're looking to deploy. I have effectively stock firmware running on them (the code I have is below). I have the Gateway settings set to send location information if the device moves more than 1 meter, with a minimum time of 15 seconds and a max of 5 minutes.
We ran a test deployment of four devices yesterday, all which were fully charged at 0730am. By 4am the devices were dead - so less than 24 hours, instead of the expected 2.5 days from the calculator.
I'm posting the code below - is there something off on this? The memory usage seemed to be around 60-70% the entire time, so maybe something is off somewhere.
(Tagging @ericpietrowicz since I've been working with him on this)
#include "Particle.h"
#include "tracker_config.h"
#include "tracker.h"
void myLocationGenerationCallback(JSONWriter &writer, LocationPoint &point, const void *context);
SYSTEM_MODE(SEMI_AUTOMATIC);
#if TRACKER_PRODUCT_NEEDED
PRODUCT_ID(TRACKER_PRODUCT_ID);
#endif // TRACKER_PRODUCT_NEEDED
PRODUCT_VERSION(TRACKER_PRODUCT_VERSION);
STARTUP(
Tracker::startup();
);
SerialLogHandler logHandler(115200, LOG_LEVEL_ALL, {
{ "app.gps.nmea", LOG_LEVEL_INFO },
{ "app.gps.ubx", LOG_LEVEL_INFO },
{ "ncp.at", LOG_LEVEL_ALL },
{ "net.ppp.client", LOG_LEVEL_ALL },
});
void setup()
{
Tracker::instance().init();
Tracker::instance().location.regLocGenCallback(myLocationGenerationCallback);
Particle.connect();
}
void loop()
{
Tracker::instance().loop();
}
void myLocationGenerationCallback(JSONWriter &writer, LocationPoint &point, const void *context)
{
float batterySoc = System.batteryCharge();
writer.name("speed").value(point.speed, 2);
writer.name("battery").value(String::format("%.1f", batterySoc));
}
(I know I don't need the speed/battery in the callback since those are included in the default data - was basically using it as a test for callback variables)
Thanks,
Cory