Пример #1
0
void readDataBit() {
	
	int loadingBit = 0;
	
	_delay_us(200);

	loadingBit = (PINA & 0b00000001);

	//SendInteger(loadingBit);
	//SendChar( (char)13 );
	
	if (isLoadingStartArray) {
		loadShiftLeft(startbit, loadingBit, 4);
	}
	
	if (isLoadingAddressArray) {
		loadShiftLeft(addressbit, loadingBit, 8);
		arraySizeCounter++;
	}		
	
	if (isLoadingCmdArray) {
		loadShiftLeft(cmdbit, loadingBit, 4);
		arraySizeCounter++;
	}
	
	if (zero_cross > max_zero_cross && isLoadingStartArray) {
		resetListening();
	}	
	
	// We check to see if we need to switch to address array
	checkArrayStatus();
	zero_cross++;
}
Пример #2
0
void ListeningManager::setDeviceWidgetListening()
{
    for(auto& device : m_model.rootNode())
    {
        resetListening(device);
    }
}
Пример #3
0
void checkSendMessage() {
	if ((compareArray(addressbit, myAddressbit, 8) == 1) || (compareArray(addressbit, publicAddressbit, 8) == 1))
		runCommand();
		
	resetListening();
}