-
Notifications
You must be signed in to change notification settings - Fork 76
runtime configuration not compile-time #145
Comments
I took this from pull request "add tunables 152". Use static variables initialized to DEFINEs then superseded by UICR values. This would still make tuning MUCH easier by using nrfjprog or j-link then by recompiling. ToDo: For example:
|
This approach is a bit too specific to RuuviTag in my opinion. It would be difficult to extend to other boards or other sensors, and on the other hand programming UICR requires special equipment and time to figure out the proper configuration options and verify firmware operation. Supporting these options would require a lot of infrastructure support, such as configuration page where user can select their desired operation in an intuitive manner and get the required bytes and commands to write them. I think this is better to implement on 3.x firmware at a later time, as the 3.x has been architected to support various sensors, boards and runtime configuration. |
The basic concept is to initialize variables to compile time values from default VALUES and permit subsequent user configuration (without compile) which does not require special equipment but does require an app (mobile or desktop) permitting validation an avoiding invalid or poor choices. UICR is after all named "User Information Configuration Registers" But you know about future plans. Although all the tunables "I" could think of for RuuviTags only take up 8 of the 32 words available. Thanks for you thoughts. |
Various values including format selection, advertising_interval, main_loop_interval, ble_tx_power should be configurable at run-time (i.e. not by compile time variables which should only define the defaults). This will allow users without the knowledge or ability to set up the tool chain to adjust the configuration.
This might easiest be done by GATT services defined in ble_services folder initialization,Nordic UART Service.
Once this is set up users could use nRFConnect(Either android or IOS) to select a ruuvi; connect, see "Services", select a service (like Experimental Buttonless DFU Service) and see Characteristics , select it and a up arrow icon is displayed. Click on it a dialog box prompting to "Write value" in either a Byte Array or Text .
The text was updated successfully, but these errors were encountered: