feat: Added worked before in Net Control
This commit is contained in:
@@ -4994,6 +4994,8 @@ func (a *App) NetLookup(callsign string) netctl.Station {
|
||||
if lr, err := a.lookup.Lookup(a.ctx, st.Callsign); err == nil {
|
||||
st.Name, st.QTH, st.Country = lr.Name, lr.QTH, lr.Country
|
||||
st.DXCC, st.CQ, st.ITU = lr.DXCC, lr.CQZ, lr.ITUZ
|
||||
st.Grid, st.Address, st.State, st.Cnty = lr.Grid, lr.Address, lr.State, lr.County
|
||||
st.Cont, st.Lat, st.Lon, st.Email = lr.Continent, lr.Lat, lr.Lon, lr.Email
|
||||
}
|
||||
return st
|
||||
}
|
||||
@@ -5084,6 +5086,16 @@ func (a *App) NetActivate(callsign string) (qso.QSO, error) {
|
||||
for _, st := range net.Stations {
|
||||
if strings.EqualFold(st.Callsign, call) {
|
||||
q.Name, q.QTH, q.Country = st.Name, st.QTH, st.Country
|
||||
q.Grid, q.Address, q.State, q.County = st.Grid, st.Address, st.State, st.Cnty
|
||||
q.Continent, q.Email = st.Cont, st.Email
|
||||
if st.Lat != 0 {
|
||||
lat := st.Lat
|
||||
q.Lat = &lat
|
||||
}
|
||||
if st.Lon != 0 {
|
||||
lon := st.Lon
|
||||
q.Lon = &lon
|
||||
}
|
||||
if st.DXCC != 0 {
|
||||
d := st.DXCC
|
||||
q.DXCC = &d
|
||||
|
||||
Reference in New Issue
Block a user