Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPO saved rising/falling configuration does not correctly recall settings at startup #305

Closed
amwtech opened this issue Jan 20, 2023 · 3 comments
Labels

Comments

@amwtech
Copy link
Contributor

amwtech commented Jan 20, 2023

Problem observed in client versions 2.0.9 and 2.2

This problem shows when trying to use the GPO widget to pulse ouput 1, which does not react. Higher numbered outputs do switch correctly. Opening the configuration and changing the rising/falling status, for example swap the value, then swap again enables GPO 1 to respond to the widget until the client is restarted.

Configuring any output to have the opposite rising/falling state relative to the other outputs then restarting the client shows an offset of +1 output for the rising/falling state change. Looking at the database table with DB Browser for SQlite shows the configuration is stored in the correct lines of the table.

Investigation of the client code shows the internal GPO numbering is zero-based (eg 0 to 7), an offset of +1 is added to the GPO number when storing into the database. This offset is not removed when the config is recalled. The code error is in file src/Core/DatabaseManager.cpp. The code line numbers differ for the two clients, and the corrected lines are shown below.

Client version 2.0.9
Line 1041 is:
models.push_back(GpoPortModel(sql.value(0).toInt(), sql.value(1).toInt() == 1, sql.value(2).toInt()));

It should be
models.push_back(GpoPortModel(sql.value(0).toInt() - 1, sql.value(1).toInt() == 1, sql.value(2).toInt()));

Client 2.2
Line 1050 is:
models.push_back(GpoPortModel(sql.value("Id").toInt(),

It should be:
models.push_back(GpoPortModel(sql.value("Id").toInt() - 1,

@Julusian Julusian added the bug label Dec 13, 2023
Julusian added a commit that referenced this issue Dec 14, 2023
@Julusian
Copy link
Member

Fix applied in c79c5ff
I havent tested it, hopefully it still works

@amwtech
Copy link
Contributor Author

amwtech commented Dec 18, 2023

Tested on Mac and Windows client build. Operates correctly.

@Julusian
Copy link
Member

I should also add that it looked like GpiPortModel had the same bug, so I applied the same fix there

inkvolcano added a commit to inkvolcano/client that referenced this issue Sep 22, 2024
commit 73683a4
Author: ServiusHack <[email protected]>
Date:   Tue Jun 11 13:30:07 2024 +0200

    Fix malformed color command CasparCG#293 (CasparCG#314)

commit bb65df8
Author: ServiusHack <[email protected]>
Date:   Tue Jun 11 09:11:31 2024 +0200

    chore: Document Qt requirements (CasparCG#313)

commit e0642dc
Author: Julian Waller <[email protected]>
Date:   Wed Apr 17 17:43:28 2024 +0100

    chore: update github workflows

commit 8d29b4f
Author: Julian Waller <[email protected]>
Date:   Wed Mar 6 09:52:00 2024 +0000

    fix: add missing formats to sql schema

commit 6d74aa3
Author: Julian Waller <[email protected]>
Date:   Wed Feb 21 17:50:26 2024 +0000

    fix: clip time not showing CasparCG/server#1521

commit 028261f
Author: Julian Waller <[email protected]>
Date:   Wed Feb 21 17:27:47 2024 +0000

    fix: target dropdown showing empty when unknown item was selected

commit 58e2267
Author: Julian Waller <[email protected]>
Date:   Tue Jan 9 21:56:41 2024 +0000

    fix: typo in CasparCG#310

commit 5118b0a
Author: Julian Waller <[email protected]>
Date:   Tue Jan 9 21:43:11 2024 +0000

    fix: typo in CasparCG#310

commit 43fab80
Merge: 21cbf4b e128c87
Author: Julian Waller <[email protected]>
Date:   Tue Jan 9 21:35:04 2024 +0000

    Merge pull request CasparCG#310 from amwtech/main

commit 21cbf4b
Author: Julian Waller <[email protected]>
Date:   Tue Jan 9 21:10:30 2024 +0000

    chore: macos code signing

commit e128c87
Author: amwtech <[email protected]>
Date:   Sun Jan 7 15:34:11 2024 +0000

    Add files via upload

commit 67a5c58
Author: Julian Waller <[email protected]>
Date:   Thu Dec 14 00:00:15 2023 +0000

    fix: Playout Command Pause or Resume does not operate CasparCG#301

commit cb28e23
Author: Julian Waller <[email protected]>
Date:   Wed Dec 13 23:58:45 2023 +0000

    fix: OSC control of client Pause/Resume does not function CasparCG#304

commit c79c5ff
Author: Julian Waller <[email protected]>
Date:   Wed Dec 13 23:55:55 2023 +0000

    fix: GPO saved rising/falling configuration does not correctly recall settings at startup CasparCG#305

commit df81415
Author: Julian Waller <[email protected]>
Date:   Wed Dec 13 23:06:15 2023 +0000

    feat: qt6 and update build tooling CasparCG#307

commit 5b5743a
Author: Julian Waller <[email protected]>
Date:   Wed Dec 13 23:21:42 2023 +0000

    wip: delete committed libraries and binaries
inkvolcano added a commit to inkvolcano/client that referenced this issue Sep 23, 2024
commit 73683a4
Author: ServiusHack <[email protected]>
Date:   Tue Jun 11 13:30:07 2024 +0200

    Fix malformed color command CasparCG#293 (CasparCG#314)

commit bb65df8
Author: ServiusHack <[email protected]>
Date:   Tue Jun 11 09:11:31 2024 +0200

    chore: Document Qt requirements (CasparCG#313)

commit e0642dc
Author: Julian Waller <[email protected]>
Date:   Wed Apr 17 17:43:28 2024 +0100

    chore: update github workflows

commit 8d29b4f
Author: Julian Waller <[email protected]>
Date:   Wed Mar 6 09:52:00 2024 +0000

    fix: add missing formats to sql schema

commit 6d74aa3
Author: Julian Waller <[email protected]>
Date:   Wed Feb 21 17:50:26 2024 +0000

    fix: clip time not showing CasparCG/server#1521

commit 028261f
Author: Julian Waller <[email protected]>
Date:   Wed Feb 21 17:27:47 2024 +0000

    fix: target dropdown showing empty when unknown item was selected

commit 58e2267
Author: Julian Waller <[email protected]>
Date:   Tue Jan 9 21:56:41 2024 +0000

    fix: typo in CasparCG#310

commit 5118b0a
Author: Julian Waller <[email protected]>
Date:   Tue Jan 9 21:43:11 2024 +0000

    fix: typo in CasparCG#310

commit 43fab80
Merge: 21cbf4b e128c87
Author: Julian Waller <[email protected]>
Date:   Tue Jan 9 21:35:04 2024 +0000

    Merge pull request CasparCG#310 from amwtech/main

commit 21cbf4b
Author: Julian Waller <[email protected]>
Date:   Tue Jan 9 21:10:30 2024 +0000

    chore: macos code signing

commit e128c87
Author: amwtech <[email protected]>
Date:   Sun Jan 7 15:34:11 2024 +0000

    Add files via upload

commit 67a5c58
Author: Julian Waller <[email protected]>
Date:   Thu Dec 14 00:00:15 2023 +0000

    fix: Playout Command Pause or Resume does not operate CasparCG#301

commit cb28e23
Author: Julian Waller <[email protected]>
Date:   Wed Dec 13 23:58:45 2023 +0000

    fix: OSC control of client Pause/Resume does not function CasparCG#304

commit c79c5ff
Author: Julian Waller <[email protected]>
Date:   Wed Dec 13 23:55:55 2023 +0000

    fix: GPO saved rising/falling configuration does not correctly recall settings at startup CasparCG#305

commit df81415
Author: Julian Waller <[email protected]>
Date:   Wed Dec 13 23:06:15 2023 +0000

    feat: qt6 and update build tooling CasparCG#307

commit 5b5743a
Author: Julian Waller <[email protected]>
Date:   Wed Dec 13 23:21:42 2023 +0000

    wip: delete committed libraries and binaries
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants