Skip to content

Commit

Permalink
Fix tests & clang
Browse files Browse the repository at this point in the history
  • Loading branch information
richardhopton committed Mar 25, 2023
1 parent 919e37e commit 4bb1cee
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 deletions.
1 change: 0 additions & 1 deletion esphome/components/api/api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1365,5 +1365,4 @@ message BluetoothDeviceUnpairingResponse {
message UnsubscribeBluetoothLEAdvertisementsRequest {
option (id) = 87;
option (source) = SOURCE_CLIENT;
option (ifdef) = "USE_BLUETOOTH_PROXY";
}
4 changes: 0 additions & 4 deletions esphome/components/api/api_pb2_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -806,14 +806,12 @@ bool APIServerConnectionBase::read_message(uint32_t msg_size, uint32_t msg_type,
break;
}
case 87: {
#ifdef USE_BLUETOOTH_PROXY
UnsubscribeBluetoothLEAdvertisementsRequest msg;
msg.decode(msg_data, msg_size);
#ifdef HAS_PROTO_MESSAGE_DUMP
ESP_LOGVV(TAG, "on_unsubscribe_bluetooth_le_advertisements_request: %s", msg.dump().c_str());
#endif
this->on_unsubscribe_bluetooth_le_advertisements_request(msg);
#endif
break;
}
default:
Expand Down Expand Up @@ -1196,7 +1194,6 @@ void APIServerConnection::on_subscribe_bluetooth_connections_free_request(
}
}
#endif
#ifdef USE_BLUETOOTH_PROXY
void APIServerConnection::on_unsubscribe_bluetooth_le_advertisements_request(
const UnsubscribeBluetoothLEAdvertisementsRequest &msg) {
if (!this->is_connection_setup()) {
Expand All @@ -1209,7 +1206,6 @@ void APIServerConnection::on_unsubscribe_bluetooth_le_advertisements_request(
}
this->unsubscribe_bluetooth_le_advertisements(msg);
}
#endif

} // namespace api
} // namespace esphome
9 changes: 2 additions & 7 deletions esphome/components/api/api_pb2_service.h
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,8 @@ class APIServerConnectionBase : public ProtoService {
#ifdef USE_BLUETOOTH_PROXY
bool send_bluetooth_device_unpairing_response(const BluetoothDeviceUnpairingResponse &msg);
#endif
#ifdef USE_BLUETOOTH_PROXY
virtual void on_unsubscribe_bluetooth_le_advertisements_request(
const UnsubscribeBluetoothLEAdvertisementsRequest &value){};
#endif
protected:
bool read_message(uint32_t msg_size, uint32_t msg_type, uint8_t *msg_data) override;
};
Expand Down Expand Up @@ -297,9 +295,7 @@ class APIServerConnection : public APIServerConnectionBase {
virtual BluetoothConnectionsFreeResponse subscribe_bluetooth_connections_free(
const SubscribeBluetoothConnectionsFreeRequest &msg) = 0;
#endif
#ifdef USE_BLUETOOTH_PROXY
virtual void unsubscribe_bluetooth_le_advertisements(const UnsubscribeBluetoothLEAdvertisementsRequest &msg) = 0;
#endif
protected:
void on_hello_request(const HelloRequest &msg) override;
void on_connect_request(const ConnectRequest &msg) override;
Expand Down Expand Up @@ -371,9 +367,8 @@ class APIServerConnection : public APIServerConnectionBase {
#ifdef USE_BLUETOOTH_PROXY
void on_subscribe_bluetooth_connections_free_request(const SubscribeBluetoothConnectionsFreeRequest &msg) override;
#endif
#ifdef USE_BLUETOOTH_PROXY
void on_unsubscribe_bluetooth_le_advertisements_request(const UnsubscribeBluetoothLEAdvertisementsRequest &msg) override;
#endif
void on_unsubscribe_bluetooth_le_advertisements_request(
const UnsubscribeBluetoothLEAdvertisementsRequest &msg) override;
};

} // namespace api
Expand Down

0 comments on commit 4bb1cee

Please sign in to comment.