sim-modem/main.go

31 lines
516 B
Go
Raw Normal View History

2024-07-18 16:34:26 +00:00
package main
import (
"log"
2024-07-23 16:02:28 +00:00
"os"
2024-07-22 15:53:34 +00:00
"github.com/CGSG-2021-AE4/modem-test/api/modem"
2024-07-18 16:34:26 +00:00
)
func main() {
log.Println("CGSG forever!!!")
if err := mainE(); err != nil {
log.Println("MAIN finished with error:", err.Error())
}
log.Println("END")
}
func mainE() error {
2024-07-23 16:02:28 +00:00
m := modem.New(log.New(os.Stdout, "modem:", log.LstdFlags))
2024-07-23 14:59:26 +00:00
if err := m.Init(); err != nil {
return err
}
return nil
2024-07-21 13:05:09 +00:00
// ports, err := serial.GetPortsList()
// if err != nil {
// return err
// }
// log.Println(ports)
// return nil
2024-07-18 16:34:26 +00:00
}