// map const MAP_CENTER = [47.66241053170822, 26.253705506271356]; const MAP_ZOOM = 13; const DISPLAY_MAP = false; // whether vehicles list is available or not const VEHICLES_LIST_AVAILABLE = false; // css height of selected bus container (#selected-bus) const SELECTED_BUS_HEIGHT = '310px'; const SELECTED_BUS_HEIGHT_ASTRA = '80px'; // candy params to keys corelation (no change is needed here) const CANDY = JSON.parse('{"ReceptionTime":0,"Mainswitch":1,"GpsLatitude":2,"GpsLongitude":3,"LineName":4,"LineNumber":5,"EngineSpeed":6,"WheelBasedVehicleSpeed":7,"HighResolutionTotalVehicleDistance":8,"PowerSupply":9,"GpsBearing":124,"Door":11,"AmbientAirTemperature":12,"MobileUpTime":13,"Embark1":14,"Embark2":15,"Embark3":16,"Embark4":17,"EngineCoolantTemperature":18,"EngineInstantaneousFuelEconomy":19,"EngineTotalFuelUsed":20,"FuelLevel":21,"CatalystTankLevel":22,"FuelConsumptionRateDay":23,"D[006]":120,"D[100]":25,"D[101]":26,"D[103]":27,"D[104]":28,"D[041]":29,"D[020]":30,"D[079]":31,"D[080]":32,"D[029]":33,"D[035]":34,"D[013]":35,"D[012]":36,"D[015]":37,"D[025]":45,"D[052]":39,"D[017]":40,"D[009]":41,"D[010]":42,"D[051]":43,"D[082]":44,"A32[11]":46,"A32[13]":47,"A32[07]":48,"A32[08]":49,"A32[09]":50,"A32[12]":51,"AL[078]":52,"AL[079]":53,"AL[074]":54,"AL[075]":55,"AL[070]":56,"AL[071]":57,"AL[072]":58,"AL[073]":59,"AL[062]":60,"AL[063]":61,"AL[064]":62,"AL[065]":63,"AL[066]":64,"AL[067]":65,"AL[068]":66,"AL[069]":67,"EvobusFrontAxleLeftBrakeLiningWear":68,"EvobusFrontAxleRightBrakeLiningWear":69,"EvobusDriveAxleLeftBrakeLiningWear":70,"EvobusDriveAxleRightBrakeLiningWear":71,"EvobusAuxiliaryAxleLeftBrakeLiningWear":72,"EvobusAuxiliaryAxleRightBrakeLiningWear":73,"BrakeLiningRemainingFrontAxleLeftWheel":74,"BrakeLiningRemainingFrontAxleRightWheel":75,"BrakeLiningRemainingRearAxle1LeftWheel":76,"BrakeLiningRemainingRearAxle1RightWheel":77,"BrakeLiningRemainingRearAxle2LeftWheel":78,"BrakeLiningRemainingRearAxle2RightWheel":79,"BrakeApplicationPressureHighRangeFrontAxleLeftWheel":80,"BrakeApplicationPressureHighRangeFrontAxleRightWheel":81,"BrakeApplicationPressureHighRangeRearAxle1LeftWheel":82,"BrakeApplicationPressureHighRangeRearAxle1RightWheel":83,"ServiceBrakeCircuit1AirPressure":84,"ServiceBrakeCircuit2AirPressure":85,"SolarisTripEnergyDischarged":86,"SolarisTripEnergyCharged":87,"SolarisTripEnergySaved":88,"SolarisTractionContainerEnergyIn":89,"SolarisTractionContainerEnergyOut":90,"TellTaleAntiLockBrakeSystemFailure":91,"TellTaleBrakeFailure":92,"TellTaleBrakeLights":93,"TellTaleBusStopBrake":94,"TellTaleCoolingAirConditioning":95,"TellTaleEngine":96,"TellTaleEngineCoolantLevel":97,"TellTaleEngineCoolantTemperature":98,"TellTaleEngineEmissionFailure":99,"TellTaleEngineOil":100,"TellTaleFrontFogLight":101,"TellTaleGeneralFailure":102,"TellTaleHazard":103,"TellTaleHeightControl":104,"TellTaleHighBeam":105,"TellTaleLowBeam":106,"TellTaleParkingBrake":107,"TellTalePositionLights":108,"TellTalePramRequest":109,"TellTaleRearFogLight":110,"TellTaleRetarder":111,"TellTaleService":112,"TellTaleStopRequest":113,"TellTaleTurnSignals":114,"TellTaleWornBrakeLinings":115,"D[500]":116,"D[240]":117,"D[241]":118,"D[005]":119,"A32[04]":121,"A32[05]":122,"c":123,"CatalystTankTemperature":125,"HighResolutionEngineTotalFuelUsed":126,"ZteBmsAccumulativeChargingEnergy":127,"ZteBmsCellVoltageAverage":128,"ZteBmsCellVoltageMax":129,"ZteBmsCellVoltageMin":130,"ZteBmsPackCurrent":131,"ZteBmsPackVoltage":132,"ZteBmsResidualEnergy":133,"ZteBmsSoc":134,"ZteBmsSoh":135,"ZteBrakePedalPosition":136,"ZteOutputShaftBasedVehicleSpeed":137,"ZteRegenerationInstantaneousPower":138,"ZteDcDcOutputCurrent":139,"ZteDcDcTemperature":140,"ZteFrontAirPressure":141,"ZteIcuFaultCode":194,"ZteMotorControllerTemperature":143,"ZteMotorSpeed":144,"ZteMotorTemperature":145,"ZtePowerBatteryVoltage":146,"ZteRcuFaultCode":147,"ZteRearAirPressure":148,"ZteRemainTravelRange":149,"ZteTms1FaultCode":150,"ZteTms1InletWaterTemperature":151,"ZteTms1OutletWaterTemperature":152,"ZteVcuFaultCode":153,"ZteVehicleStatus":154,"ZteDcDcInputPower":155,"ZteDcDcOutputVoltage":156,"ZteDriveSystemInstantaneousPower":157,"ZteMotorControllerDCInputCurrent":158,"ZteMotorControllerDCInputVoltage":159,"ZteTms1OutputPower":160,"ZteTotalMileage":161,"ZteVehicleSpeed":162,"ZteBmsAccumulativeChargingTime":163,"ZteBmsCellSamplingTmperatureMax":164,"ZteAirPumpTemperature":165,"ZteBmsCellTemperatureAverage":166,"ZteRcuDcInputVoltage":167,"SolarisElectricMotor1Temperature":168,"SolarisHeatingLiquidTemperature":169,"SolarisBatterySOC":170,"SolarisBatteryTemperature":171,"SolarisBatteryTemperatureMultiplexor":172,"Zte24VBatteryLowVoltageFault":173,"ZteAbsOffRoadSwitch":174,"ZteAc1CompressorDriveFault":175,"ZteAc1InternalFanFault":176,"ZteAc1LowPressure":177,"ZteAc2CompressorDriveFault":178,"ZteAc2IntakeTemperatureSensorFault":179,"ZteAc2InternalFanFault":180,"ZteAcceleratorPedalFault":181,"ZteAirPressureLowFault":182,"ZteAsrOffRoadSwitch":183,"ZteBmsConsistencyFault":184,"ZteBmsFaultCodeLevel1":185,"ZteBmsFaultCodeLevel2":186,"ZteBmsFaultCodeLevel3":187,"ZteBmsFaultLevel":188,"ZteBmsTemperatureDifferenceFault":189,"ZteCoolantLevelLowWarning":190,"ZteDcDcFaultCode":191,"ZteDoorPumpEmergencyValveWarning":192,"ZteFrontAxleBrakeAirPressureWarning":193,"ZteIcuFaultLevel":195,"ZteInstrumentControlUnitFault":196,"ZteKeyOnStatus":197,"ZteLeftFrontBrakeLiningWearWarning":198,"ZteLeftRearBrakeLiningWearWarning":199,"ZteLeftSeatWarning":200,"ZteLeftTurnLampStatus":201,"ZteLowBeamStatus":202,"ZteMiddleDoorStatus":203,"ZteRightFrontBrakeLiningWearWarning":204,"ZteRightRearBrakeLiningWearWarning":205,"ZteSafetyBeltWarning":206,"KingLongHighVoltageEmergencyStopSwitchStatus":207,"KingLongOperatingMode":208,"KingLongSystemFailureLevel":209,"KingLongVehicleStatus":210,"KingLongCurrentGear":211,"TachographVehicleSpeed":212,"KingLongSOC":213,"KingLongDcDcStatus":214,"KingLongDcDcTemperature":215,"KingLongMaximumTemperature":216,"KingLongMinimumTemperature":217,"KingLongMaximumTemperatureProbeSerialNumber":218,"KingLongMinimumTemperatureProbeSerialNumber":219,"KingLongMotor1ControllerTemperature":220,"KingLongMotor1Temperature":221,"KingLongMotor1Speed":222,"KingLongTotalBatteryCurrent":223,"KingLongTotalBatteryVoltage":224,"KingLongAirPressure1":225,"KingLongAirPressure2":226}'); // telltales indexes const TELLTALES_INDEXES = JSON.parse('[91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115]'); // translation const TRANSLATE = { deselect_vehicle: 'Deselectează', no_warnings: 'Nu sunt erori.', sbi_switch_on: 'Pornit', sbi_switch_off: 'Oprit', sbi_door_open: 'Deschisă', sbi_door_closed: 'Închisă', sbi_driver_card_present: 'Prezent', active: '', inactive: '', show_on_map: '', sbi_battery: 'Baterie', sbi_forward: 'Inainte', sbi_backward: 'Inapoi', sbi_front: 'Fata', sbi_back: 'Spate', sbi_activ: 'Activ', sbi_inactiv: 'NOT', sbi_ok: 'Ok', sbi_not_ok: 'NOT', sbi_accelerare: 'Accelerare', sbi_franare: 'Franare', sbi_fail: 'FAIL', sbi_succ: 'OK', sbi_rampa: 'Rampa' };