BatteryMonitorBehavior Class Reference#include <BatteryMonitorBehavior.h>
Inheritance diagram for BatteryMonitorBehavior:
[legend]List of all members.
Detailed Description
A background behavior which will monitor the power level and flip the ears when appropriate on a 210, or blink the headlight if a 220.
Think of this as a simple example class. For exercise, try using a MotionSequenceMC instead of switching the ears back manually using a PostureMC
Definition at line 20 of file BatteryMonitorBehavior.h.
Constructor & Destructor Documentation
BatteryMonitorBehavior::BatteryMonitorBehavior |
( |
|
) |
[inline] |
|
Member Function Documentation
unsigned int BatteryMonitorBehavior::calcFlipDelay |
( |
|
) |
[inline, protected] |
|
|
makes the ears flip more rapidly as power declines. Flips back and forth once every 15 seconds at 15%, down to flipping constantly at 5%.
Definition at line 125 of file BatteryMonitorBehavior.h.
Referenced by processEvent(). |
virtual void BatteryMonitorBehavior::DoStart |
( |
|
) |
[inline, virtual] |
|
virtual void BatteryMonitorBehavior::DoStop |
( |
|
) |
[inline, virtual] |
|
std::string BatteryMonitorBehavior::getClassDescription |
( |
|
) |
[inline, static] |
|
|
Gives a short description of what this class of behaviors does... you should override this (but don't have to).
Reimplemented from BehaviorBase.
Definition at line 97 of file BatteryMonitorBehavior.h. |
virtual std::string BatteryMonitorBehavior::getName |
( |
|
) |
const [inline, virtual] |
|
virtual void BatteryMonitorBehavior::processEvent |
( |
const EventBase & |
event |
) |
[inline, virtual] |
|
void BatteryMonitorBehavior::setFlipper |
( |
bool |
set |
) |
[inline, protected] |
|
bool BatteryMonitorBehavior::shouldWarn |
( |
|
) |
[inline, static] |
|
|
returns true if the warning should be active (power remaining less than high_power_p, no external power, but also checks that a power update has been received)
Definition at line 100 of file BatteryMonitorBehavior.h.
Referenced by DoStart(), and processEvent(). |
void BatteryMonitorBehavior::startWarning |
( |
|
) |
[inline, protected] |
|
void BatteryMonitorBehavior::stopWarning |
( |
|
) |
[inline, protected] |
|
Member Data Documentation
The documentation for this class was generated from the following file:
|