src/orientation_sensor.cpp
bool AttitudeValues::set_configuration(const JsonObject& config) {
  String expected[] = {"report_interval", "save_mag_cal"};
  for (auto str : expected) {
    if (!config.containsKey(str)) {
      return false;
    }
  }
  report_interval_ms_ = config["report_interval"];
  save_mag_cal_ = config["save_mag_cal"];
  return true;
}
/**
 * @brief Use the values stored in JSON object config to update
 * the appropriate member variables.
 *
 * @param config JSON object containing the configuration parameters
 * to be updated.
 * @return True if successful; False if a parameter could not be found.
 */
@brief Use the values stored in JSON object config to update
the appropriate member variables.

@param config JSON object containing the configuration parameters
to be updated.
@return True if successful; False if a parameter could not be found.
@brief Use the values stored in JSON object config to update the appropriate member variables . @param config JSON object containing the configuration parameters to be updated . @return True if successful ; False if a parameter could not be found .
bool AttitudeValues::set_configuration(const JsonObject& config) {
  String expected[] = {"report_interval", "save_mag_cal"};
  for (auto str : expected) {
    if (!config.containsKey(str)) {
      return false;
    }
  }
  report_interval_ms_ = config["report_interval"];
  save_mag_cal_ = config["save_mag_cal"];
  return true;
}
bool AttitudeValues :: set_configuration ( const JsonObject & config ) { String expected [ ] = { " " , " " } ; for ( auto str : expected ) { if ( ! config . containsKey ( str ) ) { return false ; } } report_interval_ms_ = config [ " " ] ; save_mag_cal_ = config [ " " ] ; return true ; }
@brief Use the values stored in JSON object config to update
 the appropriate member variables.
@brief Use the values stored in JSON object config to update the appropriate member variables .