Skip to content

Commit 74d9f22

Browse files
authored
Writeable property callback was incorrect (#300)
* incorrect property callback * add extra compiler warnings
1 parent 1e7a680 commit 74d9f22

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

NXP/MIMXRT1060-EVK/app/nx_client.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,13 @@ static void set_led_state(bool level)
100100
{
101101
if (level)
102102
{
103-
printf("LED is turned ON\r\n");
103+
printf("\tLED is turned ON\r\n");
104104
// The User LED on the board shares the same pin as ENET RST (ethernet IC reset) so is unusable
105105
// USER_LED_ON();
106106
}
107107
else
108108
{
109-
printf("LED is turned OFF\r\n");
109+
printf("\tLED is turned OFF\r\n");
110110
// The User LED on the board shares the same pin as ENET RST (ethernet IC reset) so is unusable
111111
// USER_LED_OFF();
112112
}

STMicroelectronics/STM32L4_L4+/app/nx_client.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,7 @@ UINT azure_iot_nx_client_entry(
271271
tx_event_flags_get(
272272
&azure_iot_flags, TELEMETRY_INTERVAL_EVENT, TX_OR_CLEAR, &events, telemetry_interval * NX_IP_PERIODIC_RATE);
273273

274-
azure_iot_nx_client_publish_telemetry(
275-
&azure_iot_nx_client, NULL, append_device_telemetry);
274+
azure_iot_nx_client_publish_telemetry(&azure_iot_nx_client, NULL, append_device_telemetry);
276275
}
277276

278277
return NX_SUCCESS;

cmake/arm-gcc-cortex-toolchain.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
4848
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
4949
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
5050

51-
set(CMAKE_COMMON_FLAGS "-g3 --specs=nano.specs -ffunction-sections -fdata-sections -fno-strict-aliasing -fno-builtin -fshort-enums -Wall -Wextra -Wuninitialized -Wshadow -Wdouble-promotion -Werror -Wno-unused-parameter")
51+
set(CMAKE_COMMON_FLAGS "-g3 --specs=nano.specs -ffunction-sections -fdata-sections -fno-strict-aliasing -fno-builtin -fshort-enums -Wall -Wextra -Wuninitialized -Wmaybe-uninitialized -Wshadow -Wdouble-promotion -Werror -Wno-unused-parameter")
5252
set(CMAKE_C_FLAGS "${MCPU_FLAGS} ${VFP_FLAGS} ${CMAKE_COMMON_FLAGS}")
5353
set(CMAKE_CXX_FLAGS "${MCPU_FLAGS} ${VFP_FLAGS} ${CMAKE_COMMON_FLAGS}")
5454
set(CMAKE_ASM_FLAGS "${MCPU_FLAGS} ${VFP_FLAGS}")

shared/src/azure_iot_nx_client.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ static VOID process_writable_properties(AZURE_IOT_NX_CONTEXT* nx_context)
298298

299299
printf_packet("Receive properties: ", packet_ptr);
300300

301-
if (nx_context->property_received_cb)
301+
if (nx_context->writable_property_received_cb)
302302
{
303303
// Parse the writable properties from the writable receive message
304304
if ((status = process_properties_shared(nx_context,
@@ -307,7 +307,7 @@ static VOID process_writable_properties(AZURE_IOT_NX_CONTEXT* nx_context)
307307
NX_AZURE_IOT_HUB_CLIENT_PROPERTY_WRITABLE,
308308
properties_buffer,
309309
sizeof(properties_buffer),
310-
nx_context->property_received_cb)))
310+
nx_context->writable_property_received_cb)))
311311
{
312312
printf("Error: failed to parse properties (0x%08x)\r\n", status);
313313
}

0 commit comments

Comments
 (0)