Rev 513 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
513 | Brean | 1 | #include "HandlerTest.h" |
524 | Brean | 2 | #include <iostream> |
513 | Brean | 3 | |
4 | void HandlerTest::setUp(void) { |
||
524 | Brean | 5 | std::cout << std::endl; |
513 | Brean | 6 | handler = new Handler(&com, &data); |
524 | Brean | 7 | } |
513 | Brean | 8 | |
524 | Brean | 9 | void HandlerTest::tearDown(void) { |
10 | std::cout << "result"; |
||
11 | } |
||
12 | |||
513 | Brean | 13 | void HandlerTest::get_flightctrl_settings_test(void) { |
14 | handler->get_flightctrl_settings(0); |
||
524 | Brean | 15 | } |
513 | Brean | 16 | |
524 | Brean | 17 | void HandlerTest::set_flightctrl_settings_test(void) { |
18 | handler->set_flightctrl_settings(0); |
||
19 | CPPUNIT_ASSERT_DOUBLES_EQUAL(1, 0, .00001); |
||
20 | } |
||
21 | |||
22 | void HandlerTest::motor_test_test(void) { |
||
23 | sMotorData motor; |
||
24 | handler->motor_test(motor); |
||
25 | } |
||
26 | |||
27 | void HandlerTest::reset_motor_test(void) { |
||
28 | handler->reset_motor(); |
||
29 | } |
||
30 | |||
31 | void HandlerTest::read_motor_mixer_test(void) { |
||
32 | handler->read_motor_mixer(); |
||
33 | } |
||
34 | |||
35 | void HandlerTest::write_motor_mixer_test(void) { |
||
36 | handler->write_motor_mixer(0, 0); |
||
37 | } |
||
38 | |||
39 | void HandlerTest::get_motor_config_test(void) { |
||
40 | handler->get_motor_config(0); |
||
41 | } |
||
42 | |||
43 | //NaviCtrl commands |
||
44 | void HandlerTest::set_navictrl_debug_test(void) { |
||
45 | handler->set_navictrl_debug(10); |
||
46 | } |
||
47 | |||
48 | void HandlerTest::stop_navictrl_debug_test(void) { |
||
49 | handler->stop_navictrl_debug(); |
||
50 | } |
||
51 | |||
52 | void HandlerTest::send_waypoint_test(void) { |
||
53 | Waypoint_t wp; |
||
54 | handler->send_waypoint(wp); |
||
55 | } |
||
56 | |||
57 | void HandlerTest::add_waypoint_test(void) { |
||
58 | Waypoint_t wp; |
||
59 | handler->add_waypoint(wp); |
||
60 | } |
||
61 | |||
62 | void HandlerTest::delete_waypoints_test(void) { |
||
63 | handler->delete_waypoints(); |
||
64 | } |
||
65 | |||
66 | //switch between MK modules/components |
||
67 | void HandlerTest::switch_navictrl_test(void) { |
||
68 | handler->switch_navictrl(); |
||
69 | } |
||
70 | |||
71 | void HandlerTest::switch_flightctrl_test(void) { |
||
72 | handler->switch_flightctrl(); |
||
73 | } |
||
74 | |||
75 | void HandlerTest::switch_mk3mag_test(void) { |
||
76 | handler->switch_mk3mag(); |
||
77 | } |
||
78 | |||
79 | //commands for MK3MAG |
||
80 | |||
81 | //commands for all modules/components |
||
82 | void HandlerTest::set_all_debug_test(void) { |
||
83 | handler->set_all_debug(10); |
||
84 | } |
||
85 | |||
86 | void HandlerTest::stop_all_debug_test(void) { |
||
87 | handler->stop_all_debug(); |
||
88 | } |
||
89 | |||
90 | void HandlerTest::get_analog_test(void) { |
||
91 | handler->get_analog(); |
||
92 | } |
||
93 | |||
94 | void HandlerTest::show_lcd_test(void) { |
||
95 | handler->show_lcd(); |
||
96 | } |
||
97 | |||
98 | void HandlerTest::lcd_up_test(void) { |
||
99 | handler->lcd_up(); |
||
100 | } |
||
101 | |||
102 | void HandlerTest::lcd_down_test(void) { |
||
103 | handler->lcd_down(); |
||
104 | } |
||
105 | |||
106 | void HandlerTest::get_version_test(void) { |
||
107 | handler->get_version(); |
||
108 | } |
||
109 | |||
110 | void HandlerTest::get_ppm_channels_test(void) { |
||
111 | handler->get_ppm_channels(); |
||
112 | } |