- // tone that the tag AM-modulates, so every other sample is I,
- // every other is Q. We just want power, so abs(I) + abs(Q) is
- // close to what we want.
- if(getNext) {
- uint8_t r = AMPLITUDE(b, prev);
+ // tone that the tag AM-modulates. We just want power.
+ int8_t i = iq >> 8;
+ int8_t q = iq;
+ uint8_t r = AMPLITUDE(i, q);