fix missing loop

This commit is contained in:
Alwin Berger 2022-02-15 00:23:15 +01:00
parent cc6a51574b
commit 45dec7fb56

View File

@ -172,14 +172,19 @@ static unsigned char get_average( void )
static void prvSamplerTask( void * pvParameters ) static void prvSamplerTask( void * pvParameters )
{ {
while (1)
{
for (int i=0; i<WORK_SET_SIZE; i++) for (int i=0; i<WORK_SET_SIZE; i++)
{WORK_SET[i]=fuzz_input_next();} {WORK_SET[i]=fuzz_input_next();}
xTaskNotifyGive(xReplA); xTaskNotifyGive(xReplA);
xTaskNotifyGive(xReplB); xTaskNotifyGive(xReplB);
}
} }
volatile char A_WILL_FAIL = 1; volatile char A_WILL_FAIL = 1;
static void prvReplicaA( void * pvParameters ) static void prvReplicaA( void * pvParameters )
{ {
while (1)
{
ulTaskNotifyTake(pdTRUE,portMAX_DELAY); ulTaskNotifyTake(pdTRUE,portMAX_DELAY);
unsigned char tmp = get_average(); unsigned char tmp = get_average();
if (tmp % 11 == 0 && A_WILL_FAIL) if (tmp % 11 == 0 && A_WILL_FAIL)
@ -189,9 +194,12 @@ static void prvReplicaA( void * pvParameters )
} }
int sum = count_up(tmp); int sum = count_up(tmp);
xQueueSend( xQueueOutputA, &sum, portMAX_DELAY ); xQueueSend( xQueueOutputA, &sum, portMAX_DELAY );
}
} }
static void prvReplicaB( void * pvParameters ) static void prvReplicaB( void * pvParameters )
{ {
while (1)
{
ulTaskNotifyTake(pdTRUE,portMAX_DELAY); ulTaskNotifyTake(pdTRUE,portMAX_DELAY);
unsigned char tmp = get_average(); unsigned char tmp = get_average();
if (tmp % 12 == 0) if (tmp % 12 == 0)
@ -200,13 +208,17 @@ static void prvReplicaB( void * pvParameters )
} }
int sum = count_up(tmp); int sum = count_up(tmp);
xQueueSend( xQueueOutputB, &sum, portMAX_DELAY ); xQueueSend( xQueueOutputB, &sum, portMAX_DELAY );
}
} }
static void prvReplicaC( void * pvParameters ) static void prvReplicaC( void * pvParameters )
{ {
while (1)
{
ulTaskNotifyTake(pdTRUE,portMAX_DELAY); ulTaskNotifyTake(pdTRUE,portMAX_DELAY);
unsigned char tmp = get_average(); unsigned char tmp = get_average();
int sum = count_up(tmp); int sum = count_up(tmp);
xQueueSend( xQueueOutputC, &sum, portMAX_DELAY ); xQueueSend( xQueueOutputC, &sum, portMAX_DELAY );
}
} }
static void prvVoterTask( void * pvParameters ) static void prvVoterTask( void * pvParameters )
{ {