blob: 6622d851d2b1cd4f184a82bc9c6230c73ee0927a [file] [log] [blame]
Brian Silvermanda45b6c2014-12-28 11:36:50 -08001#ifndef FRC971_WPILIB_JOYSTICK_SENDER_H_
2#define FRC971_WPILIB_JOYSTICK_SENDER_H_
3
4#include <atomic>
5
James Kuszmaul57c2baa2020-01-19 14:52:52 -08006#include "aos/events/shm_event_loop.h"
Alex Perrycb7da4b2019-08-28 19:35:56 -07007#include "aos/robot_state/joystick_state_generated.h"
Austin Schuhdf6cbb12019-02-02 13:46:52 -08008
Brian Silvermanda45b6c2014-12-28 11:36:50 -08009namespace frc971 {
10namespace wpilib {
11
12class JoystickSender {
13 public:
James Kuszmaul57c2baa2020-01-19 14:52:52 -080014 JoystickSender(::aos::ShmEventLoop *event_loop);
Brian Silvermanda45b6c2014-12-28 11:36:50 -080015
16 private:
James Kuszmaul57c2baa2020-01-19 14:52:52 -080017 ::aos::ShmEventLoop *event_loop_;
Austin Schuhdf6cbb12019-02-02 13:46:52 -080018 ::aos::Sender<::aos::JoystickState> joystick_state_sender_;
Austin Schuhbd1fe9c2019-06-29 16:35:48 -070019 const uint16_t team_id_;
Brian Silvermanda45b6c2014-12-28 11:36:50 -080020};
21
22} // namespace wpilib
23} // namespace frc971
24
25#endif // FRC971_WPILIB_JOYSTICK_SENDER_H_