hyperion-project / hyperion.ng

The successor to Hyperion aka Hyperion Next Generation
https://hyperion-project.org/
MIT License
3.12k stars 387 forks source link

Smoothing incorrectly disabled when LED status enabled #1709

Open Ajwinarski opened 8 months ago

Ajwinarski commented 8 months ago

Bug report

I have smoothing defaulted to be enabled when LED status is enabled, however, it appears to be on when the LEDs are off and off when the LEDs are on. Smoothing section of the config.json is as follows: "smoothing": { "decay": 1, "dithering": false, "enable": true, "interpolationRate": 25, "time_ms": 150, "type": "linear", "updateDelay": 0, "updateFrequency": 25 }

Gif of bug shown here.

Steps to reproduce

Toggling the LED status. Monitoring the status of smoothing.

What is expected?

Smoothing should be enabled by default.

What is actually happening?

Smoothing is turned off when LEDs turn on.

System

Hyperion Server:

Hyperion Server OS:

Lord-Grey commented 8 months ago

Would you mind sharing a debug log, please?

Ajwinarski commented 8 months ago

Would you mind sharing a debug log, please?

  • Activate Debug log via System-Log
  • Disable the LED instance and Enable the instance to trigger the issue described above
  • Share the Debug log and config via System-Log->Copy log to clipboard

Lines 2048 and 2071 from the config file show that ComponentRegister.cpp:89:setNewComponentState() is enabling smoothing after the TV LEDs are turned off and vice versa when turned on.

Smoothing_Disabling_Summary_Report.json

Lord-Grey commented 8 months ago

Thank you for the Log.

Line 2048 enables Smoothing, as a background effect is started with smoothing configured

2024-03-04T02:15:01.109Z [HYPERION|TV Leds] (DEBUG) (BGEffectHandler.h:130:handlePriorityUpdate()) Start background (color-) effect as it moved in scope
..
2024-03-04T02:15:01.111Z [HYPERION|TV Leds] (INFO) Initial background effect 'Rainbow swirl' started
...
2024-03-04T02:15:01.233Z [SMOOTHING|TV Leds] (DEBUG) (LinearColorSmoothing.cpp:676:selectConfig()) Run Effect with Smoothing enabled
2024-03-04T02:15:01.233Z [COMPONENTREG|TV Leds] (DEBUG) (ComponentRegister.cpp:89:setNewComponentState()) Smoothing: enabled

Line 2071 disables Smoothing, as the background effect is stopped because the V4L input took priority

2024-03-04T02:15:03.782Z [MUXER|TV Leds] (DEBUG) (PriorityMuxer.cpp:178:registerInput()) Register new input 'System/V4L' (V4L2) with priority 240 as inactive
...
2024-03-04T02:15:03.784Z [COMPONENTREG|TV Leds] (DEBUG) (ComponentRegister.cpp:89:setNewComponentState()) Smoothing: disabled
2024-03-04T02:15:03.784Z [HYPERION|TV Leds] (DEBUG) (BGEffectHandler.h:125:handlePriorityUpdate()) Stop background (color-) effect as it moved out of scope
...
2024-03-04T02:15:03.860Z [EFFECTENGINE|TV Leds] (INFO) Effect [Rainbow swirl] finished

Seems I need to check, why the background effects kicks in when the instance is disabled.

Do you remember how you triggered 2024-03-04T02:15:01.058Z [COMPONENTREG|TV Leds] (DEBUG) (ComponentRegister.cpp:114:handleCompStateChangeRequestAll()) Disable Hyperion instance, store current components' state

Via the Suspend or the Idle command? I assume Suspend...