  #include <assert.h>
  #include <sys/mman.h>
  #include <sys/resource.h>
  #include <czmq.h>
  #include "common/util.h"
  #include "common/timing.h"
 
</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   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_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");
 </s> add   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"); </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;
#include <sstream>
  #include <assert.h>
  #include <sys/mman.h>
#include <sstream>
  #include <sys/resource.h>
  #include <czmq.h>
  #include "common/util.h"
  #include "common/timing.h"
keep add keep keep keep keep
 Template version of read_param (#1593) 
selfdrive/ui/ui.cc