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"
|
||||||
"forge.cadoles.com/Pyxis/orion/emlid/reachview"
|
"forge.cadoles.com/Pyxis/orion/emlid/reachview"
|
||||||
|
"github.com/pkg/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -96,6 +97,11 @@ func configureRover() {
|
||||||
|
|
||||||
applyConfiguration(c, config)
|
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() {
|
func configureBase() {
|
||||||
|
@ -132,6 +138,11 @@ func configureBase() {
|
||||||
|
|
||||||
applyConfiguration(c, config)
|
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) {
|
func applyConfiguration(c *reachview.Client, config *reachview.Configuration) {
|
||||||
|
|
Reference in New Issue