EXPERIMENT / 配套代码
ptz_speed.h
← 返回文章
/* Constant half-step rates. Mechanical limits must be checked under load. */
static inline unsigned int ptz_speed_for_level(unsigned int level)
{
static const unsigned int rates[PTZ_SPEED_LEVEL_MAX] = {100, 200, 300, 400, 500};
if (level < PTZ_SPEED_LEVEL_MIN || level > PTZ_SPEED_LEVEL_MAX)
return 0;
return rates[level - 1];
}