Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
bassmaster187 committed Feb 15, 2024
2 parents 6d9d1f5 + 6b0c97f commit b5780fa
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 10 deletions.
16 changes: 11 additions & 5 deletions TeslaLogger/WebHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2698,11 +2698,17 @@ public void UpdateEfficiency()
{
if (!AWD)
{
if (MIC)
WriteCarSettings("0.138", "M3 SR+ LFP 2021");
else
WriteCarSettings("0.145", "M3 LR RWD");
return;
if (!AWD)
{
if (MIC)
if (battery == "LFP")
WriteCarSettings("0.138", "M3 SR+ LFP 2021");
else
WriteCarSettings("0.142", "M3 LR RWD 2023");
else
WriteCarSettings("0.145", "M3 LR RWD 2019");
return;
}
}
else if (motor == "3 dual performance" && year == 2021)
{
Expand Down
5 changes: 3 additions & 2 deletions TeslaLogger/bin/geofence.csv
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,8 @@ Supercharger-V3 RO-Pitești,44.82358585430288,24.909691955626876,46
Supercharger-V3 RO-Bucharest,44.47895863461448,26.103306971746207,32
Supercharger-V3 RO-Timișoara,45.755131610991846,21.23298926991955,32
Supercharger RS-Aleksinac, 43.528816, 21.709413
Supercharger RS-Belgrade, 44.710065, 20.561113
Supercharger-V3 RS-Belgrade AVA Shoping Center, 44.711568, 20.562039, 30
Supercharger RS-Belgrade, 44.7100564, 20.5610539, 30
Supercharger SE-Arboga, 59.426307, 15.827684
Supercharger SE-Arvidsjaur, 65.589922, 19.184091
Supercharger-V3 SE-Björkliden, 68.40734, 18.674918
Expand Down Expand Up @@ -4050,7 +4051,7 @@ EnBW DE-Korntal-Münchingen Stuttgarter Str., 48.850184000054, 9.1129279998806
EnBW DE-Korntal-Münchingen Zuffenhauser Straße, 48.830060014917, 9.1312400018646
EnBW DE-Kraftsdorf, 50.8955874, 11.9809509
EnBW DE-Kraichgau Nord, 49.244202585141, 8.8788539785638
EnBW DE-Kraichgau Süd, 49.240896, 8.879563, 20
EnBW DE-Kraichgau Süd, 49.240896, 8.879563, 50
EnBW DE-Krefeld Bauhaus, 51.318214, 6.582751
EnBW DE-Krefeld Mevissenstr. Bauhaus, 51.34964, 6.52949
EnBW DE-Krefeld Shell, 51.351963, 6.63886
Expand Down
2 changes: 1 addition & 1 deletion TeslaLogger/bin/language-en.txt
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ BA_Step3=Step 3:
BA_FillOut=Fill out this form:
BA_CopyUrl=Copy the resulting url as shown
BA_Paste=Paste the resulting url into the box and click "Get Tokens" Button:
BA_FLEETAPI=Tesla Fleet API (recommanded)
BA_FLEETAPI=Tesla Fleet API (recommended)
Get Tokens=Get Tokens

#password_fleet.php
Expand Down
23 changes: 21 additions & 2 deletions UnitTestsTeslalogger/UnitTestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public void Car_M3_LR_RWD()
wh.car.Vin = "5YJ3E7EA9KFxxxxxx";
wh.UpdateEfficiency();

Assert.AreEqual("M3 LR RWD", wh.car.ModelName);
Assert.AreEqual("M3 LR RWD 2019", wh.car.ModelName);
Assert.AreEqual(0.145, wh.car.WhTR);
}

Expand All @@ -118,10 +118,29 @@ public void Car_M3_LR_RWD2()
wh.car.TrimBadging = "";
wh.UpdateEfficiency();

Assert.AreEqual("M3 LR RWD", wh.car.ModelName);
Assert.AreEqual("M3 LR RWD 2019", wh.car.ModelName);
Assert.AreEqual(0.145, wh.car.WhTR);
}

[TestMethod]
public void Car_M3_LR_RWD_2023()
{
Car c = new Car(0, "", "", 0, "", DateTime.Now, "", "", "", "", "", "", "", null, false);
WebHelper wh = c.webhelper;

MemoryCache.Default.Remove("GetAvgMaxRage_0");
MemoryCache.Default.Add("GetAvgMaxRage_0", 535, DateTime.Now.AddMinutes(1));
wh.car.Vin = "LRW3E7ES7PCXXXXXX";
wh.car.CarType = "model3";
wh.car.CarSpecialType = "base";
wh.car.DBWhTR = 0.142;
wh.car.TrimBadging = "";
wh.UpdateEfficiency();

Assert.AreEqual("M3 LR RWD 2023", wh.car.ModelName);
Assert.AreEqual(0.142, wh.car.WhTR);
}

[TestMethod]
public void Car_M3_LR_P_2019()
{
Expand Down

0 comments on commit b5780fa

Please sign in to comment.