This repository has been archived by the owner on Apr 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #63 from oresat/eds-parse-last
OD Parse-Last Crash Patch
- Loading branch information
Showing
13 changed files
with
229 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7233,4 +7233,3 @@ AccessType=ro | |
DefaultValue=00000000000000000000 | ||
ParameterValue= | ||
PDOMapping=0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
from .can import MagicCANBus | ||
from os import path | ||
import json | ||
|
||
|
||
class Meta: | ||
def __init__(self, config_dir, cache_dir): | ||
self.config_dir = config_dir | ||
self.cache_dir = cache_dir | ||
self.interfaces_file = self.config_dir + '/interfaces.json' | ||
self.nodes_file = self.config_dir + '/nodes.json' | ||
|
||
def save_devices(self, mcb: MagicCANBus) -> bool: | ||
output = {'interfaces': mcb.interface_list} | ||
with open(self.interfaces_file, "w") as f: | ||
json.dump(output, f) | ||
f.truncate() | ||
|
||
def load_devices(self, interface_args: [str]) -> [str]: | ||
if not path.isfile(self.interfaces_file): | ||
return interface_args | ||
|
||
with open(self.interfaces_file, "r") as f: | ||
interface_config = json.load(f) | ||
for interface in interface_config['interfaces']: | ||
if interface not in interface_args: | ||
interface_args.append(interface) | ||
|
||
return interface_args | ||
|
||
def load_node_overrides(self) -> dict: | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7750,4 +7750,4 @@ | |
ParameterValue= | ||
PDOMapping=0 | ||
""" | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.