Пример #1
0
/**
 * \brief Initializes the real time system
 */
int main(void) {

	//Turn on wifi hotspot, id "ChicoTheStalker"
	portENABLE_INTERRUPTS();

	// Initialize USART for WiFi and LCD
	initializeUSART();

	gs_initialize_module(USART_2, BAUD_RATE_9600, USART_0, BAUD_RATE_115200);
	gs_set_wireless_ssid("ChicoTheStalker");
	gs_activate_wireless_connection();

	/* Web server config */
	configure_web_page("ChicoTheStalker", "~~ Control Interface ~~", HTML_DROPDOWN_LIST);

	// Switching modes
	add_element_choice('A', "Attachment Mode");
	add_element_choice('C', "Command Mode");

	// Command mode options
	add_element_choice('0', "Stop");
	add_element_choice('1', "Forward");
	add_element_choice('2', "Backward");
	add_element_choice('3', "Rotate Left");
	add_element_choice('4', "Rotate Right");
	add_element_choice('5', "Show Temperature");
	add_element_choice('6', "Show Distance");
	start_web_server();

	// initialize motion
	motion_init();

	// Initialize thermal sensor
	initializeSensor();

	// Declare tasks
	xTaskCreate(handleHttpRequestsTask, (const portCHAR *)"Handle server requests", 800, NULL /* parameters */,0, &taskHandles[0]);

	currentCommand = COMMAND_MODE;
	display("Command mode", "Wait for cmds.");

	vTaskStartScheduler();

	displayToTerminal("\r\n\n\nGoodbye... no space for idle task!\r\n"); // Doh, so we're dead...
}
Пример #2
0
// Initialize
void Kinect::initialize()
{
    cv::setUseOptimized( true );

    // Initialize Sensor
    initializeSensor();

    // Initialize Multi Source
    initializeMultiSource();

    // Initialize Color
    initializeColor();

    // Initialize Depth
    initializeDepth();

    // Wait a Few Seconds until begins to Retrieve Data from Sensor ( about 2000-[ms] )
    std::this_thread::sleep_for( std::chrono::seconds( 2 ) );
}