You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2020/03/13 12:11:55 UTC

[GitHub] [mynewt-nimble] apache-mynewt-bot removed a comment on issue #771: Added advertiser to apps

apache-mynewt-bot removed a comment on issue #771: Added advertiser to apps
URL: https://github.com/apache/mynewt-nimble/pull/771#issuecomment-598687658
 
 
   
   <!-- style-bot -->
   
   ## Style check summary
   
   ### Our coding style is [here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
   #### apps/beacon/src/main.c
   <details>
   
   ```diff
   @@ -33,12 +33,12 @@
    
    static const char *device_name = "Apache Mynewt";
    
   -static void 
   +static void
    ble_app_set_addr(void)
    {
        int rc;
        ble_addr_t addr;
   -    
   +
        /* generate new non-resolvable private address */
        rc = ble_hs_id_gen_rnd(1, &addr);
        assert(rc == 0);
   @@ -76,7 +76,7 @@
        /* set adv parameters */
        memset(&adv_params, 0, sizeof(adv_params));
        adv_params.conn_mode = BLE_GAP_CONN_MODE_NON;
   -    adv_params.disc_mode =  BLE_GAP_DISC_MODE_GEN;
   +    adv_params.disc_mode = BLE_GAP_DISC_MODE_GEN;
    
        memset(&fields, 0, sizeof(fields));
    
   @@ -87,25 +87,25 @@
        fields.name = (uint8_t *)device_name;
        fields.name_len = strlen(device_name);
        fields.name_is_complete = 1;
   -    
   +
        rc = ble_gap_adv_set_fields(&fields);
        assert(rc == 0);
   -    
   +
        MODLOG_DFLT(INFO,"Starting advertising...\n");
    
        /* As own address type we use hard-coded value, because we generate
   -    NRPA and by definition it's random */
   +       NRPA and by definition it's random */
        rc = ble_gap_adv_start(BLE_OWN_ADDR_RANDOM, NULL, 10000,
                               &adv_params,adv_event, NULL);
        assert(rc == 0);
    }
    
   -static void 
   +static void
    on_sync(void)
    {
        ble_app_set_addr();
    
   -   /* begin advertising */
   +    /* begin advertising */
        advertise();
    }
    
   @@ -115,7 +115,8 @@
        console_printf("Resetting state; reason=%d\n", reason);
    }
    
   -int main(int argc, char **argv)
   +int
   +main(int argc, char **argv)
    {
        int rc;
    
   ```
   
   </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:
users@infra.apache.org


With regards,
Apache Git Services