* Compensate received values by MARK_EXCESS_MICROS, like it is done for decoding! */
| 232 | * Compensate received values by MARK_EXCESS_MICROS, like it is done for decoding! |
| 233 | */ |
| 234 | static void compensateAndDumpSequence(Print *aSerial, const volatile IRRawbufType *data, size_t length, uint16_t timebase) { |
| 235 | for (size_t i = 0; i < length; i++) { |
| 236 | uint32_t tDuration = data[i] * MICROS_PER_TICK; |
| 237 | if (i & 1) { |
| 238 | // Mark |
| 239 | tDuration -= getMarkExcessMicros(); |
| 240 | } else { |
| 241 | tDuration += getMarkExcessMicros(); |
| 242 | } |
| 243 | dumpDurationHex(aSerial, tDuration, timebase); |
| 244 | } |
| 245 | |
| 246 | // append a gap |
| 247 | dumpDurationHex(aSerial, PRONTO_DEFAULT_GAP, timebase); |
| 248 | } |
| 249 | |
| 250 | /** |
| 251 | * Print the result (second argument) as Pronto Hex on the Print supplied as argument. |
no test coverage detected