controller.cpp 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. #include <control/controller.h>
  2. iv::control::Controller::Controller() {
  3. }
  4. iv::control::Controller::~Controller() {
  5. }
  6. void iv::control::Controller::inialize() {
  7. }
  8. //校验和
  9. void iv::control::Controller::cmd_checksum(unsigned char cmd_id) {
  10. // ServiceControlStatus.set_cmd_checksum(cmd_id);
  11. }
  12. //方向盘控制
  13. void iv::control::Controller::control_wheel(float angle) {
  14. ServiceControlStatus.set_wheel_angle(angle);
  15. }
  16. void iv::control::Controller:: control_angle_speed(float angSpeed){
  17. // ServiceControlStatus.set_wheel_speed(angSpeed);
  18. }
  19. void iv::control::Controller:: control_angle_enable(bool enable){
  20. ServiceControlStatus.set_wheel_enable(enable);
  21. }
  22. //速度限制
  23. void iv::control::Controller:: control_speed_limit(float speedLimit){
  24. // ServiceControlStatus.set_speed_limit(speedLimit);
  25. }
  26. //油门控制
  27. void iv::control::Controller::control_torque(float percent){
  28. ServiceControlStatus.set_torque(percent);
  29. }
  30. void iv::control::Controller::control_acc_en(bool enanble){
  31. ServiceControlStatus.set_acc_enable(enanble);
  32. }
  33. void iv::control::Controller::control_park_en(bool enanble){
  34. ServiceControlStatus.set_park_enable(enanble);
  35. }
  36. void iv::control::Controller::control_brake_en(bool enanble){
  37. ServiceControlStatus.set_brake_enable(enanble);
  38. }
  39. void iv::control::Controller::control_aeb(float aeb){
  40. // ServiceControlStatus.set_aeb(aeb);
  41. }
  42. void iv::control::Controller::control_aeb_en(bool enable){
  43. // ServiceControlStatus.set_aeb_enable(enable);
  44. }
  45. //刹车控制
  46. void iv::control::Controller::control_brake(float brake){
  47. ServiceControlStatus.set_brake(brake);
  48. }
  49. //档位控制
  50. void iv::control::Controller::control_gear(float gear){
  51. ServiceControlStatus.set_gear(gear);
  52. }
  53. void iv::control::Controller::control_gear_en(bool enable){
  54. ServiceControlStatus.set_gear_enable(enable);
  55. }
  56. //手刹
  57. void iv::control::Controller::control_handBrake(bool enable){
  58. ServiceControlStatus.set_handBrake(enable);
  59. }
  60. //驾驶模式
  61. void iv::control::Controller::control_mode(char mode){
  62. ServiceControlStatus.set_driveMode(mode);
  63. }
  64. //车窗控制
  65. //void iv::control::Controller::control_win_lf(char para){
  66. // ServiceControlStatus.set_win_lf(para);
  67. //}
  68. //void iv::control::Controller::control_win_rf(char para){
  69. // ServiceControlStatus.set_win_rf(para);
  70. //}
  71. //void iv::control::Controller::control_win_lr(char para){
  72. // ServiceControlStatus.set_win_lr(para);
  73. //}
  74. //void iv::control::Controller::control_win_rr(char para){
  75. // ServiceControlStatus.set_win_rr(para);
  76. //}
  77. //空调控制
  78. void iv::control::Controller::control_air_on(bool enable){
  79. // if(enable){
  80. // ServiceControlStatus.set_air_on(1);
  81. // }else{
  82. // ServiceControlStatus.set_air_on(0);
  83. // }
  84. }
  85. //void iv::control::Controller::control_air_cricle(char para){
  86. // ServiceControlStatus.set_air_cricle(para);
  87. //}
  88. //void iv::control::Controller::control_air_auto(char para){
  89. // ServiceControlStatus.set_air_auto(para);
  90. //}
  91. //void iv::control::Controller::control_air_off(char para){
  92. // ServiceControlStatus.set_air_off(para);
  93. //}
  94. //void iv::control::Controller::control_air_temup(char para){
  95. // ServiceControlStatus.set_air_temup(para);
  96. //}
  97. //void iv::control::Controller::control_air_temdown(char para){
  98. // ServiceControlStatus.set_air_temdown(para);
  99. //}
  100. //void iv::control::Controller::control_air_powerup(char para){
  101. // ServiceControlStatus.set_air_powerup(para);
  102. //}
  103. //void iv::control::Controller::control_air_powerdown(char para){
  104. // ServiceControlStatus.set_air_powerdown(para);
  105. //}
  106. //点火控制
  107. void iv::control::Controller::control_obligate(char para){
  108. ServiceControlStatus.set_obligate(para);
  109. }
  110. //车门控制
  111. void iv::control::Controller::control_door(char enable){
  112. ServiceControlStatus.set_door(enable);
  113. }
  114. //车灯控制
  115. void iv::control::Controller::control_turnsignals(bool left, bool right){
  116. ServiceControlStatus.set_turnsignals_control(left,right);
  117. }
  118. void iv::control::Controller::control_small_light(char para){
  119. ServiceControlStatus.set_small_light(para);
  120. }
  121. void iv::control::Controller::control_near_light(char para){
  122. ServiceControlStatus.set_near_light(para);
  123. }
  124. void iv::control::Controller::control_far_light(char para){
  125. ServiceControlStatus.set_far_light(para);
  126. }
  127. void iv::control::Controller::control_frog_light(char para){
  128. ServiceControlStatus.set_frog_light(para);
  129. }
  130. void iv::control::Controller::control_brake_light(char para){
  131. ServiceControlStatus.set_brake_light(para);
  132. }
  133. void iv::control::Controller::control_defrog(char para){
  134. ServiceControlStatus.set_defrog(para);
  135. }
  136. void iv::control::Controller::control_reverse_light(char para){
  137. ServiceControlStatus.set_reverse_light(para);
  138. }
  139. //喇叭控制
  140. void iv::control::Controller::control_horn(char para){
  141. ServiceControlStatus.set_horn(para);
  142. }
  143. //雨刷控制
  144. void iv::control::Controller::control_wiper(char para){
  145. ServiceControlStatus.set_wiper(para);
  146. }
  147. void iv::control::Controller::control_air_temp(char para){
  148. ServiceControlStatus.set_air_temp(para);
  149. }
  150. void iv::control::Controller::control_air_mode(char para){
  151. ServiceControlStatus.set_air_mode(para);
  152. }
  153. void iv::control::Controller::control_air_enable(bool enable){
  154. ServiceControlStatus.set_air_enable(enable);
  155. }
  156. void iv::control::Controller::control_wind_level(char para){
  157. ServiceControlStatus.set_wind_level(para);
  158. }
  159. void iv::control::Controller::control_roof_light(char para){
  160. ServiceControlStatus.set_roof_light(para);
  161. }
  162. void iv::control::Controller::control_home_light(char para){
  163. ServiceControlStatus.set_home_light(para);
  164. }
  165. void iv::control::Controller::control_air_worktime(char para){
  166. ServiceControlStatus.set_air_worktime(para);
  167. }
  168. void iv::control::Controller::control_air_offtime(char para){
  169. ServiceControlStatus.set_air_offtime(para);
  170. }
  171. //void iv::control::Controller::control_flicker(bool enable){
  172. // ServiceControlStatus.set_flicker(enable);
  173. //}
  174. //void iv::control::Controller::control_braking(float percent){
  175. //}