HVcallback.H 833 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. uint32_t fault;
  14. int16_t speedref;
  15. int16_t torqueIQ;
  16. int16_t temperature;
  17. int16_t motortemperature;
  18. };
  19. extern uint8_t hv_motor_cmd_temp ;
  20. extern uint8_t hv_motor_cmd;
  21. extern int16_t hv_motor_speed_32 ;
  22. struct HVmotor
  23. {
  24. int16_t speed;
  25. int16_t current;
  26. int16_t voltage;
  27. int16_t temperature;
  28. int16_t motortemperature;
  29. uint16_t fault;
  30. };
  31. void HVcycle(uint8_t _code,uint8_t _buffer[6],HVmes &Thruster);
  32. void Haoye(uint8_t _buffer[7],HVmotor &HVmotor);
  33. #endif