From cbee6df642c846e1fe0db1d52ca0704301bed665 Mon Sep 17 00:00:00 2001 From: Oskar Weigl Date: Thu, 21 Jun 2018 21:59:16 -0700 Subject: [PATCH] fix compile errors after merge --- Firmware/fibre/cpp/include/fibre/protocol.hpp | 10 +++++----- Firmware/fibre/cpp/protocol.cpp | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Firmware/fibre/cpp/include/fibre/protocol.hpp b/Firmware/fibre/cpp/include/fibre/protocol.hpp index 8ea638e9..ed174dd9 100644 --- a/Firmware/fibre/cpp/include/fibre/protocol.hpp +++ b/Firmware/fibre/cpp/include/fibre/protocol.hpp @@ -440,7 +440,7 @@ void default_readwrite_endpoint_handler(endpoint_ref_t* value, const uint8_t* in size_t cnt = write_leendpoint_id)>(value->endpoint_id, buffer); cnt += write_lejson_crc)>(value->json_crc, buffer + cnt); if (cnt <= output->get_free_space()) - output->process_bytes(buffer, cnt); + output->process_bytes(buffer, cnt, nullptr); } // If a new value was passed, call the corresponding little endian deserialization function @@ -880,11 +880,8 @@ public: if (id < length) list[id] = this; } - // void handle(const uint8_t* input, size_t input_length, StreamSink* output) { - // default_readwrite_endpoint_handler(property_, input, input_length, output); - // } void handle(const uint8_t* input, size_t input_length, StreamSink* output) final { - default_readwrite_endpoint_handler(property_, input, input_length, output); + default_readwrite_endpoint_handler(property_, input, input_length, output); } /*void handle(const uint8_t* input, size_t input_length, StreamSink* output) { handle(input, input_length, output); @@ -1137,6 +1134,9 @@ extern uint16_t json_crc_; extern JSONDescriptorEndpoint json_file_endpoint_; extern EndpointProvider* application_endpoints_; +bool is_endpoint_ref_valid(endpoint_ref_t endpoint_ref); +Endpoint* get_endpoint(endpoint_ref_t endpoint_ref); + // @brief Registers the specified application object list using the provided endpoint table. // This function should only be called once during the lifetime of the application. TODO: fix this. // @param application_objects The application objects to be registred. diff --git a/Firmware/fibre/cpp/protocol.cpp b/Firmware/fibre/cpp/protocol.cpp index c2034885..23a2e0a5 100644 --- a/Firmware/fibre/cpp/protocol.cpp +++ b/Firmware/fibre/cpp/protocol.cpp @@ -221,7 +221,7 @@ bool is_endpoint_ref_valid(endpoint_ref_t endpoint_ref) { Endpoint* get_endpoint(endpoint_ref_t endpoint_ref) { if (is_endpoint_ref_valid(endpoint_ref)) - return endpoints_[endpoint_ref.endpoint_id]; + return endpoint_list_[endpoint_ref.endpoint_id]; else return nullptr; }