Use NRF52840 and SDK_17.1.0.
Input:
memcpy(gps_location.la,"12.345",6);
memcpy(gps_location.lo,"678.345",7);
void test_json() { wifi_scan.index = 0; memcpy(gps_location.la,"12.345",6); memcpy(gps_location.lo,"678.345",7); memcpy(ap_info[wifi_scan.index].mac,"12:34:56:78:90:ab",17); memcpy(ap_info[wifi_scan.index].rssi,"-99",3); wifi_scan.index++; memcpy(ap_info[wifi_scan.index].mac,"ff:ff:ff:ff:ff:ff",17); memcpy(ap_info[wifi_scan.index].rssi,"-9",2); wifi_scan.index++; memcpy(lte_msg.cid,"123456",6); memcpy(lte_msg.lac,"abcdef",6); }
Output:
"la": 12.345000256,
"lo": 678.344970688,
This is code: