Rev 513 |
Go to most recent revision |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
#include "HandlerTest.h"
#include <iostream>
void HandlerTest::setUp(void) {
std::cout << std::endl;
handler = new Handler(&com, &data);
}
void HandlerTest::tearDown(void) {
std::cout << "result";
}
void HandlerTest::get_flightctrl_settings_test(void) {
handler->get_flightctrl_settings(0);
}
void HandlerTest::set_flightctrl_settings_test(void) {
handler->set_flightctrl_settings(0);
CPPUNIT_ASSERT_DOUBLES_EQUAL(1, 0, .00001);
}
void HandlerTest::motor_test_test(void) {
sMotorData motor;
handler->motor_test(motor);
}
void HandlerTest::reset_motor_test(void) {
handler->reset_motor();
}
void HandlerTest::read_motor_mixer_test(void) {
handler->read_motor_mixer();
}
void HandlerTest::write_motor_mixer_test(void) {
handler->write_motor_mixer(0, 0);
}
void HandlerTest::get_motor_config_test(void) {
handler->get_motor_config(0);
}
//NaviCtrl commands
void HandlerTest::set_navictrl_debug_test(void) {
handler->set_navictrl_debug(10);
}
void HandlerTest::stop_navictrl_debug_test(void) {
handler->stop_navictrl_debug();
}
void HandlerTest::send_waypoint_test(void) {
Waypoint_t wp;
handler->send_waypoint(wp);
}
void HandlerTest::add_waypoint_test(void) {
Waypoint_t wp;
handler->add_waypoint(wp);
}
void HandlerTest::delete_waypoints_test(void) {
handler->delete_waypoints();
}
//switch between MK modules/components
void HandlerTest::switch_navictrl_test(void) {
handler->switch_navictrl();
}
void HandlerTest::switch_flightctrl_test(void) {
handler->switch_flightctrl();
}
void HandlerTest::switch_mk3mag_test(void) {
handler->switch_mk3mag();
}
//commands for MK3MAG
//commands for all modules/components
void HandlerTest::set_all_debug_test(void) {
handler->set_all_debug(10);
}
void HandlerTest::stop_all_debug_test(void) {
handler->stop_all_debug();
}
void HandlerTest::get_analog_test(void) {
handler->get_analog();
}
void HandlerTest::show_lcd_test(void) {
handler->show_lcd();
}
void HandlerTest::lcd_up_test(void) {
handler->lcd_up();
}
void HandlerTest::lcd_down_test(void) {
handler->lcd_down();
}
void HandlerTest::get_version_test(void) {
handler->get_version();
}
void HandlerTest::get_ppm_channels_test(void) {
handler->get_ppm_channels();
}