25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
607 B

  1. #include "Gps.h"
  2. #include "Debug.h"
  3. #include "Hardware.h"
  4. #define LOGGER_NAME "Gps"
  5. namespace gps {
  6. char lastPosition[GPS_POSITION_SIZE];
  7. SIM808_GPS_STATUS lastStatus;
  8. /*inline */void powerOn() { hardware::sim808::gpsPowerOn(); }
  9. /*inline */void powerOff() { hardware::sim808::gpsPowerOff(); }
  10. SIM808_GPS_STATUS acquireCurrentPosition() {
  11. SIM808_GPS_STATUS currentStatus = SIM808_GPS_STATUS::OFF;
  12. //TODO : do while (!timeout && < accurate_fix)
  13. if (currentStatus > SIM808_GPS_STATUS::NO_FIX) {
  14. lastStatus = currentStatus;
  15. }
  16. return currentStatus;
  17. }
  18. timestamp_t getTime() {
  19. }
  20. }