kopia lustrzana https://gitlab.com/sane-project/backends
genesys: Don't try to turn off XPA lamp when shutting down regular lamp
rodzic
2b584095ad
commit
b78ea29130
|
@ -143,17 +143,7 @@ void CommandSetCommon::set_xpa_lamp_power(Genesys_Device& dev, bool set) const
|
|||
}
|
||||
}
|
||||
|
||||
// BUG: we're currently calling the function in shut down path of regular lamp
|
||||
if (set) {
|
||||
throw SaneException("Unexpected code path entered");
|
||||
}
|
||||
|
||||
GenesysRegisterSettingSet regs = {
|
||||
{ 0xa6, 0x40, 0x70 },
|
||||
};
|
||||
apply_reg_settings_to_device(dev, regs);
|
||||
// TODO: throw exception when we're only calling this function in error return path
|
||||
// throw SaneException("Could not find XPA lamp settings");
|
||||
throw SaneException("Could not find XPA lamp settings");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1550,9 +1550,7 @@ void CommandSetGl843::end_scan(Genesys_Device* dev, Genesys_Register_Set* reg,
|
|||
// post scan gpio
|
||||
dev->interface->write_register(0x7e, 0x00);
|
||||
|
||||
// turn off XPA lamp if needed
|
||||
// BUG: the if condition below probably shouldn't be enabled when XPA is off
|
||||
if (reg->state.is_xpa_on || reg->state.is_lamp_on) {
|
||||
if (reg->state.is_xpa_on) {
|
||||
dev->cmd_set->set_xpa_lamp_power(*dev, false);
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue