      0.0f, 0.0f, 1.0f, 0.0f,
      0.0f, 0.0f, 0.0f, 1.0f,
    }};
  
    read_param_float(&s->speed_lim_off, "SpeedLimitOffset");
    read_param_bool(&s->is_metric, "IsMetric");
    read_param_bool(&s->longitudinal_control, "LongitudinalControl");
    read_param_bool(&s->limit_set_speed, "LimitSetSpeed");
  
    // Set offsets so params don't get read at the same time
    s->longitudinal_control_timeout = UI_FREQ / 3;
    s->is_metric_timeout = UI_FREQ / 2;
    s->limit_set_speed_timeout = UI_FREQ;
 
</s> remove   int result = read_param_float(&brightness_b, "BRIGHTNESS_B", true);
  result += read_param_float(&brightness_m, "BRIGHTNESS_M", true);
 </s> add   int result = read_param(&brightness_b, "BRIGHTNESS_B", true);
  result += read_param(&brightness_m, "BRIGHTNESS_M", true); </s> remove     read_param_bool_timeout(&s->is_metric, "IsMetric", &s->is_metric_timeout);
    read_param_bool_timeout(&s->longitudinal_control, "LongitudinalControl", &s->longitudinal_control_timeout);
    read_param_bool_timeout(&s->limit_set_speed, "LimitSetSpeed", &s->limit_set_speed_timeout);
    read_param_float_timeout(&s->speed_lim_off, "SpeedLimitOffset", &s->limit_set_speed_timeout);
    int param_read = read_param_uint64_timeout(&s->last_athena_ping, "LastAthenaPingTime", &s->last_athena_ping_timeout);
 </s> add     read_param_timeout(&s->is_metric, "IsMetric", &s->is_metric_timeout);
    read_param_timeout(&s->longitudinal_control, "LongitudinalControl", &s->longitudinal_control_timeout);
    read_param_timeout(&s->limit_set_speed, "LimitSetSpeed", &s->limit_set_speed_timeout);
    read_param_timeout(&s->speed_lim_off, "SpeedLimitOffset", &s->limit_set_speed_timeout);
    int param_read = read_param_timeout(&s->last_athena_ping, "LastAthenaPingTime", &s->last_athena_ping_timeout); </s> remove }

static int read_param_uint64_timeout(uint64_t* dest, const char* param_name, int* timeout, bool persistent_param = false) {
  if (*timeout > 0){
    (*timeout)--;
    return -1;
  } else {
    *timeout = 2 * UI_FREQ; // 0.5Hz
    return read_param_uint64(dest, param_name, persistent_param);
  }
 </s> add   return result; </s> remove static int read_param_uint64(uint64_t* dest, const char* param_name, bool persistent_param = false) {
  char *s;
  const int result = read_db_value(param_name, &s, NULL, persistent_param);
  if (result == 0) {
    *dest = strtoull(s, NULL, 0);
    free(s);
  }
  return result;
}

static void read_param_bool_timeout(bool* param, const char* param_name, int* timeout, bool persistent_param = false) {
  if (*timeout > 0){
    (*timeout)--;
  } else {
    read_param_bool(param, param_name, persistent_param);
    *timeout = 2 * UI_FREQ; // 0.5Hz
  }
}

static void read_param_float_timeout(float* param, const char* param_name, int* timeout, bool persistent_param = false) {
 </s> add template <class T>
static int read_param_timeout(T* param, const char* param_name, int* timeout, bool persistent_param = false) {
  int result = -1;
  read_param(&s->speed_lim_off, "SpeedLimitOffset");
  read_param(&s->is_metric, "IsMetric");
  read_param(&s->longitudinal_control, "LongitudinalControl");
  read_param(&s->limit_set_speed, "LimitSetSpeed");
      0.0f, 0.0f, 1.0f, 0.0f,
      0.0f, 0.0f, 0.0f, 1.0f,
    }};
  
  read_param(&s->speed_lim_off, "SpeedLimitOffset");
  read_param(&s->is_metric, "IsMetric");
  read_param(&s->longitudinal_control, "LongitudinalControl");
  read_param(&s->limit_set_speed, "LimitSetSpeed");
  read_param(&s->speed_lim_off, "SpeedLimitOffset");
  read_param(&s->is_metric, "IsMetric");
  read_param(&s->longitudinal_control, "LongitudinalControl");
  read_param(&s->limit_set_speed, "LimitSetSpeed");
  read_param(&s->speed_lim_off, "SpeedLimitOffset");
  read_param(&s->is_metric, "IsMetric");
  read_param(&s->longitudinal_control, "LongitudinalControl");
  read_param(&s->limit_set_speed, "LimitSetSpeed");
  read_param(&s->speed_lim_off, "SpeedLimitOffset");
  read_param(&s->is_metric, "IsMetric");
  read_param(&s->longitudinal_control, "LongitudinalControl");
  read_param(&s->limit_set_speed, "LimitSetSpeed");
  
    // Set offsets so params don't get read at the same time
    s->longitudinal_control_timeout = UI_FREQ / 3;
    s->is_metric_timeout = UI_FREQ / 2;
    s->limit_set_speed_timeout = UI_FREQ;
keep keep keep keep replace replace replace replace keep keep keep keep keep
 Template version of read_param (#1593) 
selfdrive/ui/ui.cc