Example #1
0
static void UpdateUnits(void const *argument)  //Prevent missing status
{
	osDelay(2000);
	std::map<std::uint16_t, boost::shared_ptr<ShelfUnit> > &unitList = unitManager.GetList();
	//CanEx->SyncAll(SYNC_DATA, CANExtended::Trigger);
	for(UnitManager::UnitIterator it = unitList.begin(); it!= unitList.end(); ++it)
	{
		if (!it->second->IsBusy())
		{
			CanEx->Sync(it->second->DeviceId, SYNC_DATA, CANExtended::Trigger);
			osDelay(20);
		}
	}
	while(1)
	{
		if (ethEngine.get()!=NULL)
			ethEngine->InventoryRfid();
		osDelay(100);
	}
}