Skip to content

Commit

Permalink
Add gain and offset settings as per astrogen1000 patch
Browse files Browse the repository at this point in the history
  • Loading branch information
knro committed Apr 13, 2021
1 parent e228498 commit 1e7c915
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions indi-dsi/DsiDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -726,9 +726,14 @@ int DSI::Device::startExposure(int howlong, int gain, int offs)
{
status = command(DeviceCommand::SET_VDD_MODE, VddMode::AUTO.value());
}
status = command(DeviceCommand::SET_GAIN, 0);
if (log_commands)
std::cerr << "Gain = " << gain << " Offset = " << offs << std::endl;

// status = command(DeviceCommand::SET_GAIN, 0);
status = command(DeviceCommand::SET_GAIN, gain);
// status = command(DeviceCommand::GET_READOUT_MODE);
status = command(DeviceCommand::SET_OFFSET, 0x0ff);
//status = command(DeviceCommand::SET_OFFSET, 0x0ff);
status = command(DeviceCommand::SET_OFFSET, offs);
status = command(DeviceCommand::SET_FLUSH_MODE, FlushMode::CONTINUOUS.value());
status = command(DeviceCommand::GET_READOUT_MODE);
status = command(DeviceCommand::GET_EXP_TIME);
Expand Down

0 comments on commit 1e7c915

Please sign in to comment.