Skip to content

Commit

Permalink
Merge branch 'feat/add_ble_support_in_local_ctrl_example_v5.2' into '…
Browse files Browse the repository at this point in the history
…release/v5.2'

fix(examples): Fix encoding issue in esp_local_ctrl's proto script (v5.2)

See merge request espressif/esp-idf!28127
  • Loading branch information
mahavirj committed Jan 19, 2024
2 parents 35e025f + 8e4fa20 commit 5f74ed7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/protocols/esp_local_ctrl/scripts/proto_lc.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2018-2022 Espressif Systems (Shanghai) CO LTD
# SPDX-FileCopyrightText: 2018-2023 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Apache-2.0
#

Expand Down Expand Up @@ -36,7 +36,7 @@ def get_prop_count_request(security_ctx):
payload = local_ctrl_pb2.CmdGetPropertyCount()
req.cmd_get_prop_count.MergeFrom(payload)
enc_cmd = security_ctx.encrypt_data(req.SerializeToString())
return enc_cmd
return enc_cmd.decode('latin-1')


def get_prop_count_response(security_ctx, response_data):
Expand All @@ -56,7 +56,7 @@ def get_prop_vals_request(security_ctx, indices):
payload.indices.extend(indices)
req.cmd_get_prop_vals.MergeFrom(payload)
enc_cmd = security_ctx.encrypt_data(req.SerializeToString())
return enc_cmd
return enc_cmd.decode('latin-1')


def get_prop_vals_response(security_ctx, response_data):
Expand Down Expand Up @@ -85,7 +85,7 @@ def set_prop_vals_request(security_ctx, indices, values):
prop.value = v
req.cmd_set_prop_vals.MergeFrom(payload)
enc_cmd = security_ctx.encrypt_data(req.SerializeToString())
return enc_cmd
return enc_cmd.decode('latin-1')


def set_prop_vals_response(security_ctx, response_data):
Expand Down

0 comments on commit 5f74ed7

Please sign in to comment.