@@ -1231,7 +1231,7 @@ STATIC mp_obj_t lte_send_at_cmd(mp_uint_t n_args, const mp_obj_t *pos_args, mp_m
1231
1231
lte_check_inppp ();
1232
1232
STATIC const mp_arg_t allowed_args [] = {
1233
1233
{ MP_QSTR_cmd , MP_ARG_OBJ , {.u_obj = mp_const_none } },
1234
- { MP_QSTR_timeout , MP_ARG_KW_ONLY | MP_ARG_INT , {.u_obj = mp_const_none } },
1234
+ { MP_QSTR_timeout , MP_ARG_KW_ONLY | MP_ARG_INT , {.u_int = LTE_RX_TIMEOUT_MAX_MS } },
1235
1235
};
1236
1236
// parse args
1237
1237
mp_arg_val_t args [MP_ARRAY_SIZE (allowed_args )];
@@ -1242,7 +1242,7 @@ STATIC mp_obj_t lte_send_at_cmd(mp_uint_t n_args, const mp_obj_t *pos_args, mp_m
1242
1242
if (MP_OBJ_IS_STR_OR_BYTES (args [0 ].u_obj ))
1243
1243
{
1244
1244
size_t len ;
1245
- lte_push_at_command_ext ((char * )(mp_obj_str_get_data (args [0 ].u_obj , & len )), args [1 ].u_obj == mp_const_none ? LTE_RX_TIMEOUT_MAX_MS : args [ 1 ]. u_int , NULL , len );
1245
+ lte_push_at_command_ext ((char * )(mp_obj_str_get_data (args [0 ].u_obj , & len )), args [1 ].u_int , NULL , len );
1246
1246
}
1247
1247
else
1248
1248
{
@@ -1254,7 +1254,7 @@ STATIC mp_obj_t lte_send_at_cmd(mp_uint_t n_args, const mp_obj_t *pos_args, mp_m
1254
1254
vstr_add_str (& vstr , modlte_rsp .data );
1255
1255
while (modlte_rsp .data_remaining )
1256
1256
{
1257
- lte_push_at_command_ext ("Pycom_Dummy" , args [1 ].u_obj == mp_const_none ? LTE_RX_TIMEOUT_MAX_MS : args [ 1 ]. u_int , NULL , strlen ("Pycom_Dummy" ) );
1257
+ lte_push_at_command_ext ("Pycom_Dummy" , args [1 ].u_int , NULL , strlen ("Pycom_Dummy" ) );
1258
1258
vstr_add_str (& vstr , modlte_rsp .data );
1259
1259
}
1260
1260
return mp_obj_new_str_from_vstr (& mp_type_str , & vstr );
0 commit comments