update
This commit is contained in:
parent
868108cd84
commit
4454822ad4
@ -1,7 +1,7 @@
|
|||||||
general:
|
general:
|
||||||
delete_log_file_at_start: true
|
delete_log_file_at_start: true
|
||||||
log_to_file: true
|
log_to_file: true
|
||||||
log_level: INFO
|
log_level: DEBUG
|
||||||
httpserver: true
|
httpserver: true
|
||||||
telnetserver: true
|
telnetserver: true
|
||||||
flexradiospot: true
|
flexradiospot: true
|
||||||
@ -19,7 +19,7 @@ cluster:
|
|||||||
login_prompt: "Please enter your call:"
|
login_prompt: "Please enter your call:"
|
||||||
flex:
|
flex:
|
||||||
ip: 10.10.10.120 #113.161.103.129
|
ip: 10.10.10.120 #113.161.103.129
|
||||||
spot_life: 600
|
spot_life: 300
|
||||||
clublog:
|
clublog:
|
||||||
api: 5767f19333363a9ef432ee9cd4141fe76b8adf38
|
api: 5767f19333363a9ef432ee9cd4141fe76b8adf38
|
||||||
telnetserver:
|
telnetserver:
|
||||||
|
@ -195,7 +195,7 @@
|
|||||||
</ItuZoneList>
|
</ItuZoneList>
|
||||||
<Latitude>-8.22</Latitude>
|
<Latitude>-8.22</Latitude>
|
||||||
<Longitude>48.2</Longitude>
|
<Longitude>48.2</Longitude>
|
||||||
<Active>false</Active>
|
<Active>false</Active>
|
||||||
<CountryTag />
|
<CountryTag />
|
||||||
<CountryPrefixList>
|
<CountryPrefixList>
|
||||||
<CountryPrefix>
|
<CountryPrefix>
|
||||||
|
@ -292,7 +292,7 @@ func (r *FlexDXClusterRepository) CreateSpot(spot FlexSpot) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_, err = insertResult.LastInsertId()
|
_, err = insertResult.LastInsertId()
|
||||||
Log.Debugf("Adding to database spot for: %s", spot.DX)
|
// Log.Debugf("Adding to database spot for: %s", spot.DX)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
Log.Errorf("impossible to retrieve last inserted id: %s", err)
|
Log.Errorf("impossible to retrieve last inserted id: %s", err)
|
||||||
}
|
}
|
||||||
@ -306,7 +306,7 @@ func (r *FlexDXClusterRepository) UpdateSpotSameBand(spot FlexSpot) error {
|
|||||||
r.Log.Errorf("could not update database: %s", err)
|
r.Log.Errorf("could not update database: %s", err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
Log.Debugf("Updating spot to database: %s", spot.DX)
|
// Log.Debugf("Updating spot to database: %s", spot.DX)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -387,6 +387,6 @@ func DeleteDatabase(filePath string, log *log.Logger) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("could not delete existing database")
|
log.Error("could not delete existing database")
|
||||||
}
|
}
|
||||||
log.Info("deleting existing database")
|
log.Debug("deleting existing database")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -207,7 +207,7 @@ func (fc *FlexClient) SendSpottoFlex(spot TelnetSpot) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fc.SendSpot(stringSpot)
|
fc.SendSpot(stringSpot)
|
||||||
Log.Debugf("Sending spot to FlexRadio: %s", stringSpot)
|
// Log.Debugf("Sending spot to FlexRadio: %s", stringSpot)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (fc *FlexClient) SendSpot(stringSpot string) {
|
func (fc *FlexClient) SendSpot(stringSpot string) {
|
||||||
@ -223,7 +223,7 @@ func (fc *FlexClient) ReadLine() {
|
|||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
Log.Debugf("Received message from FlexRadio: %s", strings.Trim(message, "\n"))
|
// Log.Debugf("Received message from FlexRadio: %s", strings.Trim(message, "\n"))
|
||||||
|
|
||||||
regRespSpot := *regexp.MustCompile(`R(\d+)\|0\|(\d+)\n`)
|
regRespSpot := *regexp.MustCompile(`R(\d+)\|0\|(\d+)\n`)
|
||||||
respSpot := regRespSpot.FindStringSubmatch(message)
|
respSpot := regRespSpot.FindStringSubmatch(message)
|
||||||
@ -258,9 +258,9 @@ func (fc *FlexClient) ReadLine() {
|
|||||||
respDelete := regSpotDeleted.FindStringSubmatch(message)
|
respDelete := regSpotDeleted.FindStringSubmatch(message)
|
||||||
|
|
||||||
if len(respDelete) > 0 {
|
if len(respDelete) > 0 {
|
||||||
spot, _ := fc.Repo.FindSpotByFlexSpotNumber(respDelete[1])
|
// spot, _ := fc.Repo.FindSpotByFlexSpotNumber(respDelete[1])
|
||||||
fc.Repo.DeleteSpotByFlexSpotNumber(respDelete[1])
|
fc.Repo.DeleteSpotByFlexSpotNumber(respDelete[1])
|
||||||
Log.Debugf("Spot: DX: %s - Spotter: %s - Freq: %s - Band: %s - FlexID: %v deleted from database", spot.DX, spot.SpotterCallsign, spot.FrequencyHz, spot.Band, respDelete[1])
|
// Log.Debugf("Spot: DX: %s - Spotter: %s - Freq: %s - Band: %s - FlexID: %v deleted from database", spot.DX, spot.SpotterCallsign, spot.FrequencyHz, spot.Band, respDelete[1])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
2
spot.go
2
spot.go
@ -126,7 +126,7 @@ func ProcessTelnetSpot(re *regexp.Regexp, spotRaw string, SpotChanToFlex chan Te
|
|||||||
spot.DX, spot.Spotter, spot.Frequency, spot.Band, spot.Mode, spot.Comment, spot.Time, spot.DXCC)
|
spot.DX, spot.Spotter, spot.Frequency, spot.Band, spot.Mode, spot.Comment, spot.Time, spot.DXCC)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Log.Debugf("Could not decode: %s", strings.Trim(spotRaw, "\n"))
|
// Log.Debugf("Could not decode: %s", strings.Trim(spotRaw, "\n"))
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user