Closed jalinei closed 3 months ago
I have created a function to do this. You can find it here :
https://gitlab.laas.fr/lflavado/core/-/tree/power_test_boot?ref_type=heads
In the DataAPI.h
you will find:
/**
* @brief Use this function to write the gain and offset parameters of the board to is non-volatile memory.
*
* @note This function should be called after updating the parameters using setParameters.
*
* @param channel Name of the shield channel to save the values.
*/
int8_t saveParametersInNVS(channel_t channel);
/**
* @brief Use this function to read the gain and offset parameters of the board to is non-volatile memory.
*
* @param channel Name of the shield channel to save the values.
*/
int8_t getParametersFromNVS(channel_t channel);
This commit allows finding the update for saving to the NVS: 83a65477246b7cc5ae312cc55c7f6b0efd0a14e7
This commit allows finding the update for getting from the NVS: b165b83342cf8b4da5877b838317eb0ad40a716e
This is only implemented for the TWIST board, but it is not difficult to generalize from here if needed.
I propose the following :
Sounds good to me. I can prepare a PR.
Dual problem in the existing Data API:
data.setTwistChannelsUserCalibrationFactors()
for a generic data acquisition using SPIN.We need to add a function in data API to store permanently the parameters (defined through setParameters) in the NVS. It has to be implemented both for twist and for SPIN.
We may also adapt interaction based function to SPIN as it is a nice feature to tweak parameters on the fly.