Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net: lib: nrf_cloud: add missing AIR_QUAL handler to shadow encoder #11914

Merged
merged 1 commit into from
Aug 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -574,9 +574,13 @@ Libraries for networking
* Updated:

* Moved JSON manipulation from :file:`nrf_cloud_fota.c` to :file:`nrf_cloud_codec_internal.c`.
* Fixed a build issue that occurred when MQTT and P-GPS are enabled and A-GPS is disabled.
* :c:func:`nrf_cloud_obj_location_request_create` to use the new function :c:func:`nrf_cloud_obj_location_request_payload_add`.

* Fixed:

* A build issue that occurred when MQTT and P-GPS are enabled and A-GPS is disabled.
* A bug preventing ``AIR_QUAL`` from being enabled in shadow UI service info.

* Removed:

* Unused internal codec function ``nrf_cloud_format_single_cell_pos_req_json()``.
Expand Down
4 changes: 2 additions & 2 deletions include/net/nrf_cloud.h
Original file line number Diff line number Diff line change
Expand Up @@ -448,10 +448,10 @@ struct nrf_cloud_svc_info_ui {
uint8_t log:1;
/** Dictionary (binary) Logs */
uint8_t dictionary_log:1;

/* Items without UI support on nRF Cloud */
/** Air Quality */
uint8_t air_quality:1;

/* Items without UI support on nRF Cloud */
/** Light sensor */
uint8_t light_sensor:1;
/** Button */
Expand Down
5 changes: 5 additions & 0 deletions subsys/net/lib/nrf_cloud/src/nrf_cloud_codec_internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -1122,6 +1122,11 @@ static int nrf_cloud_encode_service_info_ui(const struct nrf_cloud_svc_info_ui *
cJSON_CreateString(sensor_type_str[NRF_CLOUD_SENSOR_AIR_PRESS]));
++item_cnt;
}
if (ui->air_quality) {
cJSON_AddItemToArray(array,
cJSON_CreateString(sensor_type_str[NRF_CLOUD_SENSOR_AIR_QUAL]));
++item_cnt;
}
if (ui->gnss) {
cJSON_AddItemToArray(array,
cJSON_CreateString(sensor_type_str[NRF_CLOUD_SENSOR_GNSS]));
Expand Down
Loading