| 1229 | } |
| 1230 | |
| 1231 | bool IRrecv::checkHeader_P(PulseDistanceWidthProtocolConstants const *aProtocolConstantsPGM) { |
| 1232 | // Check header "mark" and "space" |
| 1233 | if (!matchMark(irparams.rawbuf[1], pgm_read_word(&aProtocolConstantsPGM->DistanceWidthTimingInfo.HeaderMarkMicros))) { |
| 1234 | TRACE_PRINT(::getProtocolString((decode_type_t ) pgm_read_byte(&aProtocolConstantsPGM->ProtocolIndex))); |
| 1235 | TRACE_PRINTLN(F(": Header mark length is wrong")); |
| 1236 | return false; |
| 1237 | } |
| 1238 | if (!matchSpace(irparams.rawbuf[2], pgm_read_word(&aProtocolConstantsPGM->DistanceWidthTimingInfo.HeaderSpaceMicros))) { |
| 1239 | TRACE_PRINT(::getProtocolString((decode_type_t ) pgm_read_byte(&aProtocolConstantsPGM->ProtocolIndex))); |
| 1240 | TRACE_PRINTLN(F(": Header space length is wrong")); |
| 1241 | return false; |
| 1242 | } |
| 1243 | return true; |
| 1244 | } |
| 1245 | |
| 1246 | /* |
| 1247 | * Does not check for same address and command, because it is almost not possible to press 2 different buttons on the remote within around 100 ms. |
nothing calls this directly
no test coverage detected