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 2019/02/27 14:42:38 UTC

[GitHub] andrzej-kaczmarek opened a new pull request #273: Allow to specify setting value range

andrzej-kaczmarek opened a new pull request #273: Allow to specify setting value range
URL: https://github.com/apache/mynewt-newt/pull/273
 
 
   This allows to specify allowed range for numeric syscfg values in a simple way instead of requiring complex expressions. It allows for any combinations of discrete values and value ranges to be used in single restriction.
   
   `range` value is comma-separated list of ranges and discrete values which is then converted to proper expression and evaluated, for example:
   ```
       range: 1,2,4,8
       range: 0,10-15
       range: 5-10,15-20,99
   ```
   Also it is possible to reference other settings:
   ````
       BLE_LL_MAX_PKT_SIZE:
           value: '251'
           range: 27-251
       BLE_LL_SUPP_MAX_RX_BYTES:
           value: 'MYNEWT_VAL(BLE_LL_MAX_PKT_SIZE)'
           range: 27-BLE_LL_MAX_PKT_SIZE
       BLE_LL_SUPP_MAX_TX_BYTES:
           value: 'MYNEWT_VAL(BLE_LL_MAX_PKT_SIZE)'
           range: 27-BLE_LL_MAX_PKT_SIZE
       BLE_LL_CONN_INIT_MAX_TX_BYTES:
           value: '27'
           range: 27-BLE_LL_SUPP_MAX_TX_BYTES
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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