Skip to content

Commit

Permalink
address warnings and errors
Browse files Browse the repository at this point in the history
  • Loading branch information
SwappyG authored and jacobperron committed Oct 4, 2022
1 parent de253b6 commit d75d41c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions include/create/serial_query.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ namespace create {

public:
SerialQuery(std::shared_ptr<Data> data, bool install_signal_handler = true);
virtual ~SerialQuery() = default;
};
} // namespace create

Expand Down
1 change: 1 addition & 0 deletions include/create/serial_stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ namespace create {
std::shared_ptr<Data> data,
const uint8_t& header = create::util::STREAM_HEADER,
bool install_signal_handler = true);
virtual ~SerialStream() = default;

};
} // namespace create
Expand Down
6 changes: 3 additions & 3 deletions src/create.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,10 @@ namespace create {
prevTicksRight = totalTicksRight;

// Handle wrap around
if (fabs(ticksLeft) > 0.9 * util::V_3_MAX_ENCODER_TICKS) {
if (std::abs(ticksLeft) > 0.9 * util::V_3_MAX_ENCODER_TICKS) {
ticksLeft = (ticksLeft % util::V_3_MAX_ENCODER_TICKS) + 1;
}
if (fabs(ticksRight) > 0.9 * util::V_3_MAX_ENCODER_TICKS) {
if (std::abs(ticksRight) > 0.9 * util::V_3_MAX_ENCODER_TICKS) {
ticksRight = (ticksRight % util::V_3_MAX_ENCODER_TICKS) + 1;
}

Expand Down Expand Up @@ -373,7 +373,7 @@ namespace create {
min > 59)
return false;

uint8_t cmd[4] = { OC_DATE, day, hour, min };
uint8_t cmd[4] = { OC_DATE, static_cast<uint8_t>(day), hour, min };
return serial->send(cmd, 4);
}

Expand Down

0 comments on commit d75d41c

Please sign in to comment.