From 302276dc1b90cfc972fb726ca94a23b18f4b0088 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Tue, 1 Feb 2022 15:24:35 +0100 Subject: New upstream version 1.1.1 --- backend/genesys/gl843.cpp | 35 ++++++++++++++--------------------- 1 file changed, 14 insertions(+), 21 deletions(-) (limited to 'backend/genesys/gl843.cpp') diff --git a/backend/genesys/gl843.cpp b/backend/genesys/gl843.cpp index e768ac0..6180bf9 100644 --- a/backend/genesys/gl843.cpp +++ b/backend/genesys/gl843.cpp @@ -17,27 +17,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . - - As a special exception, the authors of SANE give permission for - additional uses of the libraries contained in this release of SANE. - - The exception is that, if you link a SANE library with other files - to produce an executable, this does not by itself cause the - resulting executable to be covered by the GNU General Public - License. Your use of that executable is in no way restricted on - account of linking the SANE library code into it. - - This exception does not, however, invalidate any other reasons why - the executable file might be covered by the GNU General Public - License. - - If you submit changes to SANE to the maintainers to be included in - a subsequent release, you agree by submitting the changes that - those changes may be distributed with this exception intact. - - If you write modifications of your own for SANE, it is your choice - whether to permit this exception to apply to your modifications. - If you do not wish that, delete this exception notice. */ #define DEBUG_DECLARE_ONLY @@ -1122,6 +1101,8 @@ ScanSession CommandSetGl843::calculate_scan_session(const Genesys_Device* dev, session.params.scan_method = settings.scan_method; session.params.scan_mode = settings.scan_mode; session.params.color_filter = settings.color_filter; + session.params.contrast_adjustment = settings.contrast; + session.params.brightness_adjustment = settings.brightness; session.params.flags = flags; compute_session(dev, session, sensor); @@ -1240,6 +1221,7 @@ void CommandSetGl843::begin_scan(Genesys_Device* dev, const Genesys_Sensor& sens dev->interface->write_register(0x7e, 0x04); break; case GpioId::G4050: + case GpioId::G4010: dev->interface->write_register(REG_0xA7, 0xfe); dev->interface->write_register(REG_0xA8, 0x3e); dev->interface->write_register(REG_0xA9, 0x06); @@ -1432,6 +1414,8 @@ void CommandSetGl843::init_regs_for_shading(Genesys_Device* dev, const Genesys_S session.params.scan_method = dev->settings.scan_method; session.params.scan_mode = dev->settings.scan_mode; session.params.color_filter = dev->settings.color_filter; + session.params.contrast_adjustment = dev->settings.contrast; + session.params.brightness_adjustment = dev->settings.brightness; session.params.flags = flags; compute_session(dev, session, calib_sensor); @@ -1535,6 +1519,8 @@ void CommandSetGl843::init_regs_for_warmup(Genesys_Device* dev, const Genesys_Se session.params.scan_method = dev->settings.scan_method; session.params.scan_mode = ScanColorMode::COLOR_SINGLE_PASS; session.params.color_filter = dev->settings.color_filter; + session.params.contrast_adjustment = 0; + session.params.brightness_adjustment = 0; session.params.flags = flags; compute_session(dev, session, calib_sensor); @@ -1680,6 +1666,7 @@ void CommandSetGl843::update_hardware_sensors(Genesys_Scanner* s) const */ uint8_t val = s->dev->interface->read_register(REG_0x6D); + DBG(DBG_io, "%s: read buttons_gpio value=0x%x\n", __func__, (int)val); switch (s->dev->model->gpio_id) { @@ -1692,6 +1679,12 @@ void CommandSetGl843::update_hardware_sensors(Genesys_Scanner* s) const s->buttons[BUTTON_EMAIL_SW].write((val & 0x04) == 0); s->buttons[BUTTON_COPY_SW].write((val & 0x08) == 0); break; + case GpioId::G4010: + s->buttons[BUTTON_FILE_SW].write((val & 0x01) == 0); + s->buttons[BUTTON_COPY_SW].write((val & 0x04) == 0); + s->buttons[BUTTON_TRANSP_SW].write((val & 0x40) == 0); + s->buttons[BUTTON_SCAN_SW].write((val & 0x08) == 0); + break; case GpioId::CANON_4400F: case GpioId::CANON_8400F: default: -- cgit v1.2.3