Skip to content

Commit

Permalink
Remove casts to double in SetLEDMode and set pipeline (#906)
Browse files Browse the repository at this point in the history
* Remove casts to double

* Run wpiformat
  • Loading branch information
mdurrani808 authored Sep 16, 2023
1 parent 9f3a735 commit 9e371de
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions photon-lib/src/main/native/cpp/photonlib/PhotonCamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,7 @@ void PhotonCamera::TakeOutputSnapshot() {

bool PhotonCamera::GetDriverMode() const { return driverModeSubscriber.Get(); }

void PhotonCamera::SetPipelineIndex(int index) {
pipelineIndexPub.Set(static_cast<double>(index));
}
void PhotonCamera::SetPipelineIndex(int index) { pipelineIndexPub.Set(index); }

int PhotonCamera::GetPipelineIndex() const {
return static_cast<int>(pipelineIndexSub.Get());
Expand All @@ -137,7 +135,7 @@ std::optional<cv::Mat> PhotonCamera::GetCameraMatrix() {
}

void PhotonCamera::SetLEDMode(LEDMode mode) {
ledModePub.Set(static_cast<double>(static_cast<int>(mode)));
ledModePub.Set(static_cast<int>(mode));
}

const std::string_view PhotonCamera::GetCameraName() const {
Expand Down

0 comments on commit 9e371de

Please sign in to comment.