コード例 #1
0
// --- This module was pinged ---
void pingOK(uint16_t originID)
{
	
		//HAL_Delay(routeDist[originID-1]*10 + rand()%10);
	
		message[0] = _MesID_pingOK;		// pingOK command
		mesSend(myID, originID);			

		nblkBlink(200);
}
コード例 #2
0
// --- This module was sampled ---
void samOK(uint16_t originID)
{	
		uint16_t temp = 0;
	
		//HAL_Delay(routeDist[originID-1]*10 + rand()%10);
		temp = samplePD();
	
		message[0] = _MesID_samOK;		// samOK command
		message[1] = (uint8_t)temp; 				// Low Byte
		message[2] = (uint8_t)(temp>>8);  	// High Byte
		mesSend(myID, originID);	
}
コード例 #3
0
// --- This module was read ---
void readOK(uint16_t originID, uint8_t led)
{	
		uint16_t temp = 0;
	
		//HAL_Delay(routeDist[originID-1]*10 + rand()%10);
		temp = samplePD();
	
		message[0] = _MesID_readOK;		// readOK command
		message[1] = (uint8_t)temp; 				// Low Byte
		message[2] = (uint8_t)(temp>>8);  	// High Byte
		mesSend(myID, originID);	

		if (led)
				LED_toggle();
}
コード例 #4
0
ファイル: mainNode.cpp プロジェクト: rsbGroup1/rc_rsd
void orderDone()
{
    // Log
    printConsole("Order done..");
    printConsole("Waiting for new order!");

    // Tell MES Server
    mesSend("Ok");

    // Reset
    boost::unique_lock<boost::mutex> lock(_orderMutex);
    _mesOrder = false;

    // Reset
    boost::unique_lock<boost::mutex> lock2(_startConveyerMutex);
    _startConveyer = false;

    // Reset
    stopConveyerBelt();
}