send method

void send()

Implementation

void send() {
  final p = malloc<PERIPHERAL_USER_PROFILE_DATA>();
  p.ref.height_in_cm = height_in_cm;
  p.ref.weight_in_kg = weight_in_kg;
  p.ref.stride_length_in_cm = stride_length_in_cm;
  p.ref.stride_length_run_in_cm = stride_length_run_in_cm;
  p.ref.stepRateForRunLength = stepRateForRunLength;
  p.ref.units_type = units_type;
  p.ref.nickname_len = _nickname_len;
  p.ref.nickname = nickname.toNativeUtf8();
  p.ref.clock_orientation = clock_orientation;
  p.ref.sleep_alarm_day_of_week = sleep_alarm_day_of_week;
  p.ref.bed_hr = bed_hr;
  p.ref.bed_min = bed_min;
  p.ref.wakeup_hr = wakeup_hr;
  p.ref.wakeup_min = wakeup_min;
  p.ref.screen_display_option = screen_display_option;
  p.ref.touch_virbration = touch_virbration;
  p.ref.daily_goal = daily_goal;
  p.ref.training_display_option = training_display_option;
  p.ref.age = age;
  p.ref.sex = sex;
  p.ref.stride_length_run_indoor_in_cm = stride_length_run_indoor_in_cm;
  p.ref.hr_alarm_rate = hr_alarm_rate;
  p.ref.pace_alarm_zone = pace_alarm_zone;
  p.ref.app_setting = app_setting;
  p.ref.caloryDisplayType = caloryDisplayType;
  p.ref.healthinfolevel = healthinfolevel;
  p.ref.stepAlarmEn = stepAlarmEn;
  p.ref.stepAlarmVal = stepAlarmVal;
  p.ref.calAlarmEn = calAlarmEn;
  p.ref.calAlarmVal = calAlarmVal;
  p.ref.stAlarmVal = stAlarmVal;
  p.ref.stMinAlarmVal = stMinAlarmVal;

  clingNative.cwsUpdateUserProfileCfg(p);
  malloc.free(p);
  clingNative.cwsSetUserProfileDirectly();
}