#!/usr/bin/env python3
#from panda import Panda
import binascii
import csv

"""
<NAME>
November 22nd 2019
Demo Menu
CSC 344 
Prof. <NAME>
"""

def recieve_can(offset):
    """
    The original goal was to have a full menu working on the simulated CAN stream
    but it ended up wasting a lot of time and not working great. Converting it back from
    string to offsets and having it filter correctly was tricky and seemingly pointless.
    However, this will stream a real session I recorded in my car. It includes me driving
    steering, and opening closing doors so get different data to stream.
    """
    #panda = Panda()
    with open('canDATA-Honda-GEN10.csv', newline='') as csvfile:
        r = csv.reader(csvfile)
        for row in r:
           adr, mes, bus = row 
           print(f'{adr} {mes} {bus}')

if __name__ == "__main__":
  recieve_can(offset)

