looking at https://github.com/nrfconnect/sdk-nrf/tree/main/lib/location
specifically https://github.com/nrfconnect/sdk-nrf/blob/main/lib/location/cloud_service/cloud_service.c
i think it would be useful to be able change void cloud_service_init(void) to accept a custom function
- if null: behaves as before
- if not null: function is used instead of cloud_service_nrf_pos_get(params, recv_buf, sizeof(recv_buf), location) / cloud_service_here_rest_pos_get(params, recv_buf, sizeof(recv_buf), location)
and / or code could be optimized with a #if defined(CONFIG_LOCATION_SERVICE_CUSTOM)
that then needs changes to
https://github.com/nrfconnect/sdk-nrf/blob/main/lib/location/method_cloud_location.c int method_cloud_location_init(void)
and to
setup in https://github.com/nrfconnect/sdk-nrf/blob/main/lib/location/location_core.c
#if defined(CONFIG_LOCATION_METHOD_CELLULAR) || defined(CONFIG_LOCATION_METHOD_WIFI)
/**
* Configuration for cloud location method, that is, combined Wi-Fi and cellular location method.
* This is an internal method to handle combining sending of ncellmeas and Wi-Fi scan results
* into a single cloud request. This method cannot be chosen in the library API.
*/
static const struct location_method_api method_cloud_location_api = {
.method = LOCATION_METHOD_WIFI_CELLULAR,
.method_string = "Wi-Fi + Cellular",
.init = method_cloud_location_init,
.location_get = method_cloud_location_get,
...
my question is if nordic sees the use for that and is willing to introduce the changes anytime soon?
background:
this change would allow the easy reuse of code even for a case where no real location return value is expected (~ custom cloud knows the location)
for that case also some signaling for "no_location_return_value_contained_but_thats_ok" could be good