sent: assert so that unit tests fail nicely
This commit is contained in:
parent
bee09dddb1
commit
bbabc1335b
|
@ -107,6 +107,7 @@ int sent_channel::Decoder(uint16_t clocks) {
|
||||||
} else {
|
} else {
|
||||||
/* some tickPerUnit calculated...
|
/* some tickPerUnit calculated...
|
||||||
* Check next 1 + 6 + 1 pulses if they are valid with current tickPerUnit */
|
* Check next 1 + 6 + 1 pulses if they are valid with current tickPerUnit */
|
||||||
|
criticalAssert(tickPerUnit != 0, "zero tickPerUnit", 0);
|
||||||
interval = (clocks + tickPerUnit / 2) / tickPerUnit - SENT_OFFSET_INTERVAL;
|
interval = (clocks + tickPerUnit / 2) / tickPerUnit - SENT_OFFSET_INTERVAL;
|
||||||
if ((interval >= 0) && (interval <= SENT_MAX_INTERVAL)) {
|
if ((interval >= 0) && (interval <= SENT_MAX_INTERVAL)) {
|
||||||
currentStatePulseCounter++;
|
currentStatePulseCounter++;
|
||||||
|
|
Loading…
Reference in New Issue