Removed old uC/OS-III delay function in linux GPS emulator

replace/3cd2064ec1e94e4ddd8436f13b176deb4c338b40
Silvano Seva 2021-03-10 17:06:05 +01:00
rodzic e5316aa8be
commit 608292ee5b
1 zmienionych plików z 2 dodań i 3 usunięć

Wyświetl plik

@ -19,9 +19,9 @@
***************************************************************************/ ***************************************************************************/
#include <interfaces/gps.h> #include <interfaces/gps.h>
#include <interfaces/delays.h>
#include <hwconfig.h> #include <hwconfig.h>
#include <string.h> #include <string.h>
#include <os.h>
#define MAX_NMEA_LEN 80 #define MAX_NMEA_LEN 80
#define NMEA_SAMPLES 8 #define NMEA_SAMPLES 8
@ -63,12 +63,11 @@ bool gps_detect(__attribute__((unused)) uint16_t timeout)
int gps_getNmeaSentence(char *buf, const size_t maxLength) int gps_getNmeaSentence(char *buf, const size_t maxLength)
{ {
OS_ERR os_err;
static int i = 0; static int i = 0;
// Emulate GPS device by sending NMEA sentences every 1s // Emulate GPS device by sending NMEA sentences every 1s
if(i == 0) if(i == 0)
OSTimeDlyHMSM(0u, 0u, 1u, 0u, OS_OPT_TIME_HMSM_STRICT, &os_err); sleepFor(1u, 0u);
size_t len = strnlen(test_nmea_sentences[i], MAX_NMEA_LEN); size_t len = strnlen(test_nmea_sentences[i], MAX_NMEA_LEN);
if (len > maxLength) if (len > maxLength)
return -1; return -1;