|
Motion Master
|
Classes | |
| struct | AmplitudeControlGain |
| The raw values of the registers that hold ACGAIN and AFGAIN. More... | |
| struct | Outcome |
| How a run ended. More... | |
| struct | Quality |
| The quality of a run, taken from the validation iteration. More... | |
| struct | ResidualOffsetError |
| The residual offset errors of both tracks after the analysis, in LSB. More... | |
| struct | RunRecord |
| struct | TrackAdjustments |
| The adjustment values of one track, one element per iteration. More... | |
| struct | UpdatedFile |
| The content of a file after a run was added. More... | |
Functions | |
| std::string | fileName (uint8_t encoderOrdinal) |
| std::optional< int > | qualityPercentage (const std::vector< int64_t > &curve, int64_t maxPermissiblePhaseError) |
| std::string | verdict (double lowerPhaseMargin, double upperPhaseMargin) |
| bool | isHealthMonitoringActive (uint8_t cfgew) |
| std::string | encoderTypeName (CirculoEncoderType type) |
| The name of a Circulo encoder type, for example CIRCULO_7_INNER. | |
| std::string | utcTimestamp (std::chrono::system_clock::time_point time) |
| The time in UTC, for example 2026-11-04T10:15:00Z. | |
| UpdatedFile | prependRun (const std::optional< std::string > &existingContent, const RunRecord &run) |
Variables | |
| constexpr int | kFileVersion = 1 |
| The version of the file format. | |
| constexpr size_t | kMaxRuns = 10 |
| The number of runs a file keeps. Older runs are dropped. | |
| constexpr std::array< uint8_t, 33 > | kKeyConfigurationRegisterAddresses |
The record of Circulo encoder calibration runs that Motion Master keeps on the drive's flash, one file per encoder ordinal. Every function here is pure, so the record can be built and tested without a drive.
| std::string calibration_history::encoderTypeName | ( | CirculoEncoderType | type | ) |
The name of a Circulo encoder type, for example CIRCULO_7_INNER.
| std::string calibration_history::fileName | ( | uint8_t | encoderOrdinal | ) |
The name of the file for an encoder ordinal, for example circulo_integrated_encoder_1_calib.json. It follows circulo_integrated_encoder_1_config.bin and fits the 40-character file name limit of SOMANET firmware.
| bool calibration_history::isHealthMonitoringActive | ( | uint8_t | cfgew | ) |
Whether register 0x0C (CFGEW) lets NON_CTR reach the error bit: bit 6 clear.
| UpdatedFile calibration_history::prependRun | ( | const std::optional< std::string > & | existingContent, |
| const RunRecord & | run ) |
Puts the run in front of the runs in the existing content and keeps at most kMaxRuns. Missing content starts a new file. Content that is not a history file of this version also starts a new file, and the result says so.
| std::optional< int > calibration_history::qualityPercentage | ( | const std::vector< int64_t > & | curve, |
| int64_t | maxPermissiblePhaseError ) |
The quality percentage, computed exactly as OBLAC computes it: 100 - floor(max |sample| / maxPermissiblePhaseError * 100), clamped at 0. Empty when there are no samples or the limit is not positive.
| std::string calibration_history::utcTimestamp | ( | std::chrono::system_clock::time_point | time | ) |
The time in UTC, for example 2026-11-04T10:15:00Z.
| std::string calibration_history::verdict | ( | double | lowerPhaseMargin, |
| double | upperPhaseMargin ) |
EXCELLENT when both phase margins are above 25 %, MARGINAL when both are above 15 %, UNSAFE otherwise.
|
inlineconstexpr |
The version of the file format.
|
inlineconstexpr |
The RAM addresses of the 33 key configuration registers, in the order of circuloIntegratedEncoderKeyConfigurationRegisterAddresses in oblac.
|
inlineconstexpr |
The number of runs a file keeps. Older runs are dropped.