Reboot module after configuration

This commit is contained in:
wpetit 2020-11-26 16:59:17 +01:00
parent 825873b698
commit 35536d9047

View File

@ -10,6 +10,7 @@ import (
"forge.cadoles.com/Pyxis/orion/emlid"
"forge.cadoles.com/Pyxis/orion/emlid/reachview"
"github.com/pkg/errors"
)
const (
@ -96,6 +97,11 @@ func configureRover() {
applyConfiguration(c, config)
log.Println("rebooting module")
if err := c.Reboot(context.Background(), true); err != nil {
log.Fatal(errors.Wrap(err, "could not reboot module"))
}
}
func configureBase() {
@ -132,6 +138,11 @@ func configureBase() {
applyConfiguration(c, config)
log.Println("rebooting module")
if err := c.Reboot(context.Background(), true); err != nil {
log.Fatal(errors.Wrap(err, "could not reboot module"))
}
}
func applyConfiguration(c *reachview.Client, config *reachview.Configuration) {