public void testSelectsNexus4OnExactMatch() { AndroidModel model = new AndroidModel("4.4.2", "KOT49H", "Nexus 4", "LGE"); ModelSpecificDistanceCalculator distanceCalculator = new ModelSpecificDistanceCalculator(null, null, model); AssertEx.AreEqual("should be Nexus 4", "Nexus 4", distanceCalculator.Model.Model); }
public static void GetAndroidModel(OCVModel ocvModel, RCModel rcModel, ref AndroidModel androidModel) { androidModel.iOCVVolt = ocvModel.iOCVVolt; androidModel.fCTABase = rcModel.fCTABase; androidModel.fCTASlope = rcModel.fCTASlope; androidModel.listfCurr = rcModel.listfCurr; androidModel.listfTemp = rcModel.listfTemp; androidModel.outYValue = rcModel.outYValue; }
internal static void GenerateAndroidDriver(AndroidModel androidModel, Project project) { List <string> strFilePaths = androidModel.FilePaths; List <string> strHHeaderComments; UInt32 uErr = 0; TableMakerService.InitializeHeaderInfor(ref uErr, project.BatteryType.Manufacturer, project.BatteryType.Name, project.AbsoluteMaxCapacity.ToString(), project.LimitedChargeVoltage.ToString(), project.CutoffDischargeVoltage.ToString(), out strHHeaderComments); var OutFolder = $@"{GlobalSettings.RootPath}{project.BatteryType.Name}\{project.Name}\{GlobalSettings.ProductFolderName}"; GenerateCHFiles(ref uErr, OutFolder, strFilePaths[0], strFilePaths[1], strHHeaderComments, androidModel.iOCVVolt, project.VoltagePoints, androidModel.listfTemp, androidModel.listfCurr, androidModel.outYValue, androidModel.fCTABase, androidModel.fCTASlope); }
public void testCalculatesDistanceForMotoXPro() { Context applicationContext = Android.App.Application.Context; AndroidModel model = new AndroidModel("5.0.2", "LXG22.67-7.1", "Moto X Pro", "XT1115"); ModelSpecificDistanceCalculator distanceCalculator = new ModelSpecificDistanceCalculator(applicationContext, null, model); AssertEx.AreEqual("should be Moto X Pro", "Moto X Pro", distanceCalculator.Model.Model); Double distance = distanceCalculator.CalculateDistance(-49, -58); AssertEx.AreEqual("Distance should be as predicted by coefficients at 3 meters", 2.661125466, distance, 0.1); }
private AndroidModel[] CreateAndroidModelData(string[] Lines) { List <AndroidModel> models = new List <AndroidModel>(); for (int i = 1; i < Lines.Length; i++) { string[] data = Lines[i].Split(","); AndroidModel model = new AndroidModel { Model = data[0], Manufacturer = data[2] }; models.Add(model); } return(models.ToArray()); }
public AndroidModel GetAndroidInfo3(string userName, int matb, int getSTT, int getSMS, int getUserInfo) { var counterDayInfo = BLLLoginHistory.Instance.GetForHome(sqlconnectString, sqlconnection, userName, matb, DateTime.Now, 0); AndroidModel androidModel = new AndroidModel(); androidModel.TicketNumber = counterDayInfo.CurrentTicket; androidModel.TotalWaiting = counterDayInfo.TotalWating; androidModel.CounterWaitings = counterDayInfo.CounterWaitingTickets; androidModel.UserId = counterDayInfo.UserId; androidModel.HasEvaluate = counterDayInfo.HasEvaluate; androidModel.Status = counterDayInfo.Status; androidModel.TicketNumber = counterDayInfo.CurrentTicket; androidModel.UserInfo = new UserModel() { UserName = counterDayInfo.UserName }; return(androidModel); }