apache-mynewt-bot commented on pull request #838:
URL: https://github.com/apache/mynewt-nimble/pull/838#issuecomment-701354218


   
   <!-- style-bot -->
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
   #### apps/privacy_cent/src/main.c
   <details>
   
   ```diff
   @@ -82,7 +82,7 @@
    
        switch (event->type) {
        case BLE_GAP_EVENT_CONNECT:
   -        if (!reconnection){
   +        if (!reconnection) {
                if (event->connect.status == 0) {
                    MODLOG_DFLT(INFO,"Connection was established\n");
                    MODLOG_DFLT(INFO,"Role: ");
   @@ -164,8 +164,8 @@
                MODLOG_DFLT(INFO, " received data: %u\n",
                            &(event->disc.data));
                /* Thi block of code executes if user chose to connect. 
Predefined
   -            UUID is compared to recieved one; if doesn't fit - end 
procedure and
   -            go back to scanning, else - connect. */
   +               UUID is compared to recieved one; if doesn't fit - end 
procedure and
   +               go back to scanning, else - connect. */
                uuid_cmp_result = ble_uuid_cmp(&predef_uuid.u,
                                               &parsed_fields.uuids128->u);
    
   @@ -174,9 +174,9 @@
                } else {
                    MODLOG_DFLT(INFO, "UUID fits, connecting...\n");
                    ble_gap_disc_cancel();
   -                    ble_gap_connect(own_addr_type, &(event->disc.addr), 
1000,
   +                ble_gap_connect(own_addr_type, &(event->disc.addr), 1000,
                                    NULL, gap_event, NULL);
   -                }
   +            }
            } else {
                ble_gap_disc_cancel();
                rc = ble_gap_connect(own_addr_type,
   @@ -210,7 +210,7 @@
        MODLOG_DFLT(INFO, "RPA expired, reconnecting to peer\n");
    
        const struct ble_gap_disc_params scan_params = {
   -        .itvl =10000, .window = 2000, .filter_policy = 1,
   +        .itvl = 10000, .window = 2000, .filter_policy = 1,
            .limited = 0, .passive = 1, .filter_duplicates = 1
        };
        ble_gap_disc(own_addr_type, 1000, &scan_params,
   @@ -224,7 +224,7 @@
    
        /* set scan parameters */
        const struct ble_gap_disc_params scan_params = {
   -        .itvl =10000, .window = 2000, .filter_policy = 0,
   +        .itvl = 10000, .window = 2000, .filter_policy = 0,
            .limited = 0, .passive = 1, .filter_duplicates = 1
        };
        /* performs discovery procedure */
   ```
   
   </details>
   
   #### apps/privacy_periph/src/main.c
   <details>
   
   ```diff
   @@ -72,14 +72,14 @@
            break;
        case BLE_GAP_EVENT_CONNECT:
            if (event->connect.status == 0) {
   -                ble_gap_conn_find(event->connect.conn_handle, &conn_desc);
   -                MODLOG_DFLT(INFO,"Connection was established\n");
   -                MODLOG_DFLT(INFO,"Role: ");
   -                if (conn_desc.role == 0) {
   -                    MODLOG_DFLT(INFO,"master\n");
   -                } else {
   -                    MODLOG_DFLT(INFO,"slave\n");
   -                }
   +            ble_gap_conn_find(event->connect.conn_handle, &conn_desc);
   +            MODLOG_DFLT(INFO,"Connection was established\n");
   +            MODLOG_DFLT(INFO,"Role: ");
   +            if (conn_desc.role == 0) {
   +                MODLOG_DFLT(INFO,"master\n");
   +            } else {
   +                MODLOG_DFLT(INFO,"slave\n");
   +            }
            } else if (event->connect.status == BLE_ERR_ACL_CONN_EXISTS) {
                MODLOG_DFLT(INFO, "Connection already exists\n");
                break;
   ```
   
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to