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/12/10 14:20:04 UTC

[GitHub] [mynewt-core] apache-mynewt-bot removed a comment on pull request #2433: remove OS_TICKS_PER_SEC from syscfg when not needed

apache-mynewt-bot removed a comment on pull request #2433:
URL: https://github.com/apache/mynewt-core/pull/2433#issuecomment-742449475


   
   <!-- style-bot -->
   
   ## Style check summary
   
   ### Our coding style is [here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
   #### hw/util/button/src/button.c
   <details>
   
   ```diff
   @@ -361,13 +368,13 @@
    #endif
        }
    
   - do_assert:
   +do_assert:
        assert(0);
   -    
   - do_nothing:
   -    return;
   -    
   - do_pressed:
   +
   +do_nothing:
   +    return;
   +
   +do_pressed:
    #if MYNEWT_VAL(BUTTON_USE_LONG)
        if (button->mode & BUTTON_FLG_LONG) {
            os_callout_reset(callout, MYNEWT_VAL(BUTTON_LONGHOLD_TIME_MS) * OS_TICKS_PER_SEC / 1000);
   @@ -388,14 +395,14 @@
    #endif
        button->fsm_state = _BUTTON_FSM_PRESSED;
        return;
   -    
   +
    #if MYNEWT_VAL(BUTTON_USE_DOUBLE)
   - to_wait_dblpressed:
   +    to_wait_dblpressed :
        os_callout_reset(callout, MYNEWT_VAL(BUTTON_DBLCLICK_TIMEOUT_MS) * OS_TICKS_PER_SEC / 1000);
        button->fsm_state = _BUTTON_FSM_WAIT_DBLPRESSED;
        return;
   -    
   - do_dblpressed:
   +
   +do_dblpressed:
    #if MYNEWT_VAL(BUTTON_USE_LONG)
        if (button->mode & BUTTON_FLG_LONG) {
            os_callout_reset(callout, MYNEWT_VAL(BUTTON_LONGHOLD_TIME_MS) * OS_TICKS_PER_SEC / 1000);
   @@ -405,7 +412,7 @@
    #endif
        } else {
            os_callout_stop(callout);
   -    }   
   +    }
    #elif MYNEWT_VAL(BUTTON_USE_REPEAT)
        os_callout_reset(callout, MYNEWT_VAL(BUTTON_REPEAT_FIRST_TIME_MS) * OS_TICKS_PER_SEC / 1000);
    #else
   @@ -420,10 +427,11 @@
    #endif
    
    #if MYNEWT_VAL(BUTTON_USE_LONG)
   - do_longpress:
   -#if MYNEWT_VAL(BUTTON_USE_REPEAT)
   -    if (button->mode & BUTTON_FLG_REPEATING)
   +    do_longpress :
   +#if MYNEWT_VAL(BUTTON_USE_REPEAT)
   +    if (button->mode & BUTTON_FLG_REPEATING) {
            os_callout_reset(callout, MYNEWT_VAL(BUTTON_REPEAT_FIRST_TIME_MS) * OS_TICKS_PER_SEC / 1000);
   +    }
    #endif
        button->state |= BUTTON_FLG_LONG;
    #if MYNEWT_VAL(BUTTON_EMIT_STATE_CHANGED)
   @@ -432,18 +440,18 @@
        button->fsm_state = _BUTTON_FSM_HOLD_OR_REPEAT;
        return;
    #endif
   -    
   -#if MYNEWT_VAL(BUTTON_USE_REPEAT)
   - do_repeat:
   +
   +#if MYNEWT_VAL(BUTTON_USE_REPEAT)
   +    do_repeat :
        os_callout_reset(callout, MYNEWT_VAL(BUTTON_REPEAT_TIME_MS) * OS_TICKS_PER_SEC / 1000);
   -    
   +
    #if MYNEWT_VAL(BUTTON_EMIT_ACTION)
    #if MYNEWT_VAL(BUTTON_USE_EMULATION)
        if (!button_stealed_action(button))
    #endif
   -        BUTTON_POST_ACTION_EVENT(button, button->state);
   -#endif
   -    
   +    BUTTON_POST_ACTION_EVENT(button, button->state);
   +#endif
   +
        if (!(button->state & BUTTON_FLG_REPEATING)) {
            button->state |= BUTTON_FLG_REPEATING;
    #if MYNEWT_VAL(BUTTON_EMIT_STATE_CHANGED)
   ```
   
   </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