Lines Matching defs:off

418 // @brief turn off motor
1681 int off[3],offh[3],offl[3],off1[3],off2[3];
1763 off[j] = (offh[j]+offl[j])/2;
1764 dev->frontend.set_offset(j, off[j]);
1810 offl[0] = off[0];
1812 offl[ch] = off[ch];
1817 offh[0] = off[0];
1819 offh[ch] = off[ch];
1836 DBG(DBG_info,"%s: acceptable offsets: %d,%d,%d\n", __func__, off[0], off[1], off[2]);
1840 off1[ch] = off[ch];
1854 offl[0] = off[0];
1855 offl[1] = off[0];
1856 offl[2] = off[0];
1863 off[j] = (offh[j]+offl[j])/2;
1864 dev->frontend.set_offset(j, off[j]);
1900 offl[0] = off[0];
1902 offl[ch] = off[ch];
1907 offh[0] = off[0];
1909 offh[ch] = off[ch];
1927 DBG(DBG_info, "%s: acceptable offsets: %d,%d,%d\n", __func__, off[0], off[1], off[2]);
1931 off2[ch] = off[ch];
1955 to get min at off, values are linearly interpolated:
1956 min=real+off*fact
1963 off=(min-min1+off1*(min1-min2)/(off1-off2))/((min1-min2)/(off1-off2))
1965 off=(min*(off1-off2)+min1*off2-off1*min2)/(min1-min2)
1973 off[ch] = 0x0000;
1975 off[ch] = 0xffff;
1978 off[ch] = (mintgt * (off1[ch] - off2[ch]) + min1[ch] * off2[ch] - min2[ch] * off1[ch])/(min1[ch]-min2[ch]);
1980 if (off[ch] > 255) {
1981 off[ch] = 255;
1983 if (off[ch] < 0) {
1984 off[ch] = 0;
1986 dev->frontend.set_offset(ch, off[ch]);
1989 DBG(DBG_info, "%s: final offsets: %d,%d,%d\n", __func__, off[0], off[1], off[2]);
1992 if (off[0] < off[1])
1993 off[0] = off[1];
1994 if (off[0] < off[2])
1995 off[0] = off[2];
1996 dev->frontend.set_offset(0, off[0]);
1997 dev->frontend.set_offset(1, off[0]);
1998 dev->frontend.set_offset(2, off[0]);