--- dvbstream/tune.c.bero 2003-04-08 19:49:34.000000000 +0200 +++ dvbstream/tune.c 2003-04-08 19:56:14.000000000 +0200 @@ -375,16 +375,16 @@ int pol; fprintf(stderr,"Setting diseqc %d \n",snum); hi_lo = (t==SEC_TONE_ON) ? 1 : 0; - pol = v ? 0:2; + pol = (v==SEC_VOLTAGE_18) ? 2:0; dcmd.msg[0]=0xe0; dcmd.msg[1]=0x10; dcmd.msg[2]=0x38; - dcmd.msg[3] = 0xf0 | ((((snum-1) * 4) & 0x0f) | hi_lo | (pol ? 0 : 2)); + dcmd.msg[3] = 0xf0 | ((((snum-1) * 4) & 0x0f) | hi_lo | pol); dcmd.msg[4]=0x00; dcmd.msg[5]=0x00; dcmd.msg_len=4; - b = (snum / 4) % 2 ? SEC_MINI_B : SEC_MINI_A; + b = (snum & 1) ? SEC_MINI_B : SEC_MINI_A; ioctl(fdf, FE_SET_TONE, SEC_TONE_OFF); ioctl(fdf, FE_SET_VOLTAGE, v);