Skip to content

Commit

Permalink
V1.62.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bassmaster187 committed Dec 12, 2024
1 parent 0956624 commit f5f374f
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 7 deletions.
4 changes: 2 additions & 2 deletions TeslaLogger/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// übernehmen, indem Sie "*" eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.61.0.0")]
[assembly: AssemblyFileVersion("1.61.0.0")]
[assembly: AssemblyVersion("1.62.0.0")]
[assembly: AssemblyFileVersion("1.62.0.0")]

[assembly: InternalsVisibleTo("UnitTestsTeslaloggerNET8")]
[assembly: InternalsVisibleTo("UnitTestsTeslalogger")]
2 changes: 1 addition & 1 deletion TeslaLogger/TelemetryConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ private void InsertCharging(dynamic j, DateTime d, string resultContent)
lastSoc = Soc;
lastSocDate = d;

car.teslaAPIState.AddValue("battery_level", "int", value, Tools.ToUnixTime(d), "charge_state");
car.teslaAPIState.AddValue("battery_level", "int", Soc, Tools.ToUnixTime(d), "charge_state");

car.CurrentJSON.current_battery_level = lastSoc;
changed = true;
Expand Down
2 changes: 1 addition & 1 deletion TeslaLogger/Tools.cs
Original file line number Diff line number Diff line change
Expand Up @@ -976,7 +976,7 @@ internal static UpdateType GetOnlineUpdateSettings()
}
else if (j["update"] == "none")
{
return UpdateType.none;
return UpdateType.stable;
}
}
}
Expand Down
7 changes: 4 additions & 3 deletions TeslaLogger/UpdateTeslalogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2784,12 +2784,13 @@ public static void CheckForNewVersion()

public static bool UpdateNeeded(string currentVersion, string online_version, Tools.UpdateType updateType)
{
if (updateType == Tools.UpdateType.none)
/*
if (updateType == Tools.UpdateType.none) // None isn't supported anymore, because Tesla may force me to do an update
{
return false;
}
}*/

if (updateType == Tools.UpdateType.stable || updateType == Tools.UpdateType.all)
if (updateType == Tools.UpdateType.stable || updateType == Tools.UpdateType.all || updateType == Tools.UpdateType.none)
{
Version cv = new Version(currentVersion);
Version ov = new Version(online_version);
Expand Down
Binary file modified TeslaLogger/bin/TeslaLogger.exe
Binary file not shown.
3 changes: 3 additions & 0 deletions TeslaLogger/bin/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Version 1.62.0
- Update = none is no longer supported. Tesla may force me to update a version so "none" is now "stable"

# Version 1.61.0
- Simplified the switch to Fleet API.
- Infos if you need to switch to Fleet API in the admin panel.
Expand Down
13 changes: 13 additions & 0 deletions UnitTestsTeslalogger/UnitTestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -827,6 +827,19 @@ public void VersionCheck()
Assert.IsFalse(UpdateTeslalogger.UpdateNeeded("1.0.0.0", "1.0.0.0", Tools.UpdateType.none));
Assert.IsFalse(UpdateTeslalogger.UpdateNeeded("1.0.0.0", "1.0.0.1", Tools.UpdateType.none));
Assert.IsFalse(UpdateTeslalogger.UpdateNeeded("1.0.0.1", "1.0.0.0", Tools.UpdateType.none));
Assert.IsTrue(UpdateTeslalogger.UpdateNeeded("1.0.0.0", "1.1.0.0", Tools.UpdateType.none));

// None is now the same as stable
Assert.IsFalse(UpdateTeslalogger.UpdateNeeded("1.0.0.0", "1.0.0.1", Tools.UpdateType.none));
Assert.IsFalse(UpdateTeslalogger.UpdateNeeded("1.0.0.0", "1.0.1.0", Tools.UpdateType.none));
Assert.IsTrue(UpdateTeslalogger.UpdateNeeded("1.0.0.0", "1.1.0.0", Tools.UpdateType.none));
Assert.IsFalse(UpdateTeslalogger.UpdateNeeded("1.0.0.0", "1.2.3.4", Tools.UpdateType.none));

Assert.IsFalse(UpdateTeslalogger.UpdateNeeded("1.0.0.0", "2.0.0.1", Tools.UpdateType.none));
Assert.IsTrue(UpdateTeslalogger.UpdateNeeded("1.0.0.0", "2.0.0.0", Tools.UpdateType.none));
Assert.IsTrue(UpdateTeslalogger.UpdateNeeded("1.0.0.0", "2.1.0.0", Tools.UpdateType.none));

Assert.IsFalse(UpdateTeslalogger.UpdateNeeded("1.0.0.1", "1.0.0.0", Tools.UpdateType.none));
}

[TestMethod]
Expand Down

0 comments on commit f5f374f

Please sign in to comment.