Reboot module after configuration
This commit is contained in:
parent
825873b698
commit
35536d9047
|
@ -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) {
|
||||
|
|
Reference in New Issue