some CI linting fixes

This commit is contained in:
NP v/d Spek 2024-09-23 21:11:38 +02:00
parent 87f3f238b9
commit 839ba8817b
2 changed files with 8 additions and 8 deletions

View file

@ -263,7 +263,7 @@ void ESPNowComponent::on_data_received(const uint8_t *addr, const uint8_t *data,
} else { } else {
packet->timestamp = millis(); packet->timestamp = millis();
} }
show_packet("Receive", packet); show_packet("Receive", *packet);
if (packet->is_valid()) { if (packet->is_valid()) {
xQueueSendToBack(global_esp_now->receive_queue_, packet.get(), 10); xQueueSendToBack(global_esp_now->receive_queue_, packet.get(), 10);
@ -274,7 +274,7 @@ void ESPNowComponent::on_data_received(const uint8_t *addr, const uint8_t *data,
bool ESPNowComponent::write(const std::shared_ptr<ESPNowPacket> packet) { bool ESPNowComponent::write(const std::shared_ptr<ESPNowPacket> packet) {
uint8_t *mac = packet->peer_as_bytes(); uint8_t *mac = packet->peer_as_bytes();
show_packet("Write", packet); show_packet("Write", *packet);
if (this->is_failed()) { if (this->is_failed()) {
ESP_LOGE(TAG, "Cannot send espnow packet, espnow failed to setup"); ESP_LOGE(TAG, "Cannot send espnow packet, espnow failed to setup");
} else if (this->send_queue_full()) { } else if (this->send_queue_full()) {

View file

@ -326,27 +326,27 @@ template<typename... Ts> class DelPeerAction : public Action<Ts...>, public Pare
TemplatableValue<uint64_t, Ts...> mac_{}; TemplatableValue<uint64_t, Ts...> mac_{};
}; };
class ESPNowSentTrigger : public Trigger<ESPNowPacketPtr, bool> { class ESPNowSentTrigger : public Trigger<std::shared_ptr<ESPNowPacket>, bool> {
public: public:
explicit ESPNowSentTrigger(ESPNowComponent *parent) { explicit ESPNowSentTrigger(ESPNowComponent *parent) {
parent->get_default_protocol()->add_on_sent_callback( parent->get_default_protocol()->add_on_sent_callback(
[this](std::shared_ptr<ESPNowPacket> packet, bool status) { this->trigger(packet, status); }); [this](std::shared_ptr<ESPNowPacket> packet, bool status) { this->trigger(std::move(packet), status); });
} }
}; };
class ESPNowReceiveTrigger : public Trigger<ESPNowPacketPtr> { class ESPNowReceiveTrigger : public Trigger<std::shared_ptr<ESPNowPacket>> {
public: public:
explicit ESPNowReceiveTrigger(ESPNowComponent *parent) { explicit ESPNowReceiveTrigger(ESPNowComponent *parent) {
parent->get_default_protocol()->add_on_receive_callback( parent->get_default_protocol()->add_on_receive_callback(
[this](std::shared_ptr<ESPNowPacket> packet) { this->trigger(packet); }); [this](std::shared_ptr<ESPNowPacket> packet) { this->trigger(std::move(packet)); });
} }
}; };
class ESPNowNewPeerTrigger : public Trigger<ESPNowPacketPtr> { class ESPNowNewPeerTrigger : public Trigger<std::shared_ptr<ESPNowPacket>> {
public: public:
explicit ESPNowNewPeerTrigger(ESPNowComponent *parent) { explicit ESPNowNewPeerTrigger(ESPNowComponent *parent) {
parent->get_default_protocol()->add_on_peer_callback( parent->get_default_protocol()->add_on_peer_callback(
[this](std::shared_ptr<ESPNowPacket> packet) { this->trigger(packet); }); [this](std::shared_ptr<ESPNowPacket> packet) { this->trigger(std::move(packet)); });
} }
}; };