14 #include "../../include/kobuki_driver/event_manager.hpp" 15 #include "../../include/kobuki_driver/modules/battery.hpp" 16 #include "../../include/kobuki_driver/packets/core_sensors.hpp" 31 sig_cliff_event.connect(sigslots_namespace + std::string(
"/cliff_event"));
32 sig_wheel_event.connect(sigslots_namespace + std::string(
"/wheel_event"));
33 sig_power_event.connect(sigslots_namespace + std::string(
"/power_event"));
34 sig_input_event.connect(sigslots_namespace + std::string(
"/input_event"));
35 sig_robot_event.connect(sigslots_namespace + std::string(
"/robot_event"));
143 event.bottom = cliff_data[
event.sensor];
154 event.bottom = cliff_data[
event.sensor];
165 event.bottom = cliff_data[
event.sensor];
236 if (battery_last.
level() != battery_new.
level())
239 switch (battery_new.
level())
267 event.
values[0] = new_digital_input&0x0001;
268 event.values[1] = new_digital_input&0x0002;
269 event.values[2] = new_digital_input&0x0004;
270 event.values[3] = new_digital_input&0x0008;
290 event.
state = robot_state;
ecl::Signal< const InputEvent & > sig_input_event
static const uint8_t Button0
ecl::Signal< const ButtonEvent & > sig_button_event
static const uint8_t RightWheel
static const uint8_t Button2
ecl::Signal< const CliffEvent & > sig_cliff_event
static const uint8_t RightCliff
ecl::Signal< const RobotEvent & > sig_robot_event
enum kobuki::BumperEvent::Bumper bumper
void update(const CoreSensors::Data &new_state, const std::vector< uint16_t > &cliff_data)
CoreSensors::Data last_state
static const uint8_t CenterCliff
static const uint8_t LeftCliff
static const uint8_t LeftBumper
static const uint8_t CenterBumper
static const uint8_t LeftWheel
RobotEvent::State last_robot_state
static const uint8_t Button1
enum kobuki::WheelEvent::Wheel wheel
enum kobuki::RobotEvent::State state
enum kobuki::CliffEvent::Sensor sensor
ecl::Signal< const WheelEvent & > sig_wheel_event
ecl::Signal< const BumperEvent & > sig_bumper_event
uint16_t last_digital_input
static const uint8_t RightBumper
void init(const std::string &sigslots_namespace)
ecl::Signal< const PowerEvent & > sig_power_event