Skip to content
This repository was archived by the owner on Jul 9, 2024. It is now read-only.

Commit 1a8a63f

Browse files
author
GitHub Actions
committed
1 parent b40755d commit 1a8a63f

10 files changed

Lines changed: 1572 additions & 5 deletions

File tree

README.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ The application supports the following data types:
7676
| Battery | Voltage | APP_DATA_BATTERY |
7777
+---------------+----------------------------+-----------------------------------------------+
7878

79-
The sets of sensor data that are published to the cloud service consist of relative timestamps that originate from the time of sampling.
79+
The sets of sensor data that are published to the cloud service consist of relative `timestamps <Timestamping_>`_ that originate from the time of sampling.
8080

8181
Device modes
8282
============
@@ -293,8 +293,8 @@ Optional library configurations
293293
You can add the following *optional* configurations to configure the heap or to provide additional information such as APN to the modem for registering with an LTE network:
294294

295295
* :option:`CONFIG_HEAP_MEM_POOL_SIZE` - Configures the size of the heap that is used by the application when encoding and sending data to the cloud. More information can be found in :ref:`memory_allocation`.
296-
* :option:`CONFIG_LTE_PDP_CMD` - Used for manual configuration of the APN. Set the option to ``y`` to enable PDP define using ``AT+CGDCONT``.
297-
* :option:`CONFIG_LTE_PDP_CONTEXT` - Used for manual configuration of the APN. An example is ``0,\"IP\",\"apn.example.com\"``.
296+
* :option:`CONFIG_PDN_DEFAULTS_OVERRIDE` - Used for manual configuration of the APN. Set the option to ``y`` to override the default PDP context configuration.
297+
* :option:`CONFIG_PDN_DEFAULT_APN` - Used for manual configuration of the APN. An example is ``apn.example.com``.
298298

299299
Configuration files
300300
===================

overlay-low-power.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ CONFIG_LED_CONTROL=n
1717
CONFIG_UART_CONSOLE=n
1818

1919
# Disable event logging.
20-
CONFIG_DESKTOP_EVENT_MANAGER_SHOW_EVENTS=n
20+
CONFIG_EVENT_MANAGER_SHOW_EVENTS=n

prj.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ CONFIG_WATCHDOG_APPLICATION=y
125125
# Event Manager
126126
CONFIG_EVENT_MANAGER=y
127127
CONFIG_LINKER_ORPHAN_SECTION_PLACE=y
128-
CONFIG_DESKTOP_EVENT_MANAGER_LOG_EVENT_TYPE=n
128+
CONFIG_EVENT_MANAGER_LOG_EVENT_TYPE=n
129129

130130
# cJSON - Used in AWS FOTA and cloud data traffic encoding.
131131
CONFIG_CJSON_LIB=y

tests/json_common/CMakeLists.txt

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#
2+
# Copyright (c) 2021 Nordic Semiconductor ASA
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
7+
cmake_minimum_required(VERSION 3.13.1)
8+
9+
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
10+
project(json_common_test)
11+
12+
FILE(GLOB app_sources src/*.c)
13+
target_sources(app PRIVATE ${app_sources})
14+
15+
target_include_directories(app PRIVATE
16+
${CMAKE_CURRENT_SOURCE_DIR} ../../src/cloud/cloud_codec/)
17+
18+
target_sources(app PRIVATE
19+
${CMAKE_CURRENT_SOURCE_DIR} mock/date_time_mock.c
20+
${CMAKE_CURRENT_SOURCE_DIR} ../../src/cloud/cloud_codec/json_common.c
21+
${CMAKE_CURRENT_SOURCE_DIR} ../../src/cloud/cloud_codec/json_helpers.c)
22+
23+
target_compile_options(app PRIVATE
24+
-DCONFIG_CLOUD_CODEC_LOG_LEVEL=0
25+
-DCONFIG_ASSET_TRACKER_V2_APP_VERSION_MAX_LEN=20)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/*
2+
* Copyright (c) 2021 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
#include <zephyr.h>
8+
9+
#include "date_time.h"
10+
11+
/* Mocking function that always converts the input uptime to a known timestamp. */
12+
int date_time_uptime_to_unix_time_ms(int64_t *uptime)
13+
{
14+
*uptime = 1563968747123;
15+
16+
return 0;
17+
}

tests/json_common/prj.conf

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#
2+
# Copyright (c) 2021 Nordic Semiconductor ASA
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
7+
# ZTEST
8+
CONFIG_ZTEST=y
9+
CONFIG_ZTEST_STACKSIZE=4096
10+
11+
# cJSON
12+
CONFIG_CJSON_LIB=y
13+
14+
# General
15+
CONFIG_HEAP_MEM_POOL_SIZE=10240
16+
CONFIG_NEWLIB_LIBC=y
17+
CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#
2+
# Copyright (c) 2021 Nordic Semiconductor ASA
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
7+
# ZTEST
8+
CONFIG_ZTEST=y
9+
10+
# cJSON
11+
CONFIG_CJSON_LIB=y
12+
13+
# General
14+
CONFIG_HEAP_MEM_POOL_SIZE=10240

0 commit comments

Comments
 (0)