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/20 12:03:47 UTC

[GitHub] [mynewt-nimble] apache-mynewt-bot commented on issue #778: apps: scanner added

apache-mynewt-bot commented on issue #778: apps: scanner added
URL: https://github.com/apache/mynewt-nimble/pull/778#issuecomment-601665874
 
 
   
   <!-- style-bot -->
   
   ## Style check summary
   
   ### Our coding style is [here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
   #### apps/scanner/src/main.c
   <details>
   
   ```diff
   @@ -28,7 +28,7 @@
    /* scan_event() calls scan(), so forward declaration is required */
    static void scan();
    
   -static void 
   +static void
    ble_app_set_addr(void)
    {
        ble_addr_t addr;
   @@ -46,8 +46,8 @@
    static int
    scan_event(struct ble_gap_event *event, void *arg)
    {
   -    switch (event->type){
   -    /* advertising report has been received during discovery procedure */   
   +    switch (event->type) {
   +    /* advertising report has been received during discovery procedure */
        case BLE_GAP_EVENT_DISC:
            MODLOG_DFLT(INFO, "Advertising report was received! Contents:\n");
            MODLOG_DFLT(INFO, " event type: %u\n",event->disc.event_type);
   @@ -78,16 +78,16 @@
        /* set scan parameters */
        const struct ble_gap_disc_params scan_params = {500, 16, 0, 0, 1, 0};
        /* performs discovery procedure; value of own_addr_type is hard-coded,
   -    because NRPA is used */
   +       because NRPA is used */
        ble_gap_disc(BLE_OWN_ADDR_RANDOM, 1000, &scan_params,scan_event, NULL);
    }
    
   -static void 
   +static void
    on_sync(void)
    {
        /* Generate a non-resolvable private address. */
        ble_app_set_addr();
   -    
   +
        /* begin scanning */
        scan();
    }
   @@ -98,7 +98,8 @@
        console_printf("Resetting state; reason=%d\n", reason);
    }
    
   -int main(int argc, char **argv)
   +int
   +main(int argc, char **argv)
    {
        /* Initialize all packages. */
        sysinit();
   ```
   
   </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