[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gpsd-dev] Initialization & probing questions

From: Kai Harrekilde-Petersen
Subject: [gpsd-dev] Initialization & probing questions
Date: Mon, 26 Mar 2018 22:28:59 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

Hello all,

I'm trying to implement the Skytraq driver the 'right way', going by the comments in driver_proto.c and referencing the Ublox driver.

I have a couple of questions that is may be obvious to those that know the design well, but isn't clear to me:

1) If I send a command, how should I wait for the response before returning?
For example, when I'm in _proto__event_hook() with event == event_identified, I can probe for the firmware version, but getting the response back is going to take a while. Similar, when in _proto__probe_detect() and _proto__init_query(), I need to wait for a response to be returned before returning to the caller.
- Will a nanosleep() for "an appropriate time" do?

2) .trigger()
It doesn't seem to much used - should I bother with it?

3) Excessive probing time.
Since the Skytraq powers up at 115.200 baud, it takes an obscene amount of time for it to be probed (asĀ  584 sec. Yes, almost 10 min!). Is there a simple way (at least during development) to cut this down to something more reasonable? - it seems like that it always starts out a 4800/9600 baud, and going up in baudrate. I tried messing with serial.c and (trying to) disable a lot of the other GPS drivers, but I didn't have any luck with either.

4) Store/restore of device settings.
The skytraq allows to to probe its settings to hearts' content, which allows me to restore the state when deactivating.
Not many drivers even detect event_deactivate being fired. Should I bother?


Kai Harrekilde-Petersen

reply via email to

[Prev in Thread] Current Thread [Next in Thread]