Commit da0b0d70 authored by erik's avatar erik

fixing analog inputs with intelligent extension

parent 86d1c3f6
......@@ -1019,12 +1019,18 @@ static void *FtThread(FT_HANDLE hFt)
area->AVS2 |= (in[25] & 0xC) << 6;
area->AVS3 |= (in[25] & 0x30) << 4;
// 26...42
if (hFt->type == FT_INTELLIGENT_IF || hFt->type == FT_INTELLIGENT_IF_SLAVE) {
if (hFt->type == FT_INTELLIGENT_IF) {
if (i % hFt->analogcycle == 0) { // EX
area->AX = in[2] | (in[1]<<8);
} else if (i % hFt->analogcycle == 1) { // EY
area->AY = in[2] | (in[1]<<8);
}
} else if (hFt->type == FT_INTELLIGENT_IF_SLAVE) {
if (i % hFt->analogcycle == 0) { // EX
area->AX = in[3] | (in[2]<<8);
} else if (i % hFt->analogcycle == 1) { // EY
area->AY = in[3] | (in[2]<<8);
}
}
sem_post(&hFt->lock);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment