|
|
@ -179,26 +179,14 @@ void T1000SensorManager::loop() { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
int T1000SensorManager::getNumSettings() const { return 2; } // just one supported: "gps" (power switch)
|
|
|
int T1000SensorManager::getNumSettings() const { return 1; } // just one supported: "gps" (power switch)
|
|
|
|
|
|
|
|
|
const char* T1000SensorManager::getSettingName(int i) const { |
|
|
const char* T1000SensorManager::getSettingName(int i) const { |
|
|
switch (i) { |
|
|
return i == 0 ? "gps" : NULL; |
|
|
case 0: |
|
|
|
|
|
return "gps"; |
|
|
|
|
|
break; |
|
|
|
|
|
case 1: |
|
|
|
|
|
return "sync"; |
|
|
|
|
|
break; |
|
|
|
|
|
default: |
|
|
|
|
|
return NULL; |
|
|
|
|
|
break; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
const char* T1000SensorManager::getSettingValue(int i) const { |
|
|
const char* T1000SensorManager::getSettingValue(int i) const { |
|
|
if (i == 0) { |
|
|
if (i == 0) { |
|
|
return gps_active ? "1" : "0"; |
|
|
return gps_active ? "1" : "0"; |
|
|
} else if (i == 1) { |
|
|
|
|
|
return _nmea->waitingTimeSync() ? "1" : "0"; |
|
|
|
|
|
} |
|
|
} |
|
|
return NULL; |
|
|
return NULL; |
|
|
} |
|
|
} |
|
|
@ -210,9 +198,6 @@ bool T1000SensorManager::setSettingValue(const char* name, const char* value) { |
|
|
start_gps(); |
|
|
start_gps(); |
|
|
} |
|
|
} |
|
|
return true; |
|
|
return true; |
|
|
} else if (strcmp(name, "sync") == 0) { |
|
|
|
|
|
_nmea->syncTime(); // whatever the value ...
|
|
|
|
|
|
return true; |
|
|
|
|
|
} |
|
|
} |
|
|
return false; // not supported
|
|
|
return false; // not supported
|
|
|
} |
|
|
} |
|
|
|