Skip to content
Snippets Groups Projects

[CanProtocol] Added stats in CanProtocol

Open Federico Mandelli requested to merge can-protcol-stats into main
3 unresolved threads

Added BusLoadInfo in CanProtocol, if we initialize CAN2 we activate CAN1 clock, needed by CAN2

Merge request reports

Pipeline #6126 passed

Pipeline passed for 6717664c on can-protcol-stats

Ready to merge by members who can write to the target branch.
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
74 74 for (size_t i = 0; i < c.count(); ++i)
75 75 {
76 76 sizePayload += c.get(i).dataLength * 8;
77 sizeFrames += ((54 + c.get(i).dataLength * 8 - 1) / 4);
  • 30 30 namespace Canbus
    31 31 {
    32 32
    33 CanProtocol::CanProtocol(CanbusDriver* can, MsgHandler onReceive)
    34 : can(can), onReceive(onReceive)
    33 CanProtocol::CanProtocol(CanbusDriver* can, MsgHandler onReceive,
    34 uint32_t baudRate)
    35 : can(can), onReceive(onReceive), baudRate(baudRate)
    35 36 {
    36 37 }
    37 38
    38 39 bool CanProtocol::start()
    39 40 {
    40 stopFlag = false;
    41 loadEstimator = new BusLoadEstimation(baudRate);
  • 183 195
    184 196 SyncCircularBuffer<CanMessage, 10> outQueue;
    185 197
    198 uint32_t baudRate;
    199
    200 BusLoadEstimation* loadEstimator = NULL;
    Please register or sign in to reply
    Loading