Documentation ¶
Overview ¶
Copyright © 2023 NAME HERE <EMAIL ADDRESS>
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var FreqCmd = &cobra.Command{ Use: "freq [MHz]", Short: "Get or Set current frequency", Run: func(cmd *cobra.Command, args []string) { freq := "" if len(args) != 0 { freq = args[0] } port, err := djx100.Connect(rootCmd.PersistentFlags().Lookup("port").Value.String()) if err != nil { fmt.Println(err) os.Exit(1) } response, err := djx100.SendCmd(port, "AL~FREQ"+freq) if err != nil { fmt.Println(err) os.Exit(1) } fmt.Println(response) }, }
View Source
var GPSCmd = &cobra.Command{ Use: "gps", Short: "GPS Info", Run: func(cmd *cobra.Command, args []string) { port, err := djx100.Connect(rootCmd.PersistentFlags().Lookup("port").Value.String()) if err != nil { fmt.Println(err) os.Exit(1) } response, err := djx100.SendCmd(port, "AL~GPS") if err != nil { fmt.Println(err) os.Exit(1) } fmt.Println(response) }, }
View Source
var SQLCmd = &cobra.Command{ Use: "sql <level>", Short: "Set SQL [0-35]", Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { port, err := djx100.Connect(rootCmd.PersistentFlags().Lookup("port").Value.String()) if err != nil { fmt.Println(err) os.Exit(1) } response, err := djx100.SendCmd(port, "AL~SQL"+args[0]) if err != nil { fmt.Println(err) os.Exit(1) } fmt.Println(response) }, }
View Source
var VolCmd = &cobra.Command{ Use: "vol <level>", Short: "Set Volume [0-35]", Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { port, err := djx100.Connect(rootCmd.PersistentFlags().Lookup("port").Value.String()) if err != nil { fmt.Println(err) os.Exit(1) } response, err := djx100.SendCmd(port, "AL~VOL"+args[0]) if err != nil { fmt.Println(err) os.Exit(1) } fmt.Println(response) }, }
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.