@@ -56,58 +56,58 @@ void IRsend::sendBluestarHeavy(const uint8_t data[], const uint16_t nbytes, cons
56
56
}
57
57
#endif // SEND_BLUESTARHEAVY
58
58
59
- /*
60
- // DANGER: More than 64 bits detected. A uint64_t for 'data' won't work!
61
- #if DECODE_BLUESTARHEAVY
62
- // Function should be safe up to 64 bits.
63
- /// Decode the supplied BluestarHeavy message.
64
- /// Status: ALPHA / Untested.
65
- /// @param[in,out] results Ptr to the data to decode & where to store the decode
66
- /// @param[in] offset The starting index to use when attempting to decode the
67
- /// raw data. Typically/Defaults to kStartOffset.
68
- /// @param[in] nbits The number of data bits to expect.
69
- /// @param[in] strict Flag indicating if we should perform strict matching.
70
- /// @return A boolean. True if it can decode it, false if it can't.
71
-
72
-
73
- bool IRrecv::decodeBluestarHeavy(decode_results *results, uint16_t offset, const uint16_t nbits, const bool strict) {
74
- if (results->rawlen < 2 * nbits + kBluestarHeavyOverhead - offset)
75
- return false; // Too short a message to match.
76
- if (strict && nbits != kBluestarHeavyBits)
77
- return false;
78
-
79
- uint128_t data = 0;
80
- match_result_t data_result;
81
-
82
- // Header
83
- if (!matchMark(results->rawbuf[offset++], kBluestarHeavyHdrMark))
84
- return false;
85
- if (!matchSpace(results->rawbuf[offset++], kBluestarHeavyHdrSpace))
86
- return false;
87
-
88
- // Data Section #1
89
- // e.g. data_result.data = 0xD5FED74FFA5FFA5FFF7F5CFDDC, nbits = 104
90
- data_result = matchData(&(results->rawbuf[offset]), 104,
91
- kBluestarHeavyBitMark, kBluestarHeavyOneSpace,
92
- kBluestarHeavyBitMark, kBluestarHeavyZeroSpace);
93
- offset += data_result.used;
94
- if (data_result.success == false) return false; // Fail
95
- data <<= 104; // Make room for the new bits of data.
96
- data |= data_result.data;
97
-
98
- // Header
99
- if (!matchMark(results->rawbuf[offset++], kBluestarHeavyHdrMark))
100
- return false;
101
59
102
- // Success
103
- results->decode_type = decode_type_t::BLUESTARHEAVY;
104
- results->bits = nbits;
105
- results->value = data;
106
- results->command = 0;
107
- results->address = 0;
108
- return true;
109
- }
110
- #endif // DECODE_BLUESTARHEAVY
60
+ // DANGER: More than 64 bits detected. A uint64_t for 'data' won't work!
61
+ // #if DECODE_BLUESTARHEAVY
62
+ // // Function should be safe up to 64 bits.
63
+ // /// Decode the supplied BluestarHeavy message.
64
+ // /// Status: ALPHA / Untested.
65
+ // /// @param[in,out] results Ptr to the data to decode & where to store the decode
66
+ // /// @param[in] offset The starting index to use when attempting to decode the
67
+ // /// raw data. Typically/Defaults to kStartOffset.
68
+ // /// @param[in] nbits The number of data bits to expect.
69
+ // /// @param[in] strict Flag indicating if we should perform strict matching.
70
+ // /// @return A boolean. True if it can decode it, false if it can't.
71
+
72
+
73
+ // bool IRrecv::decodeBluestarHeavy(decode_results *results, uint16_t offset, const uint16_t nbits, const bool strict) {
74
+ // if (results->rawlen < 2 * nbits + kBluestarHeavyOverhead - offset)
75
+ // return false; // Too short a message to match.
76
+ // if (strict && nbits != kBluestarHeavyBits)
77
+ // return false;
78
+
79
+ // uint64_t data = 0;
80
+ // match_result_t data_result;
81
+
82
+ // // Header
83
+ // if (!matchMark(results->rawbuf[offset++], kBluestarHeavyHdrMark))
84
+ // return false;
85
+ // if (!matchSpace(results->rawbuf[offset++], kBluestarHeavyHdrSpace))
86
+ // return false;
87
+
88
+ // // Data Section #1
89
+ // // e.g. data_result.data = 0xD5FED74FFA5FFA5FFF7F5CFDDC, nbits = 104
90
+ // data_result = matchData(&(results->rawbuf[offset]), 104,
91
+ // kBluestarHeavyBitMark, kBluestarHeavyOneSpace,
92
+ // kBluestarHeavyBitMark, kBluestarHeavyZeroSpace);
93
+ // offset += data_result.used;
94
+ // if (data_result.success == false) return false; // Fail
95
+ // data <<= 104; // Make room for the new bits of data.
96
+ // data |= data_result.data;
97
+
98
+ // // Header
99
+ // if (!matchMark(results->rawbuf[offset++], kBluestarHeavyHdrMark))
100
+ // return false;
101
+
102
+ // // Success
103
+ // results->decode_type = decode_type_t::BLUESTARHEAVY;
104
+ // results->bits = nbits;
105
+ // results->value = data;
106
+ // results->command = 0;
107
+ // results->address = 0;
108
+ // return true;
109
+ // }
110
+ // #endif // DECODE_BLUESTARHEAVY
111
111
112
112
#if DECODE_BLUESTARHEAVY
113
113
// Function should be safe over 64 bits.
@@ -148,4 +148,3 @@ bool IRrecv::decodeBluestarHeavy(decode_results *results, uint16_t offset, const
148
148
return true ;
149
149
}
150
150
#endif // DECODE_BLUESTARHEAVY
151
- */
0 commit comments