Reboot the device
()
| 988 | } |
| 989 | |
| 990 | // Reboot the device |
| 991 | func (a *API) Reboot(reset bool) error { |
| 992 | // reset is not graceful, execute immediately |
| 993 | if reset { |
| 994 | return a.get(resetURL) |
| 995 | } |
| 996 | |
| 997 | // check measurement status |
| 998 | status, err := a.FetchStatus() |
| 999 | |
| 1000 | if err == nil && status.MeasurementActive { |
| 1001 | // stop measurement if possible |
| 1002 | _ = a.StopMeasure() |