mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-05 15:38:29 -04:00
079dd3c617
git-svn-id: https://arducopter.googlecode.com/svn/trunk@669 f9c3cf11-9bcb-44bc-f272-b75c42450872
44 lines
530 B
C++
44 lines
530 B
C++
// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: t -*-
|
|
|
|
#include "GPS.h"
|
|
#include "WProgram.h"
|
|
#include <stdio.h>
|
|
|
|
void
|
|
GPS::init(void)
|
|
{
|
|
}
|
|
|
|
void
|
|
GPS::update(void)
|
|
{
|
|
}
|
|
|
|
void
|
|
GPS::_setTime(void){
|
|
_lastTime = millis();
|
|
}
|
|
|
|
int
|
|
GPS::status(void){
|
|
if (millis() - _lastTime >= 500){
|
|
return 0;
|
|
} else if (fix == 0) {
|
|
return 1;
|
|
} else {
|
|
return 2;
|
|
}
|
|
}
|
|
|
|
void
|
|
GPS::_error(const char *fmt, ...)
|
|
{
|
|
va_list ap;
|
|
|
|
if (print_errors && stderr) {
|
|
va_start(ap, fmt);
|
|
vfprintf(stderr, fmt, ap);
|
|
va_end(ap);
|
|
}
|
|
}
|