James (Peilun) Li | a70e575 | 2024-09-18 20:43:00 -0700 | [diff] [blame^] | 1 | #include <unistd.h> |
| 2 | |
| 3 | #include <cmath> |
| 4 | #include <cstdio> |
| 5 | #include <cstring> |
| 6 | |
| 7 | #include "absl/flags/flag.h" |
| 8 | |
| 9 | #include "aos/actions/actions.h" |
| 10 | #include "aos/init.h" |
| 11 | #include "aos/logging/logging.h" |
| 12 | #include "aos/network/team_number.h" |
| 13 | #include "aos/util/log_interval.h" |
| 14 | #include "frc971/autonomous/base_autonomous_actor.h" |
| 15 | #include "frc971/constants/constants_sender_lib.h" |
| 16 | #include "frc971/control_loops/drivetrain/localizer_generated.h" |
| 17 | #include "frc971/control_loops/profiled_subsystem_generated.h" |
| 18 | #include "frc971/control_loops/static_zeroing_single_dof_profiled_subsystem.h" |
| 19 | #include "frc971/input/action_joystick_input.h" |
| 20 | #include "frc971/input/driver_station_data.h" |
| 21 | #include "frc971/input/drivetrain_input.h" |
| 22 | #include "frc971/input/joystick_input.h" |
| 23 | #include "frc971/input/redundant_joystick_data.h" |
| 24 | #include "frc971/zeroing/wrap.h" |
| 25 | #include "y2024_bot3/constants/constants_generated.h" |
| 26 | #include "y2024_bot3/control_loops/superstructure/superstructure_goal_static.h" |
| 27 | #include "y2024_bot3/control_loops/superstructure/superstructure_status_static.h" |
| 28 | |
| 29 | using frc971::CreateProfileParameters; |
| 30 | using frc971::input::driver_station::ButtonLocation; |
| 31 | using frc971::input::driver_station::ControlBit; |
| 32 | using frc971::input::driver_station::JoystickAxis; |
| 33 | using frc971::input::driver_station::POVLocation; |
| 34 | |
| 35 | namespace y2024_bot3::input::joysticks { |
| 36 | |
| 37 | namespace superstructure = y2024_bot3::control_loops::superstructure; |
| 38 | |
| 39 | // ButtonLocation constants go here |
| 40 | |
| 41 | class Reader : public ::frc971::input::ActionJoystickInput {}; |
| 42 | } // namespace y2024_bot3::input::joysticks |
| 43 | |
| 44 | int main(int argc, char **argv) { |
| 45 | ::aos::InitGoogle(&argc, &argv); |
| 46 | |
| 47 | aos::FlatbufferDetachedBuffer<aos::Configuration> config = |
| 48 | aos::configuration::ReadConfig("aos_config.json"); |
| 49 | frc971::constants::WaitForConstants<y2024_bot3::Constants>(&config.message()); |
| 50 | |
| 51 | ::aos::ShmEventLoop constant_fetcher_event_loop(&config.message()); |
| 52 | frc971::constants::ConstantsFetcher<y2024_bot3::Constants> constants_fetcher( |
| 53 | &constant_fetcher_event_loop); |
| 54 | const y2024_bot3::Constants *robot_constants = &constants_fetcher.constants(); |
| 55 | |
| 56 | ::aos::ShmEventLoop event_loop(&config.message()); |
| 57 | (void)robot_constants; |
| 58 | //::y2024_bot3::input::joysticks::Reader reader(&event_loop, robot_constants); |
| 59 | |
| 60 | event_loop.Run(); |
| 61 | |
| 62 | return 0; |
| 63 | } |