update
This commit is contained in:
parent
c86f531313
commit
861a5ff14b
@ -8,12 +8,6 @@ import (
|
||||
"github.com/gorilla/mux"
|
||||
)
|
||||
|
||||
//go:embed templates/*
|
||||
// var tplFolder embed.FS
|
||||
|
||||
//go:embed images/*
|
||||
// var imgFolder embed.FS
|
||||
|
||||
var tmpl *template.Template
|
||||
var listNew = []New{}
|
||||
|
||||
|
22
config.yml
22
config.yml
@ -1,13 +1,13 @@
|
||||
general:
|
||||
delete_log_file_at_start: true
|
||||
log_to_file: true
|
||||
log_level: INFO
|
||||
httpserver: true
|
||||
telnetserver: true
|
||||
flexradiospot: true
|
||||
log_level: INFO # INFO or DEBUG or WARN
|
||||
httpserver: true # not in use for now
|
||||
telnetserver: true # not in use for now
|
||||
flexradiospot: true # not in use for now
|
||||
sqlite:
|
||||
sqlite_path: 'C:\Perso\Seafile\Radio\Logs\Log4OM\Vietnam.SQLite'
|
||||
callsign: XV9Q
|
||||
sqlite_path: 'C:\Perso\Seafile\Radio\Logs\Log4OM\Vietnam.SQLite' # SQLite Db oath of Log4OM
|
||||
callsign: XV9Q # Log4OM Callsign used to check if you get spotted by someone
|
||||
cluster:
|
||||
server: dxc.k0xm.net
|
||||
port: 7300
|
||||
@ -18,12 +18,12 @@ cluster:
|
||||
command: #SET/NOFILTER
|
||||
login_prompt: "Please enter your call:"
|
||||
flex:
|
||||
discovery: true
|
||||
ip: 10.10.10.120 #113.161.103.129
|
||||
spot_life: 600
|
||||
telnetserver:
|
||||
discovery: true # Radio must be on same LAN than the program
|
||||
ip: 10.10.10.120 # if discovery is true no need to put an IP
|
||||
spot_life: 600 # seconds
|
||||
telnetserver: # Log4OM must be connected to this server ie: localhost:7301 if on same machine as this program else ip:7301
|
||||
host: 0.0.0.0
|
||||
port: 7301
|
||||
httpserver:
|
||||
httpserver: # this is the basic web gui
|
||||
host: 0.0.0.0
|
||||
port: 3000
|
@ -244,7 +244,7 @@ func (fc *FlexClient) ReadLine() {
|
||||
for {
|
||||
message, err := fc.Reader.ReadString(byte('\n'))
|
||||
if err != nil {
|
||||
Log.Errorf("Error reading message from flexradio closing program: %s", err)
|
||||
Log.Errorf("Error reading message from FlexRadio, closing program: %s", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
@ -257,7 +257,7 @@ func (fc *FlexClient) ReadLine() {
|
||||
spot, _ := fc.Repo.FindSpotByCommandNumber(respSpot[1])
|
||||
_, err := fc.Repo.UpdateFlexSpotNumberByID(respSpot[2], *spot)
|
||||
if err != nil {
|
||||
Log.Errorf("Could not update flex spot number in database: %s", err)
|
||||
Log.Errorf("Could not update Flex spot number in database: %s", err)
|
||||
}
|
||||
}
|
||||
|
||||
|
17
spot.go
17
spot.go
@ -40,6 +40,11 @@ func ProcessTelnetSpot(re *regexp.Regexp, spotRaw string, SpotChanToFlex chan Te
|
||||
}
|
||||
|
||||
spot.DXCC = GetDXCC(spot.DX, Countries)
|
||||
|
||||
if spot.DXCC == "" {
|
||||
Log.Infof("Could not identify the DXCC for %s", spot.DX)
|
||||
}
|
||||
|
||||
spot.GetBand()
|
||||
spot.GuessMode()
|
||||
spot.CallsignWorked = false
|
||||
@ -86,15 +91,11 @@ func ProcessTelnetSpot(re *regexp.Regexp, spotRaw string, SpotChanToFlex chan Te
|
||||
spot.CallsignWorked = true
|
||||
}
|
||||
|
||||
// send spot to SpotChan to Flex Client to send the spot to Flex radio
|
||||
if Cfg.General.FlexRadioSpot {
|
||||
SpotChanToFlex <- spot
|
||||
}
|
||||
// Send spots to FlexRadio
|
||||
SpotChanToFlex <- spot
|
||||
|
||||
// send FlexSpot to HTTP Server
|
||||
if Cfg.General.HTTPServer {
|
||||
SpotChanToHTTPServer <- spot
|
||||
}
|
||||
// Send FlexSpot to HTTP Server
|
||||
SpotChanToHTTPServer <- spot
|
||||
|
||||
if spot.NewDXCC {
|
||||
Log.Debugf("(** New DXCC **) DX: %s - Spotter: %s - Freq: %s - Band: %s - Mode: %s - Comment: %s - Time: %s - Command: %v, FlexSpot: %v",
|
||||
|
Loading…
x
Reference in New Issue
Block a user