Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix formatting #29

Merged
merged 1 commit into from
Dec 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion c6021light/lib/freertossupport/OsQueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class OsQueue {
BaseType_t higherPriorityTaskWoken;
};

OsQueue() : handle_(NULL){};
OsQueue() : handle_(NULL) {};

OsQueue(QueueHandle_t handle) : handle_(handle) { configASSERT(handle_ != NULL); }

Expand Down
2 changes: 1 addition & 1 deletion c6021light/lib/freertossupport/OsTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class StaticOsTask : public TaskClass {
"TaskClass must extend freertossupport::OsTask.");

void Create(const char* taskName, UBaseType_t priority) {
this->handle_ = xTaskCreateStatic((void (*)(void*)) & TaskClass::TaskMain, taskName, StackSize,
this->handle_ = xTaskCreateStatic((void (*)(void*))&TaskClass::TaskMain, taskName, StackSize,
this, priority, stack_, &tcb_);
configASSERT(this->handle_ != NULL);
}
Expand Down
4 changes: 2 additions & 2 deletions c6021light/src/MarklinI2C/Messages/AccessoryMsg.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class AccessoryMsg {
public:
constexpr static const uint8_t kAccesoryMessageBytes = 3;

constexpr AccessoryMsg(){};
constexpr AccessoryMsg() {};

constexpr AccessoryMsg(const AccessoryMsg&) = default;
constexpr AccessoryMsg& operator=(const AccessoryMsg&) = default;
Expand All @@ -29,7 +29,7 @@ class AccessoryMsg {
constexpr AccessoryMsg& operator=(AccessoryMsg&&) = default;

constexpr AccessoryMsg(uint8_t destination, uint8_t source, uint8_t data)
: destination_(destination), source_(source), data_(data){};
: destination_(destination), source_(source), data_(data) {};

constexpr bool operator==(const AccessoryMsg& other) const {
return this->destination_ == other.destination_ && this->source_ == other.source_ &&
Expand Down
2 changes: 1 addition & 1 deletion c6021light/src/hal/stm32eepromEmulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class DataModelStoreVisitor {

class iterator {
public:
iterator(const DataModel& model, size_type index) : model_(model), index_(index){};
iterator(const DataModel& model, size_type index) : model_(model), index_(index) {};

bool operator!=(const iterator& other) const {
return this->index_ != other.index_ || &(this->model_) != &(other.model_);
Expand Down
6 changes: 4 additions & 2 deletions c6021light/src/tasks/RoutingTask/I2CForwarder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@
return (left.value() & mask) == (right.value() & mask);
}

bool isMatchingTurnoutRailProtocol(const RR32Can::RailProtocol left, const RR32Can::RailProtocol right) {
bool isMatchingTurnoutRailProtocol(const RR32Can::RailProtocol left,
const RR32Can::RailProtocol right) {
if (left == right) {
return true;
} else if (left == RR32Can::RailProtocol::MM1 || left == RR32Can::RailProtocol::MM2) {
return (right == RR32Can::RailProtocol::MM1 || right == RR32Can::RailProtocol::MM2);
}
}

Check warning on line 33 in c6021light/src/tasks/RoutingTask/I2CForwarder.cpp

View workflow job for this annotation

GitHub Actions / build

control reaches end of non-void function [-Wreturn-type]

} // namespace

Expand All @@ -41,7 +42,8 @@
// Responses are forwarded to I2C
printf(" Got an Accessory packet!\n");

if (!isMatchingTurnoutRailProtocol(turnoutPacket.getRailProtocol(), dataModel_->accessoryRailProtocol)) {
if (!isMatchingTurnoutRailProtocol(turnoutPacket.getRailProtocol(),
dataModel_->accessoryRailProtocol)) {
// Not a packet of the expected accessory protocol
return;
}
Expand Down
Loading