Rotation function(s) not working in 4.12.7

The issues found when using the Function Manager panel
User avatar
mcallegari
Posts: 4482
Joined: Sun Apr 12, 2015 9:09 am
Location: Italy
Real Name: Massimo Callegari
Contact:

Changelog second row:
"engine: consider EFX fade in"

Since your EFX has a fade in time, that would have to ring a bell. At least IMHO...
Also, infinite fade time doesn't really make any sense. Second bell that should have rang...
orelop
Posts: 6
Joined: Mon Nov 26, 2018 2:55 pm
Real Name:

Hello DJ2MN

Thank you for your help, in fact the problem came from the FadeIn and FadeOut functions with Infinite value.

I don't know why these boxes were checked, but they were probably there from the start of using QLC

I can't explain the fright on my last party when I discovered that my file no longer worked. Fortunately I had a backup Laptop with the old version of QLC !
kenact
Posts: 370
Joined: Thu Apr 23, 2015 6:43 am
Real Name: Ken Coughlin

mcallegari wrote: Thu Sep 28, 2023 11:59 am Changelog second row:
"engine: consider EFX fade in"

Since your EFX has a fade in time, that would have to ring a bell. At least IMHO...
Also, infinite fade time doesn't really make any sense. Second bell that should have rang...
I was looking for a way to send you a PM regarding the issue with Pan Fine & Tilt Fine when fading. I spent 50+ years as a programmer, so I understand logic, but I'm not a C++ program. I asked ChatGPT take a look at the problem. I provided the following specifications:

Start with a 16 bit starting value (Pan is 1st 8 bit, Fine is 2nd), and a 16 bit target.
Have a timer that can be up to 24 hours, but is calculated in milliseconds.
Increment or decrement the starting value by x0001 so that it reaches the target value when the timer expires.
Output the value of the 1st 8 bits (Pan) every time it changes
Output the value of the 2nd 8 bit (Fine) every time it changes.

Again, I'm not a C++ programmer, so I can't really test this code, but I'm fairly certain my logic is correct. I also don't know how efficient this code is, and if it can execute properly if the movement is too much for the fade time allotted. I just hope it can help resolve the Fine issue.

#include <iostream>
#include <bitset>
#include <chrono>
#include <thread>

int main() {
// Specify the starting and ending values
uint16_t startValue = 0;
uint16_t endValue = 0xFFFF;

// Specify the maximum time limit in milliseconds (24 hours)
long long maxTimeMillis = 24 * 60 * 60 * 1000LL; // 24 hours in milliseconds

auto startTime = std::chrono::high_resolution_clock::now();

std::cout << "Incrementing/Decrementing:" << std::endl;

// Set a fixed time step for each iteration
constexpr int timeStepMillis = 10; // Adjust the time step as needed

// Variable to track the direction (1 for increment, -1 for decrement)
int direction = (endValue >= startValue) ? 1 : -1;

// Variables to store the last observed values
uint8_t lastFirst8bits = static_cast<uint8_t>(startValue >> 8);
uint8_t lastSecond8bits = static_cast<uint8_t>(startValue & 0xFF);

for (uint16_t value = startValue; ; value += direction) {
// Extract the 1st 8 bits and 2nd 8 bits
uint8_t first8bits = static_cast<uint8_t>(value >> 8);
uint8_t second8bits = static_cast<uint8_t>(value & 0xFF);

// Output the second 8 bits in every iteration
std::cout << "Decimal: " << static_cast<unsigned>(value)
<< " | 2nd 8 bits: " << std::bitset<8>(second8bits);

// Output the first 8 bits only when they change
if (first8bits != lastFirst8bits) {
std::cout << " | 1st 8 bits: " << std::bitset<8>(first8bits);
// Update the last observed value of the first 8 bits
lastFirst8bits = first8bits;
}

std::cout << std::endl;

// Sleep for the fixed time step
std::this_thread::sleep_for(std::chrono::milliseconds(timeStepMillis));

// Check if the elapsed time exceeds the maximum time limit
auto currentTime = std::chrono::high_resolution_clock::now();
std::chrono::duration<long long, std::milli> elapsedMillis = currentTime - startTime;

if ((direction == 1 && value > endValue) || (direction == -1 && value < endValue) || elapsedMillis.count() >= maxTimeMillis) {
std::cout << "Time limit reached or target value reached. Exiting." << std::endl;
break;
}
}

return 0;
}
Post Reply