just a minor thing. I was following the examples in chapter 7 and noticed that the Autopilot is missing in text and code. For Ch 7 it is sufficient to create it with:
class AutoPilot extends Actor {
def receive = emptyBehavior
}
Also, perhaps I missed using the PilotProvider in the source code, but my understanding was that it should appear in the Plane construction. I have changed the example slightly to:
class Plane extends Actor with ActorLogging with PilotProvider {
import Plane._ import Altimeter._
val config = context.system.settings.config val altimeter = context.actorOf(Props(Altimeter()), "altimeter") val controls = context.actorOf(Props(new ControlSurfaces(altimeter)), "controls")
val pilot = context.actorOf(Props(createPilot), config.getString("zzz.akka.avionics.flightcrew.pilotName")) val copilot = context.actorOf(Props(createCopilot), config.getString("zzz.akka.avionics.flightcrew.copilotName")) val autopilot = context.actorOf(Props(createAutopilot), "AutoPilot")
val flightAttendant = context.actorOf(Props(LeadFlightAttendant()), config.getString("zzz.akka.avionics.flightcrew.leadAttendantName"))