HVcallback.H 875 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #ifndef HVCALLBACK_H_
  2. #define HVCALLBACK_H_
  3. #include <uavcan/uavcan.hpp>
  4. #include <AP_HAL/CAN.h>
  5. #include <AP_HAL/Semaphores.h>
  6. #include <AP_Param/AP_Param.h>
  7. #include <uavcan/helpers/heap_based_pool_allocator.hpp>
  8. #include "AP_UAVCAN_Servers.h"
  9. struct HVmes
  10. {
  11. int16_t voltage;
  12. int32_t speed;
  13. int16_t currentlimit;
  14. uint32_t fault;
  15. int16_t Imax;
  16. int16_t speedref;
  17. int16_t torqueIQ;
  18. int16_t temperature;
  19. int16_t motortemperature;
  20. };
  21. extern uint8_t hv_motor_cmd_temp ;
  22. extern uint8_t hv_motor_cmd;
  23. extern int16_t hv_motor_speed_32 ;
  24. struct HVmotor
  25. {
  26. int16_t speed;
  27. int16_t current;
  28. int16_t voltage;
  29. int16_t temperature;
  30. int16_t motortemperature;
  31. uint16_t fault;
  32. };
  33. void HVcycle(uint8_t _code,uint8_t _buffer[6],HVmes &Thruster);
  34. void Haoye(uint8_t _buffer[7],HVmotor &HVmotor);
  35. #endif