@@ -138,7 +138,7 @@ enum coneval_supported_data_type {
138
138
bool agps_request_buffered ;
139
139
140
140
/* Buffered A-GPS request. */
141
- struct nrf_modem_gnss_agps_data_frame agps_request_buffer ;
141
+ struct nrf_modem_gnss_agnss_data_frame agps_request_buffer ;
142
142
143
143
/* Data module message queue. */
144
144
#define DATA_QUEUE_ENTRY_COUNT 10
@@ -704,7 +704,7 @@ static int get_modem_info(struct modem_param_info *const modem_info)
704
704
*
705
705
* @return 0 on success, otherwise a negative error code indicating reason of failure.
706
706
*/
707
- static int agps_request_encode (struct nrf_modem_gnss_agps_data_frame * incoming_request )
707
+ static int agps_request_encode (struct nrf_modem_gnss_agnss_data_frame * incoming_request )
708
708
{
709
709
int err ;
710
710
struct cloud_codec_data codec = {0 };
@@ -720,15 +720,16 @@ static int agps_request_encode(struct nrf_modem_gnss_agps_data_frame *incoming_r
720
720
const uint32_t mask = IS_ENABLED (CONFIG_NRF_CLOUD_PGPS ) ? 0u : 0xFFFFFFFFu ;
721
721
722
722
LOG_DBG ("Requesting all A-GPS elements" );
723
- cloud_agps_request .request .sv_mask_ephe = mask ,
724
- cloud_agps_request .request .sv_mask_alm = mask ,
725
723
cloud_agps_request .request .data_flags =
726
- NRF_MODEM_GNSS_AGPS_GPS_UTC_REQUEST |
727
- NRF_MODEM_GNSS_AGPS_KLOBUCHAR_REQUEST |
728
- NRF_MODEM_GNSS_AGPS_NEQUICK_REQUEST |
729
- NRF_MODEM_GNSS_AGPS_SYS_TIME_AND_SV_TOW_REQUEST |
730
- NRF_MODEM_GNSS_AGPS_POSITION_REQUEST |
731
- NRF_MODEM_GNSS_AGPS_INTEGRITY_REQUEST ;
724
+ NRF_MODEM_GNSS_AGNSS_GPS_UTC_REQUEST |
725
+ NRF_MODEM_GNSS_AGNSS_KLOBUCHAR_REQUEST |
726
+ NRF_MODEM_GNSS_AGNSS_NEQUICK_REQUEST |
727
+ NRF_MODEM_GNSS_AGNSS_GPS_SYS_TIME_AND_SV_TOW_REQUEST |
728
+ NRF_MODEM_GNSS_AGNSS_POSITION_REQUEST |
729
+ NRF_MODEM_GNSS_AGNSS_INTEGRITY_REQUEST ;
730
+ cloud_agps_request .request .system_count = 1 ;
731
+ cloud_agps_request .request .system [0 ].sv_mask_ephe = mask ;
732
+ cloud_agps_request .request .system [0 ].sv_mask_alm = mask ;
732
733
} else {
733
734
cloud_agps_request .request = * incoming_request ;
734
735
}
@@ -1060,25 +1061,17 @@ static void new_config_handle(struct cloud_data_cfg *new_config)
1060
1061
* requested by the modem. If incoming_request is NULL, all A-GPS data
1061
1062
* types are requested.
1062
1063
*/
1063
- static void agps_request_handle (struct nrf_modem_gnss_agps_data_frame * incoming_request )
1064
+ static void agps_request_handle (struct nrf_modem_gnss_agnss_data_frame * incoming_request )
1064
1065
{
1065
1066
int err ;
1066
1067
1067
1068
#if defined(CONFIG_NRF_CLOUD_AGPS )
1068
- struct nrf_modem_gnss_agps_data_frame request ;
1069
-
1070
- if (incoming_request != NULL ) {
1071
- request .sv_mask_ephe = incoming_request -> sv_mask_ephe ;
1072
- request .sv_mask_alm = incoming_request -> sv_mask_alm ;
1073
- request .data_flags = incoming_request -> data_flags ;
1074
- }
1075
-
1076
1069
#if defined(CONFIG_NRF_CLOUD_MQTT )
1077
1070
/* If CONFIG_NRF_CLOUD_MQTT is enabled, the nRF Cloud MQTT transport library will be used
1078
1071
* to send the request.
1079
1072
*/
1080
1073
err = (incoming_request == NULL ) ? nrf_cloud_agps_request_all () :
1081
- nrf_cloud_agps_request (& request );
1074
+ nrf_cloud_agps_request (incoming_request );
1082
1075
if (err ) {
1083
1076
LOG_WRN ("Failed to request A-GPS data, error: %d" , err );
1084
1077
LOG_DBG ("This is expected to fail if we are not in a connected state" );
@@ -1096,7 +1089,7 @@ static void agps_request_handle(struct nrf_modem_gnss_agps_data_frame *incoming_
1096
1089
* up and send to the cloud that is currently used.
1097
1090
*/
1098
1091
err = (incoming_request == NULL ) ? agps_request_encode (NULL ) :
1099
- agps_request_encode (& request );
1092
+ agps_request_encode (incoming_request );
1100
1093
if (err ) {
1101
1094
LOG_WRN ("Failed to request A-GPS data, error: %d" , err );
1102
1095
} else {
0 commit comments