You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/encoders/calibrated/README.md
+37-4Lines changed: 37 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,11 +81,44 @@ void setup() {
81
81
82
82
Please see the more complete [example](https://github.com/simplefoc/Arduino-FOC-drivers/blob/master/examples/encoders/calibrated/sensor_calibration.ino) in our examples directory.
83
83
84
+
## EDIT March 2025
84
85
85
-
## Roadmap
86
+
The code has been rewritten to reduce its memory footprint and allow more flexible Lookup table (LUT) sizing.
87
+
Additionally, the calibrated sensor class now supports providing the saved LUT as a parameter to the constructor. This allows you to save the LUT and load it on startup to avoid recalibration on each startup.
86
88
87
-
Possible future improvements we've thought about:
89
+
The LUT and sensor's zero angle and direction are outputed by the calibration process to the Serial terminal. So you can copy and paste them into your code.
88
90
89
-
- Improve memory usage and performance
90
-
- Make calibration able to be saved/restored
91
+
Your code will look something like this:
91
92
93
+
```c++
94
+
95
+
// number of LUT entries
96
+
const N_LUT = 100;
97
+
// Lookup table that has been ouptut from the calibration process
98
+
float calibrationLut[N_LUT] = {...};
99
+
100
+
// provide the sensor class and the number of points in the LUT
0 commit comments