Motion Master
Loading...
Searching...
No Matches
offset_detection.h
Go to the documentation of this file.
1#pragma once
2
3#include <atomic>
4#include <chrono>
5#include <map>
6
7class Cia402Drive;
9
11 public:
12 enum class State { kMissing, kInProgress, kFound };
13
14 explicit OffsetDetection(Cia402Drive &cia402_drive);
15
25
33
39 int32_t get_commutation_offset();
40
41 private:
42 Cia402Drive &cia402_drive_;
43 std::atomic_bool running_;
44
50 MotionMasterError init();
51
57 MotionMasterError deinit();
58};
Definition: cia402_drive.h:48
Definition: motion_master_error.h:6
Definition: offset_detection.h:10
MotionMasterError start()
Start the automatic offset detection.
Definition: offset_detection.cc:17
State
Definition: offset_detection.h:12
int32_t get_commutation_offset()
Get the current commutation offset.
Definition: offset_detection.cc:176
MotionMasterError wait()
Once the offset detection process was started, this function must be used to wait for it to finish.
Definition: offset_detection.cc:87