Skip to content
This repository has been archived by the owner on Mar 3, 2019. It is now read-only.

Commit

Permalink
La funny action est faite par le LL
Browse files Browse the repository at this point in the history
  • Loading branch information
PFGimenez committed May 24, 2017
1 parent a3d115a commit 0a7f042
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 33 deletions.
2 changes: 1 addition & 1 deletion pc/src/config/ConfigInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public enum ConfigInfo
IMPRECISION_MAX_ORIENTATION(0.1), // quelle imprecision maximale sur l'angle
// du robot peut-on attendre (en
// radians)
TAILLE_BUFFER_RECALAGE(20), // combien de mesures sont nécessaires pour
TAILLE_BUFFER_RECALAGE(50), // combien de mesures sont nécessaires pour
// obtenir une correction de recalage
PEREMPTION_CORRECTION(100), // temps maximal entre deux mesures de
// correction au sein d'un même buffer (en ms)
Expand Down
2 changes: 1 addition & 1 deletion pc/src/pathfinding/chemin/CheminPathfinding.java
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ public synchronized boolean isArrived()
*
* @return
*/
public boolean isEmpty()
public synchronized boolean isEmpty()
{
return empty;
}
Expand Down
13 changes: 0 additions & 13 deletions pc/src/robot/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -199,19 +199,6 @@ public void rearmeAutreCote() throws InterruptedException, ActionneurException

public abstract Ticket traverseBascule() throws InterruptedException, ActionneurException;

public void funnyAction() throws InterruptedException
{
try
{
bloque("funnyAction");
}
catch(ActionneurException e)
{
log.critical(e);
// impossible
}
}

/**
* On est sûr que le filet est vide
*/
Expand Down
13 changes: 0 additions & 13 deletions pc/src/serie/BufferOutgoingOrder.java
Original file line number Diff line number Diff line change
Expand Up @@ -232,19 +232,6 @@ public synchronized Ticket ouvreFilet()
return t;
}

/**
* Active la funny action
*
* @return
*/
public synchronized Ticket funnyAction()
{
Ticket t = new Ticket();
bufferBassePriorite.add(new Order(OutOrder.FUNNY_ACTION, t));
notify();
return t;
}

/**
* Verrouille le filet
*/
Expand Down
1 change: 0 additions & 1 deletion pc/src/serie/SerialProtocol.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ public enum OutOrder
REARM_LEFT_SIDE(0x44, Type.LONG),
EJECT_RIGHT_SIDE(0x45, Type.LONG),
REARM_RIGHT_SIDE(0x46, Type.LONG),
FUNNY_ACTION(0x47, Type.LONG),
LOCK_NET(0x48, Type.LONG),
SCAN(0x49, Type.LONG),
CLOSE_NET_FORCE(0x4A, Type.LONG),
Expand Down
1 change: 0 additions & 1 deletion pc/src/tests/lowlevel/JUnit_Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ public void test_actionneurs() throws Exception
robot.fermeFilet();
robot.verrouilleFilet();
robot.traverseBascule();
robot.funnyAction();
}

@Test
Expand Down
2 changes: 0 additions & 2 deletions pc/src/tests/lowlevel/JUnit_Serie.java
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,5 @@ public void test_actionneurs() throws Exception
data.fermeFiletForce();
Thread.sleep(2000);
data.traverseBascule();
Thread.sleep(2000);
data.funnyAction();
}
}
1 change: 0 additions & 1 deletion pc/src/threads/serie/ThreadSerialInputCoucheOrdre.java
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ else if(paquet.origine == OutOrder.START_MATCH_CHRONO)
else
{
paquet.ticket.set(InOrder.MATCH_FINI);
robot.funnyAction();
// On arrête le thread principal
container.interruptWithCodeError(ErrorCode.END_OF_MATCH);
}
Expand Down

0 comments on commit 0a7f042

Please sign in to comment.