🐛 calibrated offset fix

Sylvain Fargier requested to merge wip-calibrated-offset into master
  • CChannel::offset_ is relative to configured offset

@pperonna there's something weird on the calibrated offset for SPDevices, can you have a look into: src/spd/CSpd.cpp#L513

Regarding the way it's being used, I think we should store (int16_t) offset * range / (1 << resolution_) there, but not sure.

It is used there src/spd/CCardSpd.cpp#L446.

Also this modification does absoluteCalibOffset = offset - calibOffset which is what the old java GUI used to do, but the line above seem to do absoluteCalibOffset = offset + calibOffset.

Can you advise ? I'll make changes accordingly

Merge request reports