Struct OpenSkyhawk::CalBlob
ClassList > OpenSkyhawk > CalBlob
The whole persisted calibration set, written and erased as one unit. More...
#include <AxisCal.h>
Public Attributes
| Type | Name |
|---|---|
| AxisCal | axes offset 6 — 64 bytes |
| uint16_t | crc offset 70 — CRC-16/CCITT-FALSE over bytes [0, 70) |
| uint32_t | magic offset 0 — CAL_MAGIC |
| uint16_t | version offset 4 — CAL_VERSION |
Detailed Description
Offsets are natural-alignment under ARM EABI and happen to pack tight with no padding. That is luck rather than design, which is why the static_asserts below are load-bearing — crc is computed over offsetof(CalBlob, crc) bytes, so a layout change silently invalidates every stored blob unless CAL_VERSION moves with it.
Note:
Not __attribute__((packed)). There is no padding to remove, and packing would make every field access unaligned on a Cortex-M0+, which has no unaligned load/store.
Public Attributes Documentation
variable axes
offset 6 — 64 bytes
AxisCal OpenSkyhawk::CalBlob::axes[AXIS_CAL_SLOTS];
variable crc
offset 70 — CRC-16/CCITT-FALSE over bytes [0, 70)
uint16_t OpenSkyhawk::CalBlob::crc;
variable magic
offset 0 — CAL_MAGIC
uint32_t OpenSkyhawk::CalBlob::magic;
variable version
offset 4 — CAL_VERSION
uint16_t OpenSkyhawk::CalBlob::version;
The documentation for this class was generated from the following file Firmware/Libraries/SimGateway/AxisCal.h