#include <stdio.h>
#include <string.h>
#include "mx_store.h"
#include "mx_alternator_data.h"

extern Store_t UserData;


uint8_t getSoftMainVersion(void)
{
    return  UserData.mSoftMainVersion;
}
void setSoftMainVersion(uint8_t value)
{
    if(value != UserData.mSoftMainVersion)
    {
		UserData.mSoftMainVersion = value;
	}
}

uint8_t getSoftSubVersion(void)
{
    return  UserData.mSoftSubVersion;
}
void setSoftSubVersion(uint8_t value)
{
    if(value != UserData.mSoftSubVersion)
    {
		UserData.mSoftSubVersion = value;
	}
}

uint8_t getSetMode(void)
{
    return  UserData.mSetMode;
}
void setSetMode(uint8_t value)
{
    if(value != UserData.mSetMode)
    {
		UserData.mSetMode = value;
	}
}

uint16_t getSpeedData(void)
{
    return  UserData.mSpeed;
}
void setSpeedData(uint16_t value)
{
    if(value != UserData.mSpeed)
    {
		UserData.mSpeed = value;
	}
}

//档位信息
uint8_t getGearInfo(void)
{
    return  UserData.mGearInfo;
}
void setGearInfo(uint8_t value)
{
    if(value != UserData.mGearInfo)
    {
		UserData.mGearInfo = value;
	}
}

//总计里程
uint32_t getTotalMile(void)
{
    return  UserData.mTotalMile;
}
void setTotalMile(uint32_t value)
{
    if(value != UserData.mTotalMile)
    {
		UserData.mTotalMile = value;
	}
}

//单次行驶里程
uint32_t getTripMile(void)
{
    return  UserData.mTripMile;
}
void setTripMile(uint32_t value)
{
    if(value != UserData.mTripMile)
    {
		UserData.mTripMile = value;
	}
}

//里程清零
uint8_t getMileClearTags(void)
{
    return  UserData.mMileClearTags;
}
void setMileClearTags(uint8_t value)
{
    if(value != UserData.mMileClearTags)
    {
		UserData.mMileClearTags = value;
	}
}

//wifi
uint8_t getWifi(void)
{
    return  UserData.mWifi;
}
void setWifi(uint8_t value)
{
    if(value != UserData.mWifi)
    {
		UserData.mWifi = value;
	}
}

//蓝牙
uint8_t getBlueTooth(void)
{
    return  UserData.mBlueTooth;
}
void setBlueTooth(uint8_t value)
{
    if(value != UserData.mBlueTooth)
    {
		UserData.mBlueTooth = value;
	}
}

//转向
uint8_t getTurn(void)
{
    return  UserData.mTurn;
}
void setTurn(uint8_t value)
{
    if(value != UserData.mTurn)
    {
		UserData.mTurn = value;
	}
}

//转向提示
uint8_t getTurnPrompt(void)
{
    return  UserData.mTurnPrompt;
}
void setTurnPrompt(uint8_t value)
{
    if(value != UserData.mTurnPrompt)
    {
		UserData.mTurnPrompt = value;
	}
}

//转向灯
uint8_t getTurnLight(void)
{
    return  UserData.mTurnLight;
}
void setTurnLight(uint8_t value)
{
    if(value != UserData.mTurnLight)
    {
		UserData.mTurnLight = value;
	}
}

//远近光灯
uint8_t getBeamLight(void)
{
    return  UserData.mBeamLight;
}
void setBeamLight(uint8_t value)
{
    if(value != UserData.mBeamLight)
    {
		UserData.mBeamLight = value;
	}
}

//示宽灯
uint8_t getSideMarkerLight(void)
{
    return  UserData.mSideMarkerLight;
}
void setSideMarkerLight(uint8_t value)
{
    if(value != UserData.mSideMarkerLight)
    {
		UserData.mSideMarkerLight = value;
	}
}

//工作指示灯
uint8_t getFanLight(void)
{
    return  UserData.mFanLight;
}
void setFanLight(uint8_t value)
{
    if(value != UserData.mFanLight)
    {
		UserData.mFanLight = value;
	}
}

//abs灯
uint8_t getABSLight(void)
{
    return  UserData.mABSLight;
}
void setABSLight(uint8_t value)
{
    if(value != UserData.mABSLight)
    {
		UserData.mABSLight = value;
	}
}

//机油压力灯
uint8_t getOilPressLight(void)
{
    return  UserData.mOilPressLight;
}
void setOilPressLight(uint8_t value)
{
    if(value != UserData.mOilPressLight)
    {
		UserData.mOilPressLight = value;
	}
}

//
uint8_t getEngineLight(void)
{
    return  UserData.mEngineLight;
}
void setEngineLight(uint8_t value)
{
    if(value != UserData.mEngineLight)
    {
		UserData.mEngineLight = value;
	}
}

//清零标记
uint8_t getRefreshTags(void)
{
    return  UserData.mRefreshTags;
}
void setRefreshTags(uint8_t value)
{
    if(value != UserData.mRefreshTags)
    {
		UserData.mRefreshTags = value;
	}
}

//灯光值
uint8_t getLightValue(void)
{
    return  UserData.mLightValue;
}
void setLightValue(uint8_t value)
{
    if(value != UserData.mLightValue)
    {
		UserData.mLightValue = value;
	}
}

//自检
uint8_t getSelfCheck(void)
{
    return  UserData.mSelfCheck;
}
void setSelfCheck(uint8_t value)
{
    if(value != UserData.mSelfCheck)
    {
		UserData.mSelfCheck = value;
	}
}

//蓝牙继承数据
uint8_t getBTDataInherit(void)
{
    return  UserData.mBTData_Inherit;
}
void setBTDataInherit(uint8_t value)
{
    if(value != UserData.mBTData_Inherit)
    {
		UserData.mBTData_Inherit = value;
	}
}

//当前错误
uint16_t getCurrentFaultCode(void)
{
    return  UserData.mCurrentFaultCode;
}
void setCurrentFaultCode(uint16_t value)
{
    if(value != UserData.mCurrentFaultCode)
    {
		UserData.mCurrentFaultCode = value;
	}
}

//历史错误
uint8_t getStoreDCBusLow(void)
{
    return  UserData.mHistoryFaultCode;
}
void setStoreDCBusLow(uint8_t value)
{
    if(value != UserData.mHistoryFaultCode)
    {
		UserData.mHistoryFaultCode = value;
	}
}

//发动机告警信息
uint8_t getEngineErr(void)
{
    return  UserData.mErr.mEngine;
}
void setEngineErr(uint8_t value)
{
    if(value != UserData.mErr.mEngine)
    {
		UserData.mErr.mEngine = value;
	}
}

//机油告警信息
uint8_t getEngineOilErr(void)
{
    return  UserData.mErr.mEngineOil;
}
void setEngineOilErr(uint8_t value)
{
    if(value != UserData.mErr.mEngineOil)
    {
		UserData.mErr.mEngineOil = value;
	}
}

//abs告警
uint8_t getAbsErr(void)
{
    return  UserData.mErr.mAbs;
}
void setAbsErr(uint8_t value)
{
    if(value != UserData.mErr.mAbs)
    {
		UserData.mErr.mAbs = value;
	}
}

//输出过流
uint8_t getTCSErr(void)
{
    return  UserData.mErr.mTcs;
}
void setTCSErr(uint8_t value)
{
    if(value != UserData.mErr.mTcs)
    {
		UserData.mErr.mTcs = value;
	}
}

//风扇故障
uint8_t getFanErr(void)
{
    return  UserData.mErr.mFan;
}
void setFanErrs(uint8_t value)
{
    if(value != UserData.mErr.mFan)
    {
		UserData.mErr.mFan = value;
	}
}

//空挡故障
uint8_t getNeutralGearErr(void)
{
    return  UserData.mErr.mNeutralGear;
}
void setNeutralGearErr(uint8_t value)
{
    if(value != UserData.mErr.mNeutralGear)
    {
		UserData.mErr.mNeutralGear = value;
	}
}

//水温故障
uint8_t getWaterTemperErr(void)
{
    return  UserData.mErr.mWaterTemper;
}
void setWaterTemperErr(uint8_t value)
{
    if(value != UserData.mErr.mWaterTemper)
    {
		UserData.mErr.mWaterTemper = value;
	}
}

//刹车故障
uint8_t getBrakesFaultErr(void)
{
    return  UserData.mErr.mBrakesFault;
}
void setBrakesFaultErr(uint8_t value)
{
    if(value != UserData.mErr.mBrakesFault)
    {
		UserData.mErr.mBrakesFault = value;
	}
}

//电池电量占比
uint8_t getBatteryRatio(void)
{
    return  UserData.mBatteryRatio;
}
void setBatteryRatio(uint8_t value)
{
    if(value != UserData.mBatteryRatio)
    {
		UserData.mBatteryRatio = value;
	}
}

//电池电压
uint8_t getBatteryVoltage(void)
{
    return  UserData.mBatteryVoltage;
}
void setBatteryVoltage(uint8_t value)
{
    if(value != UserData.mBatteryVoltage)
    {
		UserData.mBatteryVoltage = value;
	}
}

//转速信息
uint16_t getEspeed(void)
{
    return  UserData.mEspeed;
}
void setEspeed(uint16_t value)
{
    if(value != UserData.mEspeed)
    {
		UserData.mEspeed = value;
	}
}

//油量信息
uint8_t getFuel(void)
{
    return  UserData.mFuel;
}
void setFuel(uint8_t value)
{
    if(value != UserData.mFuel)
    {
		UserData.mFuel = value;
	}
}

//水温信息
uint8_t getWaterTemper(void)
{
    return  UserData.mWaterTemper;
}
void setWaterTemper(uint8_t value)
{
    if(value != UserData.mWaterTemper)
    {
		UserData.mWaterTemper = value;
	}
}

//电瓶电压
uint8_t getAccumulatorVolt(void)
{
    return  UserData.mAccumulatorVolt;
}
void setAccumulatorVolt(uint8_t value)
{
    if(value != UserData.mAccumulatorVolt)
    {
		UserData.mAccumulatorVolt = value;
	}
}
