/*
 * @Author       : ChenJie
 * @Date         : 2022-01-23 13:45:09
 * @Version      : V3.0
 * @LastEditors  : ChenJie
 * @LastEditTime : 2022-01-24 10:56:46
 * @Description  : file content
 * @FilePath     : \PLAT\project\ec616_0h00\apps\qx_app\src\AT_CMD\AppGlobalVar.c
 */
/*
 * AppGlobalVar.c
 *
 *  Created on: 2022年1月19日
 *      Author: QiXiang_CHENJIE
 */

#include "AppGlobalVar.h"
//*全局变量*//
uint8  lockAndUnlockSensor[4] = {0};
uint8  unlockFlg = 0;
uint8  lockFlg = 0;
uint8  swapBattDone = 0;
uint8  backToDrv = 0;
uint8 lockCmdFlg = 0;
uint8 unlockCmdFlg = 0;

uint8 PackExcSts = 0;
uint8 BattSwappingAllw = 0;
uint8 AllPackPwrDnSts = 0;
uint8 BlueDisconnectFailFlg = 0;
uint8 VehPowerMode = 0;
uint8 GearSts = 0;
uint8 EPBWorkingSts = 0;
uint8 BrakeSwitchSts = 0;
uint8 DoorSts = 0;
uint16 SteeringWheelAngle = 0;

uint8 carBleConnectSts = 0;

uint8 packReadySts = 0;
uint8 installPackLoc = 0;
uint8 installPackNum = 0;
uint8 cmdSwapBatt = 0;
uint8 connecMacUb = 1;
uint8 canTargetMac[6] = {0x00};

uint32 BleVersion = 0x01010401; 
uint8 BleMacAddr[6];
uint8 BleTargetMacAddr[6] = {0xBE, 0x84, 0xCC, 0x29, 0x3B, 0xCB};
uint8 BleCurrentRole = 1;
uint8 BleSetRole = 0;          // 0-从机（默认），1-主机
uint8 BleSetRoleEnable = 0;    //默认角色不设置
uint8 BleConnectEnable = 0;    //主机蓝牙连接使能,0-未使能，1-使能
uint8 BleConnectFlg = 0;       //主机蓝牙连接状态，0-未连接，1-连接
uint8 BleDisconnectEnable = 0; //主机蓝牙断开使能,0-未使能，1-使能
uint8 BleDisconnectFlg = 0;    //主机蓝牙断开连接状态，0-未连接，1-连接
uint8 BlePwrControlEnable = 0; //蓝牙开关机使能，默认不使能，自动开机
uint8 BlePwrControlFlg = 0;    //蓝牙开关机控制，1-关机，0-开机，2-重启
uint8 BlePwrState = 0;         //蓝牙开关机状态

uint8 AT_MsgFlag = false; //是否有数据传输需求
QueueHandle_t McuDataSendHandle;
QueueHandle_t McuDataRecvHandle;
SemaphoreHandle_t ConnSemaphore;
/*Can*/
uint8 CanIf_u8TxConfirmCnt = 0U;
boolean CanIf_bTxFlag = false;
uint8 CanIf_u8RxIndicationCnt = 0U;
boolean CanIf_bRxFlag = false;
QueueHandle_t CanRecvQueueHandle;
QueueHandle_t Uart2ToCanDataHandle;
QueueHandle_t CanToUart2DataHandle;
