Skip to content

Commit bc61ceb

Browse files
committed
only send the minutes if two QTCs have the same QTCTime.Hour
1 parent 9b136eb commit bc61ceb

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

core/core.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,10 @@ func (t QTCTime) String() string {
267267
return fmt.Sprintf("%02d%02d", t.Hour, t.Minute)
268268
}
269269

270+
func (t QTCTime) ShortString() string {
271+
return fmt.Sprintf("%02d", t.Minute)
272+
}
273+
270274
type QTCSeries struct {
271275
Header QTCHeader
272276
QTCs []QTC

core/qtc/qtc.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,10 +297,11 @@ func (c *Controller) SendQTC() {
297297
exchange := strconv.Itoa(int(qtc.QTCNumber)) // TODO: shorten numbers
298298

299299
// shorten time if the last QTC qso was in the same hour
300+
// TODO: make this optional?
300301
if c.currentQTC > 0 {
301302
lastQTC := c.currentSeries.QTCs[c.currentQTC-1]
302303
if lastQTC.QTCTime.Hour == qtc.QTCTime.Hour {
303-
// TODO: time = shortened time
304+
time = qtc.QTCTime.ShortString()
304305
}
305306
}
306307

0 commit comments

Comments
 (0)