Skip to content

Commit

Permalink
Loading apn config from EEPROM
Browse files Browse the repository at this point in the history
  • Loading branch information
Matěj Jehlička committed May 13, 2021
1 parent b97c42e commit 7db9645
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 24 deletions.
10 changes: 0 additions & 10 deletions src/Constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,6 @@ static const int REPORT_FREQUENCE = POSITIONS_IN_REPORT * POSITION_FREQUENCE; //

static const double MAX_DISTANCE_BETWEEN_TWO_POSITIONS = round(200 / 3.6) * POSITIONS_IN_REPORT;

//static const char MQTT_HOST[] = "m.dev.jehlicka.eu";
//static const int MQTT_PORT = 8883;
//static const char MQTT_TOPIC[] = "sledovac-dev";
//static const char MQTT_USERNAME[] = "tracker";
//static const char MQTT_PASSWORD[] = "tracker";

//static const char APN_HOST[] = "internet.t-mobile.cz";
//static const char APN_USER[] = "";
//static const char APN_PASS[] = "";

static const char WIFI_SSID[] = "tracker";
static const char WIFI_PASSWORD[] = "12345678";

Expand Down
13 changes: 0 additions & 13 deletions src/logic/StateManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,6 @@ StateManager::StateManager(Preferences &preferences) {
}

bool StateManager::begin() {
resetCounter = preferences->getUInt("resets", 0);
DEBUG_PRINT("Total resets: %u\n", resetCounter);
// if (resetCounter >= 4) {
// clearConfig();
// return false;
// }
// preferences->putUInt("resets", resetCounter + 1);
// DefaultTasker.once("resetcnt", [this]() {
// Tasker::sleep(10000);
// DEBUG_PRINT("Resetting counter of resets!\n", NULL);
// preferences->putUInt("resets", 0);
// });
generateSessionId();
readConfig();
return true;
Expand Down Expand Up @@ -178,7 +166,6 @@ bool StateManager::moving() const {

void StateManager::setAcc(double acc) {
acceleration = acc;
newState = true;
}

double StateManager::getAcc() {
Expand Down
2 changes: 1 addition & 1 deletion src/logic/StateManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class StateManager {
float latitude = 0;
float longitude = 0;
float spd = 0;
float acceleration = 0;
double acceleration = 0;
long vehicleId;
bool error = false;
bool reconnecting = false;
Expand Down

0 comments on commit 7db9645

Please sign in to comment.