8000 formatting · pycom/pycom-micropython-sigfox@1df6dbf · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Sep 16, 2024. It is now read-only.

Commit 1df6dbf

Browse files
committed
formatting
1 parent 006011c commit 1df6dbf

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

esp32/mods/modlte.c

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1251,31 +1251,29 @@ STATIC mp_obj_t lte_send_at_cmd(mp_uint_t n_args, const mp_obj_t *pos_args, mp_m
12511251
{
12521252
size_t len;
12531253
char* command = (char *)(mp_obj_str_get_data(args[0].u_obj, &len));
1254-
1254+
12551255
if(argLength > 1) {
12561256
timeout = args[1].u_int;
12571257
}
12581258

1259-
if(len <= LTE_AT_CMD_DATA_SIZE_MAX)
1260-
lte_push_at_command_ext_cont(command, timeout, NULL, len, false);
1261-
else {
1259+
if(len <= LTE_AT_CMD_DATA_SIZE_MAX) {
1260+
lte_push_at_command_ext_cont(command, timeout, NULL, len, false);
1261+
} else {
12621262
size_t chunk_count = len / LTE_AT_CMD_DATA_SIZE_MAX;
12631263
size_t remaining_bytes = len % LTE_AT_CMD_DATA_SIZE_MAX;
12641264

12651265
bool expect_continuation = false;
12661266
char* chunk_start = command;
1267-
for(size_t i=0; i<chunk_count; ++i) {
1267+
for(size_t i = 0; i < chunk_count; ++i) {
12681268
expect_continuation = (i < (chunk_count - 1)) || remaining_bytes;
1269-
12701269
lte_push_at_command_ext_cont(chunk_start, timeout, NULL, LTE_AT_CMD_DATA_SIZE_MAX, expect_continuation);
1271-
12721270
chunk_start += LTE_AT_CMD_DATA_SIZE_MAX;
12731271
}
12741272

12751273
if(remaining_bytes) {
12761274
lte_push_at_command_ext_cont(chunk_start, timeout, NULL, remaining_bytes, false);
12771275
}
1278-
}
1276+
}
12791277
}
12801278
else
12811279
{

0 commit comments

Comments
 (0)
0