Skip to content

Commit 7c514f7

Browse files
committed
integrate
1 parent 4569acf commit 7c514f7

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

MIDAS/src/b2b_interface.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ ErrorCode B2BInterface::init() {
66
return ErrorCode::NoError;
77
}
88

9-
void CameraB2B::update_cam_board_state() {
9+
uint8_t CameraB2B::read() {
1010
#ifdef B2B_I2C
1111
Wire.requestFrom(0x69, 1);
1212
uint8_t res = Wire.read();
13-
cam_board_state = res;
13+
return res;
1414
#endif
15+
16+
return 0xFF;
1517
}
1618

1719
/**

MIDAS/src/b2b_interface.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ struct CameraB2B {
4545
void vmux_set(int cam_select);
4646
void vmux_toggle();
4747

48-
void update_cam_board_state();
49-
uint8_t cam_board_state;
48+
uint8_t read();
5049

5150
private:
5251
void transmit_command(CameraCommand command);

MIDAS/src/systems.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ void handle_tlm_command(TelemetryCommand& command, RocketSystems* arg, FSMState
300300

301301
DECLARE_THREAD(cam, RocketSystems* arg) {
302302
while (true) {
303-
arg->b2b.camera.update_cam_board_state();
303+
arg->rocket_data.camera_state = arg->b2b.camera.read();
304304
THREAD_SLEEP(200);
305305
}
306306
}

0 commit comments

Comments
 (0)