Drop the trailing underscore from the static opcode check and note that send_as only sends

This commit is contained in:
J. Nick Koston
2026-10-14 19:58:00 -10:00
parent 943c51e94e
commit 55ecd9b28f
3 changed files with 7 additions and 7 deletions
+5 -5
View File
@@ -117,11 +117,11 @@ void HDMICEC::loop() {
#ifdef HDMI_CEC_MESSAGE_CALLBACK_COUNT
this->message_callbacks_.call(frame->initiator_addr(), frame->destination_addr(), frame->payload());
#endif
// Only a frame directed at us from a registered device gets a reply: a broadcast is never
// answered, a device that only listens (address 0xF) has nothing to say, and an unregistered
// initiator cannot be answered directly
// Only a frame directed at us from a registered device gets a built-in reply: a broadcast is
// never answered (so an instance on the unregistered address 0xF answers nothing, though it may
// still send), and an unregistered initiator cannot be answered directly
if (!this->monitor_mode_ && !frame->is_broadcast() && frame->destination_addr() == this->address_ &&
frame->initiator_addr() != Frame::BROADCAST_ADDRESS && !is_claimed_(frame->payload()[0])) {
frame->initiator_addr() != Frame::BROADCAST_ADDRESS && !is_claimed(frame->payload()[0])) {
this->reply_builtin_(frame);
}
this->frames_queue_.pop_front();
@@ -135,7 +135,7 @@ void HDMICEC::loop() {
}
}
bool HDMICEC::is_claimed_(uint8_t opcode) {
bool HDMICEC::is_claimed(uint8_t opcode) {
#ifdef HDMI_CEC_CLAIMED_OPCODE_COUNT
for (uint8_t i = 0; i < HDMI_CEC_CLAIMED_OPCODE_COUNT; i++) {
if (progmem_read_byte(&CLAIMED_OPCODES[i]) == opcode) {
+1 -1
View File
@@ -178,7 +178,7 @@ class HDMICEC : public Component {
/// The built-in replies to a frame directed at us that no automation claims
void reply_builtin_(const Frame *frame);
static bool is_claimed_(uint8_t opcode);
static bool is_claimed(uint8_t opcode);
// Transmit side, in loop()
void transmit_message_();
+1 -1
View File
@@ -15,7 +15,7 @@ hdmi_cec:
then:
- lambda: |-
id(cec).send(0xf, {0x87, 0x00, 0x09, 0xb0});
- opcode: 0x9F # Get CEC Version, asked of the playback device we also stand in for
- opcode: 0x9F # Get CEC Version, asked of a playback device we send for (frames to it are not acknowledged)
destination: 0x4
then:
- hdmi_cec.send_as: