albertaloop / T_SWE_2019_2020

Software for AlbertaLoop's first-generation pod.
MIT License
3 stars 1 forks source link

Firmware logging #21

Open mbardwell opened 3 years ago

mbardwell commented 3 years ago

Summary

I would be nice to have pretty-print logging for all projects.

Acceptance Criteria

OkTerrific commented 3 years ago

A new requirement from the CHC rule book is that all of our parameters be logged to an onboard SD card that can be used for diagnostics in the event of a system failure. In automotive terminology, this would be our "freeze-frame data".

I think we have been developing our own messaging and error code scheme. As it stands, we will already be storing all system parameters and error messages in our RAM or external SD card. The remaining question is how we will be able to access these parameters.

When would we want to use print logging? I could see if we doing integration testing with our CAN connected Teensy boards, and we want periodically access all logged parameters of the OBC Teensy. The only other option we would have at this point is to send our parameters over Ethernet to our Raspberry Pi and access the data from there.

If we just connect a laptop to the OBC Teensy using a Serial connection, then we can bypass the need for the Raspberry Pi. But we could also just connect the OBC Teensy to a laptop using Ethernet, which I think would be faster. Our firmware for the OBC will already periodically send packets over Ethernet, so I think this method would have the least impact on our program performance.