4444//| lmk: Optional[bytes],
4545//| channel: int = 0,
4646//| interface: int = 0,
47- //| encrypt : bool = False,
47+ //| encrypted : bool = False,
4848//| ) -> None:
4949//| """Construct a new peer object.
5050//|
5151//| :param bytes mac: The mac address of the peer.
5252//| :param bytes lmk: The Local Master Key (lmk) of the peer.
5353//| :param int channel: The peer's channel. Default: 0 ie. use the current channel.
5454//| :param int interface: The WiFi interface to use. Default: 0 ie. STA.
55- //| :param bool encrypt : Whether or not to use encryption.
55+ //| :param bool encrypted : Whether or not to use encryption.
5656//| """
5757//| ...
5858STATIC mp_obj_t espnow_peer_make_new (const mp_obj_type_t * type , size_t n_args , size_t n_kw , const mp_obj_t * all_args ) {
59- enum { ARG_mac , ARG_lmk , ARG_channel , ARG_interface , ARG_encrypt };
59+ enum { ARG_mac , ARG_lmk , ARG_channel , ARG_interface , ARG_encrypted };
6060 static const mp_arg_t allowed_args [] = {
6161 { MP_QSTR_mac , MP_ARG_OBJ | MP_ARG_REQUIRED },
6262 { MP_QSTR_lmk , MP_ARG_OBJ | MP_ARG_KW_ONLY , { .u_obj = mp_const_none } },
6363 { MP_QSTR_channel , MP_ARG_INT | MP_ARG_KW_ONLY , { .u_int = 0 } },
6464 { MP_QSTR_interface ,MP_ARG_INT | MP_ARG_KW_ONLY , { .u_int = 0 } },
65- { MP_QSTR_encrypt , MP_ARG_BOOL | MP_ARG_KW_ONLY ,{ .u_bool = false } },
65+ { MP_QSTR_encrypted , MP_ARG_BOOL | MP_ARG_KW_ONLY , { .u_bool = false } },
6666 };
6767
6868 mp_arg_val_t args [MP_ARRAY_SIZE (allowed_args )];
@@ -82,7 +82,7 @@ STATIC mp_obj_t espnow_peer_make_new(const mp_obj_type_t *type, size_t n_args, s
8282
8383 self -> peer_info .ifidx = (wifi_interface_t )mp_arg_validate_int_range (args [ARG_interface ].u_int , 0 , 1 , MP_QSTR_interface );
8484
85- self -> peer_info .encrypt = args [ARG_encrypt ].u_bool ;
85+ self -> peer_info .encrypt = args [ARG_encrypted ].u_bool ;
8686
8787 const mp_obj_t lmk = args [ARG_lmk ].u_obj ;
8888 if (lmk != mp_const_none ) {
0 commit comments