Merge branch 'bugFix2' into 'master'
Fixed tardy joystick bug See merge request ACD52832_MasterExample/ACD52832_MasterExampleFW!18
This commit is contained in:
+15501
-15573
File diff suppressed because it is too large
Load Diff
+56
-51
@@ -540,7 +540,8 @@ void joystickTaskFunction(void *arg)
|
||||
};
|
||||
|
||||
BALL_POSITION ballPosition = BALL_POSITION::CENTER;
|
||||
|
||||
BALL_POSITION ballPositionPrev = BALL_POSITION::CENTER;
|
||||
|
||||
vTaskSuspend(NULL);
|
||||
|
||||
while(1)
|
||||
@@ -564,6 +565,7 @@ void joystickTaskFunction(void *arg)
|
||||
xTaskResumeAll();
|
||||
|
||||
}
|
||||
ballPositionPrev = ballPosition;
|
||||
epd.drawImage(joystick1);
|
||||
switch (intSourceRecvSecondary)
|
||||
{
|
||||
@@ -663,60 +665,63 @@ void joystickTaskFunction(void *arg)
|
||||
break;
|
||||
}
|
||||
}
|
||||
vTaskSuspend(menuStateMachineTask);
|
||||
switch (ballPosition)
|
||||
if(ballPositionPrev != ballPosition)
|
||||
{
|
||||
case BALL_POSITION::UP:
|
||||
vTaskSuspend(menuStateMachineTask);
|
||||
switch (ballPosition)
|
||||
{
|
||||
epd.fillCircle(xCoordCenter,
|
||||
yCoordCenter-centerOffset,
|
||||
ballRadius,
|
||||
color);
|
||||
epd.write();
|
||||
break;
|
||||
}
|
||||
case BALL_POSITION::DOWN:
|
||||
{
|
||||
epd.fillCircle(xCoordCenter,
|
||||
yCoordCenter+centerOffset,
|
||||
ballRadius,
|
||||
color);
|
||||
epd.write();
|
||||
break;
|
||||
}
|
||||
case BALL_POSITION::LEFT:
|
||||
{
|
||||
epd.fillCircle(xCoordCenter-centerOffset,
|
||||
yCoordCenter,
|
||||
ballRadius,
|
||||
color);
|
||||
epd.write();
|
||||
break;
|
||||
}
|
||||
case BALL_POSITION::RIGHT:
|
||||
{
|
||||
epd.fillCircle(xCoordCenter+centerOffset,
|
||||
yCoordCenter,
|
||||
ballRadius,
|
||||
color);
|
||||
epd.write();
|
||||
break;
|
||||
}
|
||||
case BALL_POSITION::CENTER:
|
||||
{
|
||||
epd.fillCircle(xCoordCenter,
|
||||
yCoordCenter,
|
||||
ballRadius,
|
||||
color);
|
||||
epd.write();
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
break;
|
||||
case BALL_POSITION::UP:
|
||||
{
|
||||
epd.fillCircle(xCoordCenter,
|
||||
yCoordCenter-centerOffset,
|
||||
ballRadius,
|
||||
color);
|
||||
epd.write();
|
||||
break;
|
||||
}
|
||||
case BALL_POSITION::DOWN:
|
||||
{
|
||||
epd.fillCircle(xCoordCenter,
|
||||
yCoordCenter+centerOffset,
|
||||
ballRadius,
|
||||
color);
|
||||
epd.write();
|
||||
break;
|
||||
}
|
||||
case BALL_POSITION::LEFT:
|
||||
{
|
||||
epd.fillCircle(xCoordCenter-centerOffset,
|
||||
yCoordCenter,
|
||||
ballRadius,
|
||||
color);
|
||||
epd.write();
|
||||
break;
|
||||
}
|
||||
case BALL_POSITION::RIGHT:
|
||||
{
|
||||
epd.fillCircle(xCoordCenter+centerOffset,
|
||||
yCoordCenter,
|
||||
ballRadius,
|
||||
color);
|
||||
epd.write();
|
||||
break;
|
||||
}
|
||||
case BALL_POSITION::CENTER:
|
||||
{
|
||||
epd.fillCircle(xCoordCenter,
|
||||
yCoordCenter,
|
||||
ballRadius,
|
||||
color);
|
||||
epd.write();
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
vTaskResume(menuStateMachineTask);
|
||||
}
|
||||
vTaskResume(menuStateMachineTask);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user