Beispiel #1
0
/************************************************************************************************
 *功能:	按键2的功能实现,减小oled最后一行的值,DisplayDebug[6].num和DisplayDebug[6].num每次
 *			减小ButtenDisplay.interval,而ButtenDisplay.interval每次减小1。
 *形参:
 *      	无
 *返回:
 *      	无
 */
 void Butten3_IO_ISR()
{
	if(gpio_get(Butten3_PIN) == TurnOn)
	{
		ClosePID();
		Dly_ms(10);
		if(gpio_get(Butten3_PIN) == TurnOn)
		{
			switch(ButtenDisplay.flag)
			{
			case 0:
				DisplayDebug[6].num -= ButtenDisplay.interval;
				break;
			case 1:
				DisplayDebug[7].num -= ButtenDisplay.interval;
				break;
			case 2:
				ButtenDisplay.interval -= 1;
				break;
			default:
				;
			}
		}
		OpenPID();
	}
}
Beispiel #2
0
void V4LHelper::RemoveAllPidFilters()
{
  bool bBudgetMode  = m_nFlags & TUNER_FLAGS_BUDGET;

  if(bBudgetMode)
  {
    // in budget mode we only use PID 0x200,
    // so we can just close the DVR
    CloseDVR();
    Sleep(100);
    OpenDVR();
    return;
  }

  if(m_pidHandles.size() == 0)
    return;

  for(std::map<int, int>::const_iterator itr = m_pidHandles.begin(); itr != m_pidHandles.end(); ++itr)
  {
    ClosePID(itr->first);
  }

  m_pidHandles.clear();

  if(m_pidHandles.size() == 0)
  {
    Sleep(1000);
  }
}
Beispiel #3
0
/*********************************************************************
 *功能:	按键1的功能实现,切换oled最后一行的显示信息
 *形参:
 *      	无
 *返回:
 *      	无
 */
void Butten1_IO_ISR()
{
	if(gpio_get(Butten1_PIN) == TurnOn)
	{
		ClosePID();
		Dly_ms(10);
		if(gpio_get(Butten1_PIN) == TurnOn)
		{
			if(++ButtenDisplay.flag == 3)
			{
				ButtenDisplay.flag = 0;
			}
		}
		OpenPID();
	}
}
Beispiel #4
0
void V4LHelper::RemovePidFilter(int pid)
{
  bool bBudgetMode  = m_nFlags & TUNER_FLAGS_BUDGET;

  if(bBudgetMode)
    return;

  printf("V4LHelper::RemovePidFilter pid %d size %d\n", pid, m_pidHandles.size());

  if(m_pidHandles.size() == 0)
    return;

  CSingleLock lock(m_lock);

  ClosePID(pid);
  m_pidHandles.erase(pid);

  if(m_pidHandles.size() == 0)
  {
    Sleep(1000);
  }
}