26 lines
426 B
Go
26 lines
426 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"os"
|
||
|
|
||
|
"internal/calibration"
|
||
|
)
|
||
|
|
||
|
// Provide a filename as input, get the result on stdout
|
||
|
func main() {
|
||
|
x := 0
|
||
|
found := false
|
||
|
seen := calibration.Set{0: struct{}{}}
|
||
|
|
||
|
for {
|
||
|
x, found = calibration.ScanFrequencies(os.Args[1], &seen, x)
|
||
|
if found {
|
||
|
break
|
||
|
}
|
||
|
fmt.Println("All frequencies scanned, repeating...")
|
||
|
}
|
||
|
|
||
|
fmt.Println("Repeat frequency detected, calibration complete: ", x)
|
||
|
}
|