#include "lvgl.h"
#include "interface.h"
#include "mxc_meter.h"

/*********************************
**一些状态配置
*********************************/
void Set_sys_power_on_self_test(uint8_t value)
{
    daily_get_UiData()->power_on_self_test = value;
}

uint8_t Get_sys_power_on_self_test(void)
{
    return daily_get_UiData()->power_on_self_test;
}

void Set_sys_softwar_host(uint8_t value)
{
    daily_get_UiData()->softwar_host = value;
}

uint8_t Get_sys_softwar_host(void)
{
    return daily_get_UiData()->softwar_host;
}

void Set_sys_softwar_order(uint8_t value)
{
    daily_get_UiData()->softwar_order = value;
}

uint8_t Get_sys_softwar_order(void)
{
    return daily_get_UiData()->softwar_order;
}

void Set_sys_language(uint8_t value)
{
    daily_get_UiData()->save_info.language = value;
}

uint8_t Get_sys_language(void)
{
    return daily_get_UiData()->save_info.language;
}

void Set_sys_theme(uint8_t value)
{
    daily_get_UiData()->save_info.theme = value;
}

uint8_t Get_sys_theme(void)
{
    return daily_get_UiData()->save_info.theme;
}

void Set_sys_theme_state(uint8_t value)
{
    daily_get_UiData()->save_info.theme_state = value;
}

uint8_t Get_sys_theme_state(void)
{
    return daily_get_UiData()->save_info.theme_state;
}

void Set_sys_light_value(uint8_t value)
{
    daily_get_UiData()->save_info.light_value = value;
}

uint8_t Get_sys_light_value(void)
{
    return daily_get_UiData()->save_info.light_value;
}

void Set_sys_bt_on_off(uint8_t value)
{
    daily_get_UiData()->save_info.bt_on_off = value;
}

uint8_t Get_sys_bt_on_off(void)
{
    return daily_get_UiData()->save_info.bt_on_off;
}

void Set_sys_bt_state(uint8_t value)
{
    daily_get_UiData()->save_info.bt_state = value;
}

uint8_t Get_sys_bt_state(void)
{
    return daily_get_UiData()->save_info.bt_state;
}

void Set_sys_veer_hint(uint8_t value)
{
    daily_get_UiData()->veer_hint = value;
}

uint8_t Get_sys_veer_hint(void)
{
    return daily_get_UiData()->veer_hint;
}

void Set_sys_lamplight(uint8_t value)
{
    daily_get_UiData()->lamplight = value;
}

uint8_t Get_sys_lamplight(void)
{
    return daily_get_UiData()->lamplight;
}

void Set_sys_light_perception_value(uint8_t value)
{
    daily_get_UiData()->light_perception_value = value;
}

uint8_t Get_sys_light_perception_value(void)
{
    return daily_get_UiData()->light_perception_value;
}

void Set_sys_return_demo(uint8_t value)
{
    daily_get_UiData()->return_demo = value;
}

uint8_t Get_sys_return_demo(void)
{
    return daily_get_UiData()->return_demo;
}

/*********************************
**数据信息
*********************************/
void Set_sys_veer(uint8_t value)
{
    daily_get_UiData()->veer = value;
}

uint8_t Get_sys_veer(void)
{
    return daily_get_UiData()->veer;
}

void Set_sys_velocity(uint16_t value)
{
    daily_get_UiData()->velocity = value;
}

uint16_t Get_sys_velocity(void)
{
    return daily_get_UiData()->velocity;
}

void Set_sys_max_velocity(uint16_t value)
{
    daily_get_UiData()->max_velocity = value;
}

uint16_t Get_sys_max_velocity(void)
{
    return daily_get_UiData()->max_velocity;
}

void Set_sys_verage_velocity(uint16_t value)
{
    daily_get_UiData()->verage_velocity = value;
}

uint16_t Get_sys_verage_velocity(void)
{
    return daily_get_UiData()->verage_velocity;
}

void Set_sys_veer_velocity(uint16_t value)
{
    daily_get_UiData()->veer_velocity = value;
}

uint16_t Get_sys_veer_velocity(void)
{
    return daily_get_UiData()->veer_velocity;
}

void Set_sys_grade(uint8_t value)
{
    daily_get_UiData()->grade = value;
}

uint8_t Get_sys_grade(void)
{
    return daily_get_UiData()->grade;
}

void Set_sys_oil(uint8_t value)
{
    daily_get_UiData()->oil = value;
}

uint8_t Get_sys_oil(void)
{
    return daily_get_UiData()->oil;
}

void Set_sys_temp(uint8_t value)
{
    daily_get_UiData()->temp = value;
}

uint8_t Get_sys_temp(void)
{
    return daily_get_UiData()->temp;
}

void Set_sys_trip_mileage(double value)
{
    daily_get_UiData()->trip_mileage = value;
}

double Get_sys_trip_mileage(void)
{
    return daily_get_UiData()->trip_mileage;
}

void Set_sys_total_mileage(uint32_t value)
{
    daily_get_UiData()->total_mileage = value;
}

uint32_t Get_sys_total_mileage(void)
{
    return daily_get_UiData()->total_mileage;
}

void Set_sys_voltage(double value)
{
    daily_get_UiData()->voltage = value;
}

double Get_sys_voltage(void)
{
    return daily_get_UiData()->voltage;
}


/*********************************
**警告信号灯
*********************************/

void Set_sys_engine(uint8_t value)
{
    daily_get_UiData()->warning.engine = value;
}

uint8_t Get_sys_engine(void)
{
    return daily_get_UiData()->warning.engine;
}

void Set_sys_machine_oil(uint8_t value)
{
    daily_get_UiData()->warning.machine_oil = value;
}

uint8_t Get_sys_machine_oil(void)
{
    return daily_get_UiData()->warning.machine_oil;
}

void Set_sys_abs(uint8_t value)
{
    daily_get_UiData()->warning.abs = value;
}

uint8_t Get_sys_abs(void)
{
    return daily_get_UiData()->warning.abs;
}

void Set_sys_tcs(uint8_t value)
{
    daily_get_UiData()->warning.tcs = value;
}

uint8_t Get_sys_tcs(void)
{
    return daily_get_UiData()->warning.tcs;
}

void Set_sys_fan(uint8_t value)
{
    daily_get_UiData()->warning.fan = value;
}

uint8_t Get_sys_fan(void)
{
    return daily_get_UiData()->warning.fan;
}

void Set_sys_null(uint8_t value)
{
    daily_get_UiData()->warning.null = value;
}

uint8_t Get_sys_null(void)
{
    return daily_get_UiData()->warning.null;
}
/*********************************
**故障码
*********************************/
void Set_sys_now_defect_code(uint32_t value)
{
    daily_get_UiData()->now_defect_code = value;
}

uint32_t Get_sys_now_defect_code(void)
{
    return daily_get_UiData()->now_defect_code;
}

void Set_sys_his_defect_code(uint32_t value)
{
    daily_get_UiData()->his_defect_code = value;
}

uint32_t Get_sys_his_defect_code(void)
{
    return daily_get_UiData()->his_defect_code;
}


