ClearDevice clears device data
()
| 976 | } |
| 977 | |
| 978 | // ClearDevice clears device data |
| 979 | func (a *API) ClearDevice() error { |
| 980 | // check measurement status |
| 981 | status, err := a.FetchStatus() |
| 982 | |
| 983 | if err == nil && status.MeasurementActive { |
| 984 | // stop measurement if possible |
| 985 | _ = a.StopMeasure() |
| 986 | } |
| 987 | return a.get(clearDeviceURL) |
| 988 | } |
| 989 | |
| 990 | // Reboot the device |