Update: Formatting

This commit is contained in:
Sjur G. Wroldsen
2022-04-20 09:16:05 +02:00
parent 15ed885035
commit be3d2ece55
2 changed files with 6 additions and 6 deletions

View File

@ -281,7 +281,7 @@ extern "C" esp_err_t esp_modem_set_operator(esp_modem_dce_t *dce_wrap, int mode,
if (dce_wrap == nullptr || dce_wrap->dce == nullptr) {
return ESP_ERR_INVALID_ARG;
}
std::string operator_str = std::string(oper);
std::string operator_str(oper);
return command_response_to_esp_err(dce_wrap->dce->set_operator(mode, format, operator_str));
}
@ -348,7 +348,7 @@ extern "C" esp_err_t esp_modem_set_network_bands(esp_modem_dce_t *dce_wrap, cons
if (dce_wrap == nullptr || dce_wrap->dce == nullptr) {
return ESP_ERR_INVALID_ARG;
}
std::string mode_str = std::string(mode);
std::string mode_str(mode);
return command_response_to_esp_err(dce_wrap->dce->set_network_bands(mode, bands, size));
}

View File

@ -482,7 +482,7 @@ command_result set_network_bands(CommandableIf *t, const std::string& mode, cons
{
ESP_LOGV(TAG, "%s", __func__ );
std::string band_string = "";
for (int i = 0; i<size-1; i++){
for (int i = 0; i<size-1; ++i){
band_string += std::to_string(bands[i]) + ",";
}
band_string += std::to_string(bands[size-1]);
@ -493,7 +493,7 @@ command_result set_network_bands(CommandableIf *t, const std::string& mode, cons
command_result set_network_bands_sim76xx(CommandableIf *t, const std::string& mode, const int* bands, int size)
{
ESP_LOGV(TAG, "%s", __func__ );
std::string any_mode = "0xFFFFFFFF7FFFFFFF";
//std::string any_mode = "0xFFFFFFFF7FFFFFFF";
uint64_t band_bits = 0;
for (int i = 0; i<size; ++i) {
// OR-operation to add bands
@ -501,8 +501,8 @@ command_result set_network_bands_sim76xx(CommandableIf *t, const std::string& mo
}
std::stringstream stream;
stream << "0x" << std::setfill('0') << std::setw(16) << std::hex << band_bits;
std::string band_string = stream.str();
return generic_command_common(t, "AT+CNBP=" + any_mode + "," + band_string + "\r");
std::string band_string(stream.str());
return generic_command_common(t, "AT+CNBP=" + mode + "," + band_string + "\r");
}
command_result get_network_system_mode(CommandableIf *t, int &mode)