mirror of
https://github.com/troglobit/libuev.git
synced 2026-10-07 07:44:05 +07:00
Move default config to bottom
This commit is contained in:
@@ -15,6 +15,7 @@ require "Class"
|
||||
require "trace"
|
||||
local NIL = Class.NIL
|
||||
local list = _G.list
|
||||
local sampleConf
|
||||
|
||||
local iometa = getmetatable(io.stdin)
|
||||
if iometa.fileno and not iometa.getfd then iometa.getfd = iometa.fileno end
|
||||
@@ -509,47 +510,6 @@ local testConf
|
||||
}
|
||||
--]]
|
||||
|
||||
local NM_GPS = { "^...GGA", "^...GSA", "^...RMC", "^...GSV", }
|
||||
|
||||
local sampleConf = {
|
||||
outputs = {
|
||||
instruments = { inputs = {"p_lospeed_1", "nogps", "autopilot"} , port=27001,
|
||||
output = "p_lospeed_1" },
|
||||
--sfeed = { inputs = { "gps_bkhousemux" }, output = "p_lospeed_2", port=27002 },
|
||||
gpsfeed = { inputs = { "gpsmin" }, output = "p_lospeed_2", port=27002 },
|
||||
garmin_nmea = { inputs = { "p_lospeed_1", "p_lospeed_2", "aisfilter", "nogps", "gps" },
|
||||
output = "p_hispeed", port=27003 },
|
||||
},
|
||||
nmeaports = {
|
||||
p_lospeed_1 = { path = "/dev/ttyusb/mos7840-9710-7840/0", speed=4800 , port=26001},
|
||||
p_lospeed_2 = { path = "/dev/ttyusb/mos7840-9710-7840/1", speed=4800 , port=26002},
|
||||
p_hispeed = { path = "/dev/ttyusb/mos7840-9710-7840/2", speed=38400 , port=26003},
|
||||
p_gps = { path = "/dev/rfcomm0", speed=38400 , port=26004},
|
||||
p_ais = { path = "/dev/ttyusb/ftdi_sio-0403-6001/0", speed=38400 , port=25001},
|
||||
-- p_ais = { path = "/dev/ttyS1", speed=38400 , port=25001},
|
||||
-- p_gps = { path = "/dev/ttyS1", speed=38400 , port=26004},
|
||||
p_bkhousemux = { path = "/dev/ttyusb/pl2303-067b-2303/bus_usb_001_009:00",
|
||||
speed=38400 , port=25005},
|
||||
},
|
||||
rawports = {
|
||||
p_pactor = { path = "/dev/ttyusb/ftdi_sio-0403-d010/0", speed=9600 , port=25002},
|
||||
p_garmin1 = { path = "/dev/ttyusb/mos7840-9710-7840/3", speed=9600 , port=25003},
|
||||
p_garmin2 = { path = "/dev/ttyS1", speed=9600 , port=25004},
|
||||
p_navtex = { path = "/dev/ttyusb/pl2303-067b-2303/bus_usb_001_010:00",
|
||||
speed=38400 , port=25006},
|
||||
},
|
||||
filter = {
|
||||
nogps = { inputs = { "p_bkhousemux" }, neg = NM_GPS , port=28001, },
|
||||
gps = { inputs = { "p_gps", "p_bkhousemux", "aisfilter"} , port=28002,
|
||||
pos = NM_GPS, aux={GpsComp}, prio_delay=2500 },
|
||||
gpsmin = { inputs = { "gps", pos = { "^...RMC" } } },
|
||||
autopilot = { inputs = { "p_hispeed" } , port=28003,
|
||||
pos = { "^...XTE", "^...WPT" } },
|
||||
aisfilter = { inputs = { "p_ais" } , port=28004,
|
||||
aux = {AisFilter} }
|
||||
},
|
||||
}
|
||||
|
||||
---
|
||||
-- Startup system after all nodes are brought into existence
|
||||
local function startSystem()
|
||||
@@ -603,5 +563,45 @@ local function main(args)
|
||||
runGC()
|
||||
end
|
||||
|
||||
local NM_GPS = { "^...GGA", "^...GSA", "^...RMC", "^...GSV", }
|
||||
sampleConf = {
|
||||
outputs = {
|
||||
instruments = { inputs = {"p_lospeed_1", "nogps", "autopilot"} , port=27001,
|
||||
output = "p_lospeed_1" },
|
||||
--sfeed = { inputs = { "gps_bkhousemux" }, output = "p_lospeed_2", port=27002 },
|
||||
gpsfeed = { inputs = { "gpsmin" }, output = "p_lospeed_2", port=27002 },
|
||||
garmin_nmea = { inputs = { "p_lospeed_1", "p_lospeed_2", "aisfilter", "nogps", "gps" },
|
||||
output = "p_hispeed", port=27003 },
|
||||
},
|
||||
nmeaports = {
|
||||
p_lospeed_1 = { path = "/dev/ttyusb/mos7840-9710-7840/0", speed=4800 , port=26001},
|
||||
p_lospeed_2 = { path = "/dev/ttyusb/mos7840-9710-7840/1", speed=4800 , port=26002},
|
||||
p_hispeed = { path = "/dev/ttyusb/mos7840-9710-7840/2", speed=38400 , port=26003},
|
||||
p_gps = { path = "/dev/rfcomm0", speed=38400 , port=26004},
|
||||
p_ais = { path = "/dev/ttyusb/ftdi_sio-0403-6001/0", speed=38400 , port=25001},
|
||||
-- p_ais = { path = "/dev/ttyS1", speed=38400 , port=25001},
|
||||
-- p_gps = { path = "/dev/ttyS1", speed=38400 , port=26004},
|
||||
p_bkhousemux = { path = "/dev/ttyusb/pl2303-067b-2303/bus_usb_001_009:00",
|
||||
speed=38400 , port=25005},
|
||||
},
|
||||
rawports = {
|
||||
p_pactor = { path = "/dev/ttyusb/ftdi_sio-0403-d010/0", speed=9600 , port=25002},
|
||||
p_garmin1 = { path = "/dev/ttyusb/mos7840-9710-7840/3", speed=9600 , port=25003},
|
||||
p_garmin2 = { path = "/dev/ttyS1", speed=9600 , port=25004},
|
||||
p_navtex = { path = "/dev/ttyusb/pl2303-067b-2303/bus_usb_001_010:00",
|
||||
speed=38400 , port=25006},
|
||||
},
|
||||
filter = {
|
||||
nogps = { inputs = { "p_bkhousemux" }, neg = NM_GPS , port=28001, },
|
||||
gps = { inputs = { "p_gps", "p_bkhousemux", "aisfilter"} , port=28002,
|
||||
pos = NM_GPS, aux={GpsComp}, prio_delay=2500 },
|
||||
gpsmin = { inputs = { "gps", pos = { "^...RMC" } } },
|
||||
autopilot = { inputs = { "p_hispeed" } , port=28003,
|
||||
pos = { "^...XTE", "^...WPT" } },
|
||||
aisfilter = { inputs = { "p_ais" } , port=28004,
|
||||
aux = {AisFilter} }
|
||||
},
|
||||
}
|
||||
|
||||
return ac.ADDR_TRANSIENT, main
|
||||
-- vim: set sw=3 sts=3 et nu:
|
||||
|
||||
Reference in New Issue
Block a user