Remove casts to double in SetLEDMode and set pipeline (#906)

* Remove casts to double

* Run wpiformat
This commit is contained in:
Mohammad Durrani
2023-09-16 10:17:28 -04:00
committed by GitHub
parent 9f3a735c59
commit 9e371de1cb

View File

@@ -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());
@@ -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 {