Skip to content

Commit

Permalink
can: rename CanRead::start to not hide
Browse files Browse the repository at this point in the history
In file included from simulator/global.h:25,
                 from ../firmware/pch/pch.h:20,
                 from ../firmware/hw_layer/drivers/can/can_hw.cpp:15:
../firmware/ChibiOS/os/various/cpp_wrappers/ch.hpp:1335:21: error: ‘chibios_rt::ThreadReference chibios_rt::BaseStaticThread<N>::start(tprio_t) [with int N = 1384; tprio_t = unsigned int]’ was hidden [-Werror=overloaded-virtual=]
 1335 |     ThreadReference start(tprio_t prio) override {
      |                     ^~~~~
../firmware/hw_layer/drivers/can/can_hw.cpp:35:14: note:   by ‘void CanRead::start(CANDriver*)’
   35 |         void start(CANDriver* device) {
      |              ^~~~~
  • Loading branch information
nmschulte committed Mar 9, 2024
1 parent 016a9b2 commit 17e8a71
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions firmware/hw_layer/drivers/can/can_hw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,9 @@ class CanRead final : protected ThreadController<UTILITY_THREAD_STACK_SIZE> {
{
}

void start(CANDriver* device) {
m_device = device;

void tryStart(CANDriver *device) {
if (device) {
m_device = device;
ThreadController::start();
}
}
Expand Down Expand Up @@ -192,8 +191,8 @@ void initCan() {
}

if (engineConfiguration->canReadEnabled) {
canRead1.start(device1);
canRead2.start(device2);
canRead1.tryStart(device1);
canRead2.tryStart(device2);
}

isCanEnabled = true;
Expand Down

0 comments on commit 17e8a71

Please sign in to comment.