1 #ifndef ASYNC_CAN_JAGUAR_H_
2 #define ASYNC_CAN_JAGUAR_H_
9 #include "../Process/SynchronizedProcess.h"
10 #include "../Utils/Util.h"
11 #include "../Utils/PrintInConstructor.h"
12 #include "../Utils/CachedValue.h"
13 #include "../RobotState.h"
15 #include "LRTSpeedController.h"
16 #include "../Logging/Loggable.h"
18 #include <Rhesus/Toolkit/GameState.h>
72 void SetPID(
double p,
double i,
double d);
122 double reverseLimitPosition);
300 const static uint32_t SPEEDREF = (1 << 0);
301 const static uint32_t POSREF = (1 << 1);
302 const static uint32_t
PID = (1 << 2);
303 const static uint32_t CTRLMODE = (1 << 3);
304 const static uint32_t BUSVOLT = (1 << 4);
305 const static uint32_t OUTVOLT = (1 << 5);
306 const static uint32_t OUTCURR = (1 << 6);
307 const static uint32_t TEMP = (1 << 7);
308 const static uint32_t POS = (1 << 8);
309 const static uint32_t SPEED = (1 << 9);
310 const static uint32_t FWDLIMOK = (1 << 10);
311 const static uint32_t REVLIMOK = (1 << 11);
312 const static uint32_t PWRCYCLE = (1 << 12);
313 const static uint32_t EXPIRE = (1 << 13);
314 const static uint32_t VALUE = (1 << 14);
323 void Set(
float setpoint, UINT8 syncGroup = 0);
325 void Println(
const char* str);
327 std::string m_task_name;
339 bool m_should_disable_control;
346 bool m_should_disable_position_limits;
350 volatile uint32_t m_collection_flags;
351 volatile float m_output_voltage;
352 volatile float m_output_current;
353 volatile float m_position;
354 volatile float m_p, m_i, m_d;
355 volatile SpeedReference m_speed_ref;
356 volatile PositionReference m_position_ref;
357 volatile ControlMode m_ctrl_mode;
358 volatile float m_bus_voltage;
359 volatile float m_temperature;
360 volatile float m_speed;
361 volatile bool m_fwd_limit_ok;
362 volatile bool m_rev_limit_ok;
363 volatile bool m_pwr_cyc;
364 volatile float m_expire;
365 volatile float m_value;
367 GameState::Enum m_last_game_mode;