Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ services:
restart: unless-stopped
command: python -u /app/parser/cellular_parser.py
environment:
- DBC_FILE=/app/dbc/brightside.dbc
- DBC_FILE=/app/dbc/cascadia.dbc
- INFLUX_URL=${INFLUX_URL}
- INFLUX_ORG=${INFLUX_ORG}
- INFLUX_BUCKET=CAN_test
Expand Down
4 changes: 2 additions & 2 deletions link_telemetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -656,8 +656,8 @@ def main():
help=("allows randomization with production bucket. Please user carefully and locally "))

source_group.add_argument("--dbc", action="store",
help="Specifies the dbc file to use. For example: ./dbc/brightside.dbc"
"Default: ./dbc/brightside.dbc")
help="Specifies the dbc file to use. For example: ./dbc/cascadia.dbc. "
"Default: ./dbc/cascadia.dbc")

source_group.add_argument("-f", "--frequency-hz", action="store", default=DEFAULT_RANDOM_FREQUENCY_HZ, type=int,
help=((f"Specifies the frequency (in Hz) for random message generation. \
Expand Down
6 changes: 3 additions & 3 deletions parser/cellular_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
- Logs undecodable/unknown frames to a rotating file

ENV (typical):
DBC_FILE=/app/dbc/brightside.dbc
DBC_FILE=/app/dbc/cascadia.dbc
INFLUX_URL=http://influxdb:8086
INFLUX_ORG=UBC Solar
INFLUX_BUCKET=CAN_test
Expand Down Expand Up @@ -41,7 +41,7 @@
# -----------------------------
# Config from environment
# -----------------------------
DBC_FILE = os.getenv("DBC_FILE", "/app/dbc/brightside.dbc")
DBC_FILE = os.getenv("DBC_FILE", "/app/dbc/cascadia.dbc")
INFLUX_URL = os.getenv("INFLUX_URL", "http://localhost:8086")
INFLUX_ORG = os.getenv("INFLUX_ORG", "UBC Solar")
INFLUX_BUCKET = os.getenv("INFLUX_BUCKET", "CAN_test")
Expand Down Expand Up @@ -207,7 +207,7 @@ def UploadFrames(self, request_iter, context):
continue

try:
vals = msg.decode(bytes(f.data))
vals = msg.decode(bytes(f.data), decode_choices=False)
except Exception as e:
metrics["decodes_failed"] += 1
_log_fail(f.can_id, f.is_extended_id, bytes(f.data), f"DECODE_FAIL:{type(e).__name__}")
Expand Down
2 changes: 1 addition & 1 deletion parser/data_classes/CAN_Msg.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def get_data_bytes(self, message_data) -> bytearray:
"""
def get_measurements(self, identifier, data_bytes):
try:
measurements = CAR_DBC.decode_message(identifier, data_bytes)
measurements = CAR_DBC.decode_message(identifier, data_bytes, decode_choices=False)
if measurements == {}:
raise Exception(f"Could not decode_message on ID = {identifier} with data = {data_bytes}")
return measurements
Expand Down
2 changes: 1 addition & 1 deletion parser/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def generate_exception(e: Exception, func_name: str) -> Exception:


# <----- DBC Variables (Can be changed by user arguement in Link Tel) ----->
DBC_FILE = Path("./dbc/brightside.dbc")
DBC_FILE = Path("./dbc/cascadia.dbc")
if not DBC_FILE.is_file():
print(f"Unable to find expected existing DBC file: \"{DBC_FILE.absolute()}\"")
sys.exit(1)
Expand Down
Loading