MCPcopy Create free account
hub / github.com/Arduino-IRremote/Arduino-IRremote / printIRResultMinimal

Method printIRResultMinimal

src/IRReceive.hpp:2147–2183  ·  view source on GitHub ↗

@formatter:on * Function to print protocol number, address, command, raw data and repeat flag of IrReceiver.decodedIRData in one short line. * Does not print a Newline / does not end with println(). * * @param aSerial The Print object on which to write, for Arduino you can use &Serial. */

Source from the content-addressed store, hash-verified

2145 * @param aSerial The Print object on which to write, for Arduino you can use &Serial.
2146 */
2147void IRrecv::printIRResultMinimal(Print *aSerial) {
2148 aSerial->print(F("P="));
2149 aSerial->print(decodedIRData.protocol);
2150 if (decodedIRData.protocol == UNKNOWN) {
2151#if defined(DECODE_HASH)
2152 aSerial->print(F(" #=0x"));
2153# if (__INT_WIDTH__ < 32)
2154 aSerial->print(decodedIRData.decodedRawData, HEX);
2155# else
2156 PrintULL::print(aSerial, decodedIRData.decodedRawData, HEX);
2157# endif
2158#endif
2159 aSerial->print(' ');
2160 aSerial->print((decodedIRData.rawlen + 1) / 2);
2161 aSerial->println(F(" bits received"));
2162 } else {
2163 /*
2164 * New decoders have address and command
2165 */
2166 aSerial->print(F(" A=0x"));
2167 aSerial->print(decodedIRData.address, HEX);
2168
2169 aSerial->print(F(" C=0x"));
2170 aSerial->print(decodedIRData.command, HEX);
2171
2172 aSerial->print(F(" Raw=0x"));
2173#if (__INT_WIDTH__ < 32)
2174 aSerial->print(decodedIRData.decodedRawData, HEX);
2175#else
2176 PrintULL::print(aSerial, decodedIRData.decodedRawData, HEX);
2177#endif
2178
2179 if (decodedIRData.flags & (IRDATA_FLAGS_IS_AUTO_REPEAT | IRDATA_FLAGS_IS_REPEAT)) {
2180 aSerial->print(F(" R"));
2181 }
2182 }
2183}
2184
2185/*
2186 * Not used yet

Callers 1

Calls 1

printFunction · 0.85

Tested by

no test coverage detected