From 35536d9047fd1864fc094f7ad1572cae6b623887 Mon Sep 17 00:00:00 2001 From: William Petit Date: Thu, 26 Nov 2020 16:59:17 +0100 Subject: [PATCH] Reboot module after configuration --- cmd/configurator/main.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cmd/configurator/main.go b/cmd/configurator/main.go index 97f35e7..cbf0a4e 100644 --- a/cmd/configurator/main.go +++ b/cmd/configurator/main.go @@ -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) {