Skip to content

Commit

Permalink
Remove templates from EQ until they are integrated
Browse files Browse the repository at this point in the history
  • Loading branch information
Rexeh committed Nov 27, 2023
1 parent efabe5d commit 858a898
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
14 changes: 8 additions & 6 deletions joystick_diagrams/classes/version/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,15 @@
ENCODING = "UTF8"


@dataclass
@dataclass(eq=False)
class JoystickDiagramVersion:
version: str
template_hashes: dict

# Temporary EQ override as templates are not yet integrated to avoid incorrect version checks
def __eq__(self, other):
return self.version == other.version


class VersionEncode(json.JSONEncoder):
def default(self, o: JoystickDiagramVersion) -> Any:
Expand Down Expand Up @@ -63,9 +67,7 @@ def performn_version_check() -> bool:
latest_version = __convert_json_to_object(remote_manifest)

# Check Versions
version_match = compare_versions(latest_version=latest_version, running_version=running_version)

return version_match
return compare_versions(latest_version=latest_version, running_version=running_version)


def __convert_json_to_object(payload: str) -> JoystickDiagramVersion:
Expand Down Expand Up @@ -108,12 +110,12 @@ def generate_template_manifest() -> dict[str, str]:


def compare_versions(running_version: JoystickDiagramVersion, latest_version: JoystickDiagramVersion) -> bool:
return running_version.version == latest_version.version
return running_version == latest_version


def get_current_version() -> str:
return VERSION


if __name__ == "__main__":
performn_version_check()
generate_version()
3 changes: 0 additions & 3 deletions templates/HOTAS Warthog Joystick.svg

This file was deleted.

2 changes: 1 addition & 1 deletion version_manifest.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version": "1.6", "template_hashes": {"CH Fighterstick USB.svg": "ecb58ae3850233772d06a97deb09a33585a6311526fd608204a202e9e06a03a4", "CH Pro Throttle USB.svg": "a85b52eb622d5c28c15364ae4882ce8e589364154a486aea94d53c52770ae917", "HOTAS Warthog Joystick.svg": "87a7b91fa093a48533e490096ab34dd441d04bc73aa12a797f057f1fce9d4672", "HOTAS Warthog Throttle.svg": "ec06478e328471c3dd1081ddb9722d15b06f3c7581d4a43ee5b302de108e4f84", "T.16000M Joystick Left.svg": "9fa8059b9cbecc96033522a3e3307590bb425a6f74b2218ad3bc9aacd764b313", "T.16000M Joystick.svg": "0a893b46544d15253838402cb88d91a3513e793cd2ec742e572291b551ae1951", "TotalControls_Device_1.svg": "4493b84ec00e9a3c3d5ed5bb2252ff3d1c0f43062628074c64afb7c61f1f2ea4", "TotalControls_Device_2.svg": "75273c53282b7aeddbdcc604d63a4162fb8484dcbfdda60ac06ad89a28601d2a", "TWCS Throttle.svg": "128e972df307a9a3236253ecd1299925d1faf569c74cc5f1de3304d162b8ba88", "VKB-Sim Gladiator NXT L.svg": "11f07941223e5349015874f89308b0c0cdba93667dec6cf83ee2f0b8cfc676ed", "VKB-Sim Gladiator NXT R.svg": "5a435f2a9d4b2b021c968771e4a1fb44274ebbcc9b56b5e2ca847a72ee49e526", "VPC Constellation ALPHA R.svg": "ad9cdec0ac1b6acda10913ace837e05a7732a46c10d684baafd04a634bba5cba", "VPC Control Panel #1.svg": "6926094d565b60b4e2e9df7a6957d32e5df41854933f9bb5ae2254ad4737d48f", "VPC Stick MT-50CM.svg": "0602a7b529a194545c45881d98ae3feec21f9084ffbe1aee57d650c77a40212e", "VPC Stick VFX.svg": "33e343e77d4ce72e641343def9c8ee3710ab960bc79d0cdf894decb0cfc494ab", "VPC Stick WarBRD.svg": "c16aac95e6140284ca84ef6637c075befa9aadafb1bd034edb1b7f440f779da8", "VPC Throttle MT-50 CM2.svg": "6445aa8a920890674d8ab9dc0367277afcbb93e9f2b2bb7b31118390c45d6149", "X52_H.O.T.A.S..svg": "a8f9b5efd10942e0cd8354bf0c3b085fdf8532c11b691021906513df305bb4d6", "X56 H.O.T.A.S. Stick.svg": "6a1398ffbd02b51396286967fb8c8ddb795fbb2e9600060214b72af2d2ef6eb5", "X56 H.O.T.A.S. Throttle.svg": "b0d43840a9d8392d4ddb6f7cb1d80c7a4a83a3e3d0d2848d8c4aab7c68ccd70c"}}
{"version": "1.6", "template_hashes": {"CH Fighterstick USB.svg": "ecb58ae3850233772d06a97deb09a33585a6311526fd608204a202e9e06a03a4", "CH Pro Throttle USB.svg": "a85b52eb622d5c28c15364ae4882ce8e589364154a486aea94d53c52770ae917", "HOTAS Warthog Throttle.svg": "ec06478e328471c3dd1081ddb9722d15b06f3c7581d4a43ee5b302de108e4f84", "T.16000M Joystick Left.svg": "9fa8059b9cbecc96033522a3e3307590bb425a6f74b2218ad3bc9aacd764b313", "T.16000M Joystick.svg": "0a893b46544d15253838402cb88d91a3513e793cd2ec742e572291b551ae1951", "TotalControls_Device_1.svg": "4493b84ec00e9a3c3d5ed5bb2252ff3d1c0f43062628074c64afb7c61f1f2ea4", "TotalControls_Device_2.svg": "75273c53282b7aeddbdcc604d63a4162fb8484dcbfdda60ac06ad89a28601d2a", "TWCS Throttle.svg": "128e972df307a9a3236253ecd1299925d1faf569c74cc5f1de3304d162b8ba88", "VKB-Sim Gladiator NXT L.svg": "11f07941223e5349015874f89308b0c0cdba93667dec6cf83ee2f0b8cfc676ed", "VKB-Sim Gladiator NXT R.svg": "5a435f2a9d4b2b021c968771e4a1fb44274ebbcc9b56b5e2ca847a72ee49e526", "VPC Constellation ALPHA R.svg": "ad9cdec0ac1b6acda10913ace837e05a7732a46c10d684baafd04a634bba5cba", "VPC Control Panel #1.svg": "6926094d565b60b4e2e9df7a6957d32e5df41854933f9bb5ae2254ad4737d48f", "VPC Stick MT-50CM.svg": "0602a7b529a194545c45881d98ae3feec21f9084ffbe1aee57d650c77a40212e", "VPC Stick VFX.svg": "33e343e77d4ce72e641343def9c8ee3710ab960bc79d0cdf894decb0cfc494ab", "VPC Stick WarBRD.svg": "c16aac95e6140284ca84ef6637c075befa9aadafb1bd034edb1b7f440f779da8", "VPC Throttle MT-50 CM2.svg": "6445aa8a920890674d8ab9dc0367277afcbb93e9f2b2bb7b31118390c45d6149", "X52_H.O.T.A.S..svg": "a8f9b5efd10942e0cd8354bf0c3b085fdf8532c11b691021906513df305bb4d6", "X56 H.O.T.A.S. Stick.svg": "6a1398ffbd02b51396286967fb8c8ddb795fbb2e9600060214b72af2d2ef6eb5", "X56 H.O.T.A.S. Throttle.svg": "b0d43840a9d8392d4ddb6f7cb1d80c7a4a83a3e3d0d2848d8c4aab7c68ccd70c"}}

0 comments on commit 858a898

Please sign in to comment.