-#include "ortedisplay.h"
-#include <orte.h>
-#include <roboorte_robottype.h>
+#include "ortesignals.h"
-#include <stdio.h>
-#include <robottype.h>
-
-#include "display_orte.h"
-
-#include "promene.h"
-
-
-Ortedisplay::Ortedisplay()
+OrteSignals::OrteSignals()
{
createOrte();
}
-void Ortedisplay::createOrte()
+void OrteSignals::createOrte()
{
orte.strength = 1;
robottype_roboorte_init(&orte); //kontrola uspechu ?
//subscribers
- robottype_subscriber_odo_data_create(&orte, rcv_odo_data_cb, this); //
- robottype_subscriber_motion_status_create(&orte, rcv_motion_status_cb, this);//
- robottype_subscriber_vidle_status_create(&orte, rcv_vidle_status_cb, this); //
- robottype_subscriber_pwr_voltage_create(&orte, rcv_pwr_voltage_cb, this); //
- robottype_subscriber_est_pos_best_create(&orte, rcv_est_pos_best_cb, this); //
- robottype_subscriber_hokuyo_scan_create(&orte, rcv_hokuyo_scan_cb, this); //
- robottype_subscriber_camera_result_create(&orte, rcv_camera_result_cb, &orte);
- robottype_subscriber_fsm_main_create(&orte, rcv_fsm_main_cb, this); //
- robottype_subscriber_fsm_act_create(&orte, rcv_fsm_act_cb, this); //
- robottype_subscriber_fsm_motion_create(&orte, rcv_fsm_motion_cb, this); //
- robottype_subscriber_robot_cmd_create(&orte, rcv_robot_cmd_cb, this); //
- robottype_subscriber_robot_switches_create(&orte, rcv_robot_swicthes_cb, this);//
+ robottype_subscriber_odo_data_create(&orte, rcv_odo_data_cb, this);
+ robottype_subscriber_motion_status_create(&orte, rcv_motion_status_cb, this);
+ robottype_subscriber_vidle_status_create(&orte, rcv_vidle_status_cb, this);
+ robottype_subscriber_pwr_voltage_create(&orte, rcv_pwr_voltage_cb, this);
+ robottype_subscriber_est_pos_best_create(&orte, rcv_est_pos_best_cb, this);
+ robottype_subscriber_hokuyo_scan_create(&orte, rcv_hokuyo_scan_cb, this);
+ robottype_subscriber_camera_result_create(&orte, rcv_camera_result_cb, &orte); //nebude uzito
+ robottype_subscriber_fsm_main_create(&orte, rcv_fsm_main_cb, this);
+ robottype_subscriber_fsm_act_create(&orte, rcv_fsm_act_cb, this);
+ robottype_subscriber_fsm_motion_create(&orte, rcv_fsm_motion_cb, this);
+ robottype_subscriber_robot_cmd_create(&orte, rcv_robot_cmd_cb, this);
+ robottype_subscriber_robot_switches_create(&orte, rcv_robot_swicthes_cb, this);
}
-void Ortedisplay::nevim(UDE_fsm_t fsm, QString state)
-{
+void OrteSignals::fsm_con(UDE_fsm_t fsm, QString state)
+{
emit fsm_sig(fsm, state);
}
-void Ortedisplay::status_con(UDE_component_t c, UDE_hw_status_t s)
+void OrteSignals::status_con(UDE_component_t c, UDE_hw_status_t s)
{
emit status_sig(c, s);
}
-void Ortedisplay::position_con(void)
+void OrteSignals::position_con(void)
{
emit position_sig(orte.est_pos_best.x, orte.est_pos_best.y, orte.est_pos_best.phi);
}
-void Ortedisplay::pwr_con(void)
+void OrteSignals::pwr_con(void)
{
- emit pwr_sig(orte.pwr_voltage.voltage33, orte.pwr_voltage.voltage50, orte.pwr_voltage.voltage80, orte.pwr_voltage.voltageBAT);
+ emit pwr_sig(orte.pwr_voltage.voltage33, orte.pwr_voltage.voltage50,
+ orte.pwr_voltage.voltage80, orte.pwr_voltage.voltageBAT);
}
-void Ortedisplay::color_con(char color)
+void OrteSignals::color_con(char color)
{
emit color_sig(color);
}