Oops, helps to actually commit the fix too..
This commit is contained in:
parent
d1f274d469
commit
f0fe4663d5
5
mode_s.c
5
mode_s.c
|
@ -1493,6 +1493,11 @@ void applyPhaseCorrection(uint16_t *pPayload) {
|
||||||
uint32_t early = (pPayload[-1] + pPayload[6]) << 1;
|
uint32_t early = (pPayload[-1] + pPayload[6]) << 1;
|
||||||
uint32_t late = (pPayload[3] + pPayload[10]) << 1;
|
uint32_t late = (pPayload[3] + pPayload[10]) << 1;
|
||||||
|
|
||||||
|
if (onTime == 0 && early == 0 && late == 0) {
|
||||||
|
// Blah, can't do anything with this, avoid a divide-by-zero
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (early > late) {
|
if (early > late) {
|
||||||
// Our sample period starts late and so includes some of the next bit.
|
// Our sample period starts late and so includes some of the next bit.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue