Skip to content
Snippets Groups Projects
Commit 13da51ff authored by Davide Mor's avatar Davide Mor
Browse files

[CanProtocol] Added loggable CanEvent

parent 7d5f8a0d
No related branches found
No related tags found
No related merge requests found
......@@ -283,6 +283,22 @@ struct CanServoFeedback : ServoFeedback
}
};
struct CanEvent
{
uint64_t timestamp;
uint8_t source = 0;
uint8_t target = 0;
uint8_t event = 0;
static std::string header() { return "timestamp,source,target,event"; }
void print(std::ostream& os) const
{
os << timestamp << "," << source << "," << target << "," << event
<< "\n";
}
};
inline Canbus::CanMessage toCanMessage(const PitotData& data)
{
Canbus::CanMessage message;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment