|
direcs
2012-09-30
|
Delivers a initialisation for the robot's circuits. More...
#include <circuit.h>

Public Slots | |
| bool | initCircuit () |
| bool | initCompass () |
| void | setRobotState (bool state) |
| bool | sleep () |
Signals | |
| void | compassState (bool state) |
| void | message (QString text) |
| void | robotState (bool state) |
Public Member Functions | |
| Circuit (InterfaceAvr *i, QMutex *m) | |
| bool | compassConnected () |
| bool | isConnected () |
| ~Circuit () | |
Private Attributes | |
| QString | atmelAnswer |
| QString | atmelCommand |
| bool | circuitState |
| QString | className |
| QString | commandInitCircuit |
| QString | commandInitCompass |
| *re# | |
| QString | commandSleep |
| *cc# | |
| bool | compassCircuitState |
| QString | expectedAtmelAnswer |
| bool | firstInitDone |
| InterfaceAvr * | interface1 |
| QMutex * | mutex |
| this will contain the name of this class at runtime for debug messages | |
Static Private Attributes | |
| static const char | divider = 61 |
| This terminates the serial string for the Atmel controller. 35 = #. | |
| static const unsigned char | INIT = 64 |
| *sl# | |
| static const unsigned char | INITANSWER = 64 |
| static const bool | OFF = false |
| static const bool | ON = true |
| static const char | starter = 42 |
| static const char | terminator = 35 |
| This starts the serial string for the Atmel controller. 42 = *. | |
| Circuit::Circuit | ( | InterfaceAvr * | i, |
| QMutex * | m | ||
| ) |
Definition at line 23 of file circuit.cpp.
| Circuit::~Circuit | ( | ) |
Definition at line 45 of file circuit.cpp.
| bool Circuit::compassConnected | ( | ) |
Definition at line 154 of file circuit.cpp.

|
signal |
This signal emits the 3D compass module state; it checks if the module is connected to the Atmel board. Not in use, at the moment...
| state | can be true or false |

|
slot |
Initialises the robot's circuits. It also checks, if the robot is ON or OFF.
Definition at line 50 of file circuit.cpp.


|
slot |
Initialises the robot's 3D compass. Actually it checks, if the module is connected or not.
Definition at line 100 of file circuit.cpp.

| bool Circuit::isConnected | ( | void | ) |
Definition at line 141 of file circuit.cpp.

|
signal |
Sends a string to the GUI log.
| text | is the message to be emitted |
|
signal |
This signal emits the robot (circuit) state to all connected slots, to tell them if the robot is ON or OFF
| state | can be true or false |

|
slot |
This slots takes the robot (circuit) state, to know if the robot is ON or OFF. When the class knows this, unnecessary communication with the interface can be avoided.
| state | can be ON or OFF |
Definition at line 167 of file circuit.cpp.
|
slot |
Puts the robot's circuits to sleep. This also disables the robot's watchdog!
Definition at line 175 of file circuit.cpp.


|
staticprivate |
|
staticprivate |
|
private |
|
mutableprivate |
|
staticprivate |
|
staticprivate |