#include "riadenie.h"
#include "printf-stdarg.h"
#include "FreeRTOS.h"
#include "task.h"
#include "queue.h"
#include "kom_modul.h"

void vStartControlTask(unsigned char priority) {

	xTaskCreate(vTaskControl,"Control",100,NULL,priority,NULL);

}

void vTaskControl(void *pvParameters) {
	char buffer[sizeQueue];
	uint8 i=0;
	LCD_Clear();
	LCD_PutCenterString(0,"Prilozte Kartu!");
	for (;;) {
		for(i=0;i<sizeQueue;i++){
			buffer[i]=0;
		}
		(void) xQueueReceive(komInSocketQueue,buffer,portMAX_DELAY);
		xprintf("%s",buffer)
		;

		buffer[strlen(buffer)-2]='\0';
		LCD_Clear();
		LCD_PutString(0,buffer);
	}

}
