@@ -53,7 +53,7 @@ The *Arbiter* contains a list of *SharedCars* and constantly check, in a priorit
...
@@ -53,7 +53,7 @@ The *Arbiter* contains a list of *SharedCars* and constantly check, in a priorit
This will ensure that the behaviors with the highest priority will drive the actual car, if it have any commands for it.
This will ensure that the behaviors with the highest priority will drive the actual car, if it have any commands for it.
### Comparison to Fred Martin
### Comparison to Fred Martin
The *Prioritizing Algorithm* by Fred Martin is written in C and implements the same functionality as the *SharedCar* and *Arbiter* classes. The differences is that in Fred Martins code, forward, backward and stop is controlled by the motor power. That is forward is a positive value, backward is a negative value and stop is zero. In the *SharedCar* the direction must be set explicitly.
The *Prioritizing Algorithm* by Fred Martin is written in C and implements the same functionality as the *SharedCar* and *Arbiter* classes. The differences is that in Fred Martins code, forward, backward and stop is controlled by the motor power. That is, forward is a positive value, backward is a negative value and stop is zero. In the *SharedCar* the direction must be set explicitly.
In Fred Martins code, arrays are preallocated to be able to contain ten processes, whereas in the *Arbiter* an arbitrary number of processes can be added runtime.
In Fred Martins code, arrays are preallocated to be able to contain ten processes, whereas in the *Arbiter* an arbitrary number of processes can be added runtime.