Skip to content

Commit

Permalink
b2b enum fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mpkarpov-ui committed Feb 20, 2025
1 parent e1203dc commit 6068840
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions MIDAS/src/b2b_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ void CameraB2B::vtx_toggle() {
void CameraB2B::camera_on(int cam_index) {
switch (cam_index) {
case 0:
transmit_command(CameraCommand::CAMERA0_ON);
transmit_command(CameraCommand::CAMERA1_ON);
cam_state_[0] = true;
break;
case 1:
transmit_command(CameraCommand::CAMERA1_ON);
transmit_command(CameraCommand::CAMERA2_ON);
cam_state_[1] = true;
break;
default:
Expand All @@ -62,11 +62,11 @@ void CameraB2B::camera_on(int cam_index) {
void CameraB2B::camera_off(int cam_index) {
switch (cam_index) {
case 0:
transmit_command(CameraCommand::CAMERA0_OFF);
transmit_command(CameraCommand::CAMERA1_OFF);
cam_state_[0] = false;
break;
case 1:
transmit_command(CameraCommand::CAMERA1_OFF);
transmit_command(CameraCommand::CAMERA2_OFF);
cam_state_[1] = false;
break;
default:
Expand Down
12 changes: 6 additions & 6 deletions MIDAS/src/b2b_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@


enum class CameraCommand {
CAMERA0_OFF = 0,
CAMERA0_ON = 1,
CAMERA1_OFF = 2,
CAMERA1_ON = 3,
CAMERA1_OFF = 0,
CAMERA1_ON = 1,
CAMERA2_OFF = 2,
CAMERA2_ON = 3,
VTX_OFF = 4,
VTX_ON = 5,
MUX_0 = 6,
MUX_1 = 7
MUX_1 = 6,
MUX_2 = 7
};

struct CameraB2B {
Expand Down

0 comments on commit 6068840

Please sign in to comment.