Ejemplo n.º 1
0
bool ReactiveLayer::updateModule()
{
    cout<<".";

    handleSalutation(someonePresent);
    physicalInteraction = handleTactile();
    updateAllostatic();
    updateEmotions();

    return true;
}
Ejemplo n.º 2
0
bool AllostaticController::updateModule()
{
    for(std::map<string, AllostaticDrive>::iterator it=allostaticDrives.begin(); it!=allostaticDrives.end(); ++it) {
        if (bool(it->second.inputSensationPort->read()->get(0).asInt())) {
            yDebug() << "Sensation ON";
            it->second.update(SENSATION_ON);
        } else {
            yDebug() << "Sensation OFF";
            it->second.update(SENSATION_OFF);
        }
    }

    updateAllostatic();

    return true;
}